pulumi-eks icon indicating copy to clipboard operation
pulumi-eks copied to clipboard

Golang: setting NodePublicKey or KeyName break LaunchConfiguration

Open universam1 opened this issue 4 years ago • 0 comments
trafficstars

adding NodePublicKey or KeyName property to eks.ClusterNodeGroupOptionsArgs{} breaks the generator for the LaunchConfiguration.

Then, any other property in eks.ClusterNodeGroupOptionsArgs{} is ignored and reset to default values!

Expected behavior

it should add the key to the launchconfig.

Current behavior

~ ├─ pulumi:providers:kubernetes eks-provider refresh +- ├─ aws:ec2:LaunchConfiguration eks-nodeLaunchConfiguration replaced [diff: -spotPrice~instanceType,userData]

Steps to reproduce

		cluster, err := eks.NewCluster(ctx, "eks", &eks.ClusterArgs{
			EnabledClusterLogTypes: pulumi.StringArray{
				pulumi.String("api"),
				pulumi.String("audit"),
				pulumi.String("authenticator"),
			},
			VpcId:                 vpc.ID,
			EndpointPrivateAccess: pulumi.Bool(true),
			EndpointPublicAccess:  pulumi.Bool(true),
			Name:                  pulumi.String(ctx.Stack()),
			PrivateSubnetIds:      vpc.PrivateSubnetIDs,
			PublicSubnetIds:       vpc.PublicSubnetIDs,
			NodeGroupOptions: eks.ClusterNodeGroupOptionsArgs{
				InstanceType:                 pulumi.String("t3.medium"),
				MinSize:                      pulumi.Int(3),
				MaxSize:                      pulumi.Int(10),
				DesiredCapacity:              pulumi.Int(3),
				SpotPrice:                    pulumi.String("1"),
				NodeAssociatePublicIpAddress: pulumi.Bool(true),
				Labels: pulumi.StringMap{
					"node.kubernetes.io/node-group": pulumi.String("first"),
					"node.kubernetes.io/lifecycle":  pulumi.String("Ec2Spot"),
					"node.kubernetes.io/class":      pulumi.String("ephemeral"),
				},
				// KeyName:                      key.KeyName, <-- uncomment one of these
				// NodePublicKey:             key.PublicKey,  <-- uncomment one of these
			},
		})

Context (Environment)

trying to add a public key, encountering that the whole ASG is reset to default values

Affected feature

Impossible to use

universam1 avatar May 24 '21 11:05 universam1