Any way to view the detailed Terraform plan for a workspace update?

I am experiencing weird issues with the AWS terraform provider that I could troubleshoot if I knew what configuration had drifted when I run an update. Right now, I get output like:
coder_agent.main: Drift detected (update)
module.network.aws_instance.services[0]: Plan to update
module.network.aws_route53_record.main[0]: Plan to update
Plan: 0 to add, 2 to change, 0 to destroy.
coder_agent.main: Drift detected (update)
module.network.aws_instance.services[0]: Plan to update
module.network.aws_route53_record.main[0]: Plan to update
Plan: 0 to add, 2 to change, 0 to destroy.
but it does not show me the actual changes to the Route53 record that it intends to make, like terraform would in normal standalone execution, and then I get this error:
When expanding the plan for module.network.aws_route53_record.main[0] to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .records: planned set element cty.StringVal("REDACTED IP ADDRESS THAT HAS NOTHING TO DO WITH THIS CODER WORKSPACE AND IDK WHERE IT EVEN CAME FROM") does not correlate with any element in actual.
This is a bug in the provider, which should be reported in the provider's own issue tracker.
When expanding the plan for module.network.aws_route53_record.main[0] to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .records: planned set element cty.StringVal("REDACTED IP ADDRESS THAT HAS NOTHING TO DO WITH THIS CODER WORKSPACE AND IDK WHERE IT EVEN CAME FROM") does not correlate with any element in actual.
This is a bug in the provider, which should be reported in the provider's own issue tracker.
This might indeed be an upstream bug, but there should not be anything changing about the Route 53 DNS record here; so I want to figure out what's going on with the plan to avoid the situation entirely.
6 Replies
Codercord
Codercord3mo ago
<#1278507453025222677>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Plotly Mike
Plotly MikeOP3mo ago
I think I tracked this to a change in the user_data I was feeding to an AWS instance, but it took a long time to get to that.
Phorcys
Phorcys3mo ago
yes, it does look to me like an upstream bug in the provider you can set the TF_LOG environment variable to debug when you encounter problems with Terraform templates, this helps to get more meaningful logs, but I think we should highlight this in the docs if I recall correctly, all TF_* vars are passed to Terraform when the Coder provisioner runs it I'm not sure you would get a more detailed plan but the logs should help to narrow down where the issue comes from
Plotly Mike
Plotly MikeOP3mo ago
Thanks, I will set that on the Coder pod the next time I run into one of these
Phorcys
Phorcys3mo ago
good to know that this is solved!
Codercord
Codercord3mo ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server