Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
fix(concepts): use id attribute for security group (#4020)
Browse files Browse the repository at this point in the history
  • Loading branch information
stooj authored Mar 9, 2024
1 parent ab26d47 commit 784abb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion themes/default/content/docs/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Programs reside in a *project*, which is a directory that contains source code f

To illustrate these concepts, the following program shows how to create an AWS EC2 security group named `web-sg` with a single ingress rule and a `t2.micro`-sized EC2 instance using that security group.

To use the security group, the EC2 resource requires the security group's ID. Pulumi enables this through the output property `name` on the security group resource. Pulumi understands dependencies between resources and uses the relationships between resources to maximize parallelism and ensures correct ordering when a stack is instantiated.
To use the security group, the EC2 resource requires the security group's ID. Pulumi enables this through the output property `id` on the security group resource. Pulumi understands dependencies between resources and uses the relationships between resources to maximize parallelism and ensures correct ordering when a stack is instantiated.

Finally, the server's resulting IP address and DNS name are exported as stack outputs so that their values can be accessed through either a CLI command or by another stack.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Pulumi;
using Pulumi;
using Pulumi.Aws.Ec2;
using Pulumi.Aws.Ec2.Inputs;
using System.Collections.Generic;
Expand All @@ -20,7 +20,7 @@
var server = new Instance("web-server", new InstanceArgs {
Ami = "ami-0319ef1a70c93d5c8",
InstanceType = "t2.micro",
VpcSecurityGroupIds = { group.Name }
VpcSecurityGroupIds = { group.Id }
});

return new Dictionary<string, object?>
Expand Down

0 comments on commit 784abb6

Please sign in to comment.