I am provisioning EKS with Pulumi, to setup the pl...
# golang
s
I am provisioning EKS with Pulumi, to setup the platform I am also bringing up VPC using Pulumi and Go SDKs. VPC Provisioning along with subnets works as expected, however making any changes to the stack, for example changing the subnet settings (dns enabled), ends up trying to create a new subnet and fails. Coming from terraform, shouldn’t changes to provisioned resources be supported?
This is subnet bring up I have used but also tried creating subnets without the loop
Copy code
subCount := 0
		for sub, cidr := range subs {
			_, err = ec2.NewSubnet(ctx, sub, &ec2.SubnetArgs{
				VpcId:                                vpc.ID(),
				CidrBlock:                            pulumi.String(cidr),
				AvailabilityZone:                     pulumi.String(azs[subCount]),
				EnableResourceNameDnsARecordOnLaunch: pulumi.BoolPtr(true),
				MapPublicIpOnLaunch:                  pulumi.BoolPtr(true),
				Tags: pulumi.StringMap{
					"Name": pulumi.String(sub),
				},
			},
				pulumi.DependsOn([]pulumi.Resource{vpc}),
			)
			subCount++
			if err != nil {
				return err
			}
		}
b
Making changes is supported, what error do you get?
s
It says failed to create the subnets - what is happening is, it doesn’t look to modify the subnet but rather re-create it and with the CIDR taken for subnet, it fails
b
s
that helps, will try adding this.
This worked after adding for provider, thanks @billowy-army-68599