作者:大爱保罗2502904621 | 来源:互联网 | 2023-09-14 11:01
This issue was originally opened by as hashicorp/terraform#16819. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
1 2 3 4 5 6 7 8 9 10
| hcl
# main.tf
resource "aws_ecs_cluster" "cluster" {
name = "cluster"
}
output "arn" {
value = "${aws_ecs_cluster.cluster.arn}"
} |
### Debug Output
### Crash Output
### Expected Behavior
Running with Terraform v0.10.8 is OK:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ aws_ecs_cluster.cluster
id:
name: "cluster"
Plan: 1 to add, 0 to change, 0 to destroy.
|
### Actual Behavior
Running with Terraform v0.11.0 FAILS:
1 2 3 4 5 6 7 8 9 10
| Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
Error: Error running plan: 1 error(s) occurred:
* output.arn: Resource 'aws_ecs_cluster.cluster' does not have attribute 'arn' for variable 'aws_ecs_cluster.cluster.arn' |
### Steps to Reproduce
### Important Factoids
According to [docs](https://www.terraform.io/docs/providers/aws/r/ecs_cluster.html), `aws_ecs_cluster` does NOT expose `arn` as an output, but it worked until v0.11.0
### References
该提问来源于开源项目:hashicorp/terraform-provider-aws
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!