question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS Provider mis parsing the state for redis

See original GitHub issue

I have a complete production environment setup by Pulumi. Yesterday I upgraded to Pulumi 3 and upgraded all npm packages to their latest.

@pulumi/aws”: “^4.0.0”, “@pulumi/awsx”: “^0.30.0”, “@pulumi/cloudflare”: “^3.0.0”, “@pulumi/eks”: “^0.30.0”, “@pulumi/kubernetes”: “^3.0.0”, “@pulumi/pulumi”: “^3.0.0”, “@pulumi/random”: “^4.0.0”

After this I ran pulumi refresh to sync the state with aws but once I ran pulumi up I keep getting this error

aws:elasticache:Cluster (platform): error: unmarshaling urn:pulumi:production::at-platform::aws:elasticache/cluster:Cluster::platform’s instance state: could not read field snapshot_arns: ‘’ expected type ‘string’, got unconvertible type ‘[]interface {}’, value: ‘[]’

I opened a ticket with support and after further investigation from their side and more information they asked me about, they said that the issue is from the AWS Provider and asked me to open an issue here.

The code to create the redis that I used is

new aws.elasticache.Cluster(options.name, { engine: “redis”, engineVersion: “5.0.6”, clusterId: options.name, maintenanceWindow: “sat:03:00-sat:04:00”, nodeType: options.nodeType, subnetGroupName: options.redisSubnetGroup.name, securityGroupIds: [options.redisSecurityGroup.id], numCacheNodes: 1, parameterGroupName: “default.redis5.0”, applyImmediately: true });

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
clstokescommented, Apr 23, 2021

As a workaround for anyone else that gets into this situation, you can do the following to “fix” your state and get unblocked.

  1. Export your stack state with pulumi stack export --file exported-stack.json
  2. Search the exported-stack.json file for snapshotArns. It should be under outputs on your aws:elasticache/cluster:Cluster resources and look like "snapshotArns": [],.
  3. Delete that line from the file
  4. If you have multiple elasticache clusters, you will need to do this for each cluster in exported-stack.json
  5. Import your stack state with pulumi stack import --file exported-stack.json
  6. pulumi up to ensure you are unblocked
0reactions
chrisportelacommented, May 20, 2021

Strange. I am also getting this problem, with the same error, but I don’t actually have snapshotArns in my state export at all. What I had to do is a non-refreshed update and then I could do the refresh fine. I was updating from aws 3.30.0 to 4.5.1 and pulumi 2.21.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Amazon ElastiCache for Redis
Lua scripts provide the possibility of running multiple commands, decision-making algorithms, data parsing, and others directly on the Redis engine.
Read more >
Error detection and handling with Redis - IBM Developer
Detect errors while performing Redis commands​​ A typical use-case is to use Redis as a cache. Your application will attempt to fetch a...
Read more >
INFO - Redis
@slow , @dangerous ,. The INFO command returns information and statistics about the server in a format that is simple to parse by...
Read more >
GraphQL Code Libraries, Tools and Services
LicenseMIT License. A powerful JavaScript GraphQL client, designed to work well with React, React Native, Angular 2, or just plain JavaScript. AWS Amplify....
Read more >
Log system - GitLab Docs
How to parse and analyze JSON logs. Log Levels. Each log message has an assigned log level that indicates its importance and verbosity....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found