Jayesh Dhandha
Jayesh Dhandha

Reputation: 2119

Resource 'data.template_file.user_data' does not have attribute 'rendered'

Terraform Version : v0.11.8

Use case

Try to terminate the resources using terraform, got error while running output command.

Code:

output "frontend_rendered" {
  value = "${data.template_file.user_data.rendered}"
}

Debug Output

module.test.output.test_rendered: Resource 'data.template_file.user_data' does not have attribute 'rendered' for variable 'data.template_file.user_data.rendered'

Expected Behavior

Termination without any error.

Additional Context

This issue came after i upgraded terraform from v0.11.4 to v0.11.8 and i have also updated the aws provider to latest 1.33.0

Any help?

Thanks!

Upvotes: 1

Views: 909

Answers (1)

Jayesh Dhandha
Jayesh Dhandha

Reputation: 2119

Finally i was able to find the solution.

After Terraform v0.11.4, we shouldn't evaluate unused outputs during a full destroy operation.

enter image description here

Upvotes: 2

Related Questions