Bug in "Working with Terraform, Lab: Terraform Commands"

Hi folks,

Terraform apply on /root/terraform-projects/project-shazam produces the error below. This is easily fixed with a “terraform init”, which is not part of the lab. Presumably the provider version installed in the lab needs to be updated or a step added to ensure “terraform init” is run during the lab.

===
Error: Provider produced inconsistent final plan

When expanding the plan for tls_cert_request.csr to include new values learned so far during apply, provider
Terraform Registry” produced an invalid new value for .private_key_pem: inconsistent values for sensitive
attribute.

This is a bug in the provider, which should be reported in the provider’s own issue tracker.

Yes there’s an issue, but it isn’t because terraform init hasn’t been run. If you do run it, it doesn’t change the state of the .terraform directory.

If you run terraform apply twice, it will work the second time.

Either way, I’ll report it to the lab team

1 Like