cold-coat-35200
05/06/2019, 11:48 AMconst vpc = new aws.ec2.Vpc(
vpcName,
{
cidrBlock: cidrBlock,
enableDnsHostnames: true,
enableDnsSupport: true,
tags: Object.assign(
{
Name: vpcName
},
args.resourceTags
)
},
{ parent: this }
)
if I change this to
const vpc = new aws.ec2.Vpc(
vpcName,
{
cidrBlock: cidrBlock,
enableDnsHostnames: true,
enableDnsSupport: true,
tags: {
Name: vpcName
}
},
{ parent: this, ignoreChanges: ['tags'] }
)
and trying to update the stack, I got an error:
aws:ec2:Vpc (dlv-sbx-vpc):
error: aws:ec2/vpc:Vpc resource 'dlv-sbx-vpc' has a problem: tags (kubernetes): '' expected type 'string', got unconvertible type 'map[string]interface {}'
pulumi:pulumi:Stack (dliver-dlv-sbx):
error: Running program '/home/ncsibra/dev/prmrgt-infra/pulumi/dliver' failed with an unhandled exception:
Error: invocation of aws:ec2/getVpc:getVpc returned an error: transport is closing
at monitor.invoke (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/invoke.js:74:33)
at Object.onReceiveStatus (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/grpc/src/client_interceptors.js:1205:9)
at InterceptingListener._callNext (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/grpc/src/client_interceptors.js:845:24)
This resource has a tag, added by EKS, something like <http://kubernetes.io/cluster/dlv-sbx-cluster-eks-197239a|kubernetes.io/cluster/dlv-sbx-cluster-eks-197239a>: shared
, this tag not exist in pulumi code, because vpc created first, then EKS, so unable to add it from pulumi, but after a refresh, pulumi tries to remove that, but that would cause problems with resources handled by kubernetes.
So I tried to add ignoreChanges, but looks like it want to do something with the tags anyway and unable to parse it.creamy-potato-29402
05/06/2019, 6:19 PMbitter-oil-46081
05/06/2019, 6:19 PMwhite-balloon-205
cold-coat-35200
05/06/2019, 7:59 PM