https://pulumi.com logo
Title
p

proud-spoon-58287

05/13/2021, 11:42 AM
Hi all, upgraded from pulumi v2 to v3. I am seeing a strange error with this part:
aws:elasticache:Cluster (data-feed-control):
    error: unmarshaling urn:pulumi:development::platform-data-feed::aws:elasticache/cluster:Cluster::data-feed-control's instance state: could not read field snapshot_arns: '' expected type 'string', got unconvertible type '[]interface {}', value: '[]'
in this part:
return new aws.elasticache.Cluster('data-feed-control', {
  clusterId: 'data-feed-control',
  engine: 'redis',
  engineVersion: '6.x',
  nodeType: 'cache.t3.micro',
  numCacheNodes: 1,
  parameterGroupName: 'default.redis6.x',
  securityGroupIds: [defaultSecurityGroup.id],
  subnetGroupName: feedControlSubnetGroup.id
})
snapshot_arns is not mandatory
do not get what it wants
c

cool-fireman-90027

05/13/2021, 11:57 AM
@proud-spoon-58287, There is a breaking change according to this changelog. •
aws.elasticache.Cluster
 now only allows a single 
snapshotArn
. There is an issue open for this here
p

proud-spoon-58287

05/13/2021, 12:06 PM
@cool-fireman-90027 point is that I do not need any snapshot.
can I not simply not passing anything since it is an optional parameter?
this is the code
return new aws.elasticache.Cluster('data-feed-control', {
    clusterId: 'data-feed-control',
    engine: 'redis',
    engineVersion: '6.x',
    nodeType: 'cache.t3.micro',
    numCacheNodes: 1,
    parameterGroupName: 'default.redis6.x',
    securityGroupIds: [defaultSecurityGroup.id],
    subnetGroupName: feedControlSubnetGroup.id
  })
even if I copy the one in the docs, fails with the same error
c

cool-fireman-90027

05/13/2021, 12:22 PM
There is a work around here
p

proud-spoon-58287

05/13/2021, 1:04 PM
thanks mate
I have manually removed the existing redis instance from aws console
ran pulumy refresh
BUT
no changes were detected
and now I cannot do pulumi up anymore since it is trying to update something that does not exists anymore
I tried to export the stack and remove it manually, but it is in 16 different entries and I don't think that is the right way to do it
what is the right approach for this case?
a

aloof-address-12777

05/13/2021, 2:57 PM
Have you tried
pulumi up -r
?
c

cool-fireman-90027

05/13/2021, 3:44 PM
You can use pulumi state delete to remove it from the state file that you exported. Then if you import the state file, and do a
pulumi up
what happens?
p

proud-spoon-58287

05/13/2021, 5:56 PM
need to try it
thanks @cool-fireman-90027
@cool-fireman-90027
last bug/help
aws:iam:RolePolicyAttachment (iamrpa-data-feed-lambda-role-lambda-access-policy):
    error: 1 error occurred:
        * Error attaching policy arn:aws:iam::aws:policy/AWSLambdaFullAccess to IAM Role iamr-data-feed-lambda-71c3895: NoSuchEntity: Policy arn:aws:iam::aws:policy/AWSLambdaFullAccess does not exist or is not attachable.
        status code: 404, request id: a306fb38-152c-40a4-a922-d44802d8e8d4
I know that AWSLambdaFullAccess is now deprecated and no longer attachable
is this a known bug?
forget it 🙂
my fault