Open vaspahomov opened 1 year ago
Same problem on latest provider version (v4.23.0) - https://gist.github.com/vaspahomov/61e29f53115ca02e69d7fe07b295663a
Hey @vaspahomov 👋 Thank you for taking the time to raise this! I took a quick look at the debug logs and happened to notice this line:
{"@level":"debug","@message":"New state was assigned lineage \"70a64b6c-df8c-fa50-367a-840210016653\"","@timestamp":"2022-07-28T10:10:44.456262Z"}
With that line in mind, was this refresh performed after the resources have been created, or is this a new configuration where you're running terraform refresh
before any terraform apply
has occurred?
Hi @justinretzolk!
I've created resource with terraform apply. After that I'm calling refresh
repeatedly. And sometimes (very rarely) refresh
ends with 'empty state' (resources
field empty)
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
All resources, but this time on
aws_nat_gateway
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Log from terraform refresh - https://gist.github.com/vaspahomov/94bff9821713b0d374888cf0ecdf29bd
Panic Output
Expected Behavior
State still exists after refresh and will be like -
Actual Behavior
State disappeared.
Steps to Reproduce
I can not reproduce stable. The problem happens sometimes after
terraform apply -refresh-only -auto-approve -input=false -lock=false -json
Important Factoids
I've found in log that provider 'produced an unexpected new value during refresh'
References
0000