https://pulumi.com logo
#aws
Title
# aws
c

cold-coat-35200

06/08/2020, 5:50 AM
Hi, We have a ComponentResource, which creates loadbalancer, target group, auto scaling group etc The auto scaling creation code looks like this:
Copy code
const autoScalingGroup = new aws.autoscaling.Group(
      `${name}-autoScalingGroup`,
      {
        desiredCapacity: args.minSize,
        launchConfiguration: nodeLaunchConfiguration,
        minSize: args.minSize,
        maxSize: args.maxSize,
        vpcZoneIdentifiers: args.subnetIds,
        tags: tags,
        targetGroupArns: args.targetGroupArns,
        loadBalancers: args.classicLoadBalancerNames,
      },
      { parent: this, ignoreChanges: ['desiredCapacity'] }
    )
args.targetGroupArns
defined as
Copy code
readonly targetGroupArns?: pulumi.Input<pulumi.Input<string>[]>
Same as on the original pulumi aws resource. Called this way:
Copy code
const transcoderAzWorkerNodes = new eks.WorkerNodeGroup(`${stack}-transcoder-wg-1.14`, {
    amiID: workerConfig.amiID,
    subnetIds: vpcDliverOutput.vpc.publicIpSubnetIds,
    clusterName: cluster.name,
    clusterEndPoint: cluster.endpoint,
    clusterCertificateAuthority: cluster.certificateAuthority,
    clusterInstanceRole: cluster.sharedWorkerInstanceRole,
    minSize: workerConfig.transcoder.minSize,
    maxSize: workerConfig.transcoder.maxSize,
    instanceType: workerConfig.transcoder.instanceType,
    nodeSecurityGroupID: vpcDliverOutput.securityGroup.worker.rtmpTranscoder.id,
    nodeRootVolumeSize: 25,
    nodePublicKeyName: workerSSHKey.keyName,
    kubeletExtraArgs: '--node-labels <http://dliver.com/stack=transcoder|dliver.com/stack=transcoder>',
    targetGroupArns: [groupRtmp.targetGroupArn]
  })
The problem is that when we deleted
targetGroupArns: [groupRtmp.targetGroupArn]
from the calling code, pulumi does not update the resource, did not show any updates. If we change to this
targetGroupArns: []
instead of deleting, then works as expected. Is this a normal behavior? I assume not, pulumi should recognize the change in both cases.
Any confirmation about this issue?
g

gentle-diamond-70147

06/09/2020, 4:39 PM
I believe Pulumi should behave the same in both cases. Can you open an issue at https://github.com/pulumi/pulumi-aws/issues with your code that reproduces this?
c

cold-coat-35200

06/10/2020, 5:42 AM