04/19/2019, 7:29 PM
Tags don't seem to be available when using
. I have a need to add tags to the cluster and all related/dependent components, but there's not tags attribute available. Is there any workaround for this?
Copy code
39 /*
 40  * EKS cluster creation
 41  */
 42 export const cluster = new eks.Cluster(config.environment + "-eks-cluster", {
 43     version: config.kubernetesVersion,
 44     vpcId: config.vpcId,
 45     subnetIds: config.subnetIds,
 46     instanceType: config.instanceType,
 47     tags: {
 48       Project: "Mustang",
 49     },
 50     nodeAmiId: config.amiId,
 51     nodePublicKey: config.workerNodePublicKey,
 52     nodeRootVolumeSize: 200,
 53     desiredCapacity: config.desiredNodes,
 54     maxSize: config.maxNumberOfNodes,
 55     minSize: config.minNumberOfNodes,
 56     nodeUserData: userData,
 57     deployDashboard: false,
 58     vpcCniOptions: {

$ pulumi up
Previewing update (redacted):

     Type                 Name                                              Plan     Info
     pulumi:pulumi:Stack  eks-cluster-online-sandbox-vpc           1 error

  pulumi:pulumi:Stack (eks-cluster-online-sandbox-vpc):
    error: Running program '/home/tsi/eshamay/git/cs/infrastructure/pulumi/eks-cluster' failed with an unhandled exception:
    TSError: ⨯ Unable to compile TypeScript:
    cluster.ts(47,5): error TS2345: Argument of type '{ version: string; vpcId: string; subnetIds: Output<UnwrappedArray<string>>; instanceType: InstanceType; tags: { Project: string; }; nodeAmiId: string; nodePublicKey: string; nodeRootVolumeSize: number; ... 6 more ...; roleMappings: { ...; }[]; }' is not assignable to parameter of type 'ClusterOptions'.
      Object literal may only specify known properties, and 'tags' does not exist in type 'ClusterOptions'.


04/19/2019, 7:31 PM
It looks like the underlying TF provider also doesn’t support tags:


04/19/2019, 7:34 PM
I thought Pulumi has its own proprietary provider for kubernetes/EKS?


04/19/2019, 7:44 PM
The original reported issue is I believe the EKS cluster itself does not support tags, but the instances and many other resources associated with it do, and we can expose the ability to pass tags down to those.


04/20/2019, 5:15 PM
It does indeed appear that EKS clusters themselves don't support tagging, based on the AWS API and AWS CloudFormation support It appears that, although accepts tags, it only uses them for the SecurityGroup that it creates. I like Luke's suggestion to accept tags and tag anything we can, possibly even letting you pass specific tags for specific resources (e.g.,
applies to everything it can, whereas
only applies to the security group).
Note, Eric, that it looks like this is on deck in our next milestone, which starts Monday after next.


04/22/2019, 5:58 PM