Skip to content

Commit

Permalink
Update aws-go-webserver to use VpcSecurityGroupIds, not `Security…
Browse files Browse the repository at this point in the history
…Groups`. (#596)

`SecurityGroups` doesn't allow for updates while `VpcSecurityGroupIds` does.

See pulumi/pulumi-aws#852 for more context.
  • Loading branch information
Cameron Stokes committed Mar 10, 2020
1 parent 6d00310 commit 49b5b37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws-go-webserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ func main() {

// Create a simple web server using the startup script for the instance.
srv, err := ec2.NewInstance(ctx, "web-server-www", &ec2.InstanceArgs{
Tags: pulumi.Map{"Name": pulumi.String("web-server-www")},
InstanceType: pulumi.String("t2.micro"), // t2.micro is available in the AWS free tier.
SecurityGroups: pulumi.StringArray{group.Name},
Ami: pulumi.String(ami.Id),
Tags: pulumi.Map{"Name": pulumi.String("web-server-www")},
InstanceType: pulumi.String("t2.micro"), // t2.micro is available in the AWS free tier.
VpcSecurityGroupIds: pulumi.StringArray{group.ID()},
Ami: pulumi.String(ami.Id),
UserData: pulumi.String(`#!/bin/bash
echo "Hello, World!" > index.html
nohup python -m SimpleHTTPServer 80 &`),
Expand Down

0 comments on commit 49b5b37

Please sign in to comment.