Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect documentation for datasource aws_ecs_cluster #988

Closed
zoltan-toth-mw opened this issue Jun 28, 2017 · 2 comments · Fixed by #991
Closed

Incorrect documentation for datasource aws_ecs_cluster #988

zoltan-toth-mw opened this issue Jun 28, 2017 · 2 comments · Fixed by #991
Assignees
Labels
bug Addresses a defect in current functionality.

Comments

@zoltan-toth-mw
Copy link

Hi there,

According to the documentation the aws_ecs_cluster datasource exports the arn attribute.
However when I tried to use it terraform told me that it doesn't exists:

Resource 'data.aws_ecs_cluster.pub' does not have attribute 'arn' for variable 'data.aws_ecs_cluster.pub.arn'

I also checked the aws_ecs_cluster resource documentation which exports the arn as an attribute called id. Referring to id "${data.aws_ecs_cluster.pub.id}" instead of arn solved the problem.

So the documentation is incorrect. aws_ecs_cluster datasource exports an id attirbute (containing the arn) instead of arn as the documentation says.

Terraform Version

0.9.8

Affected Resource(s)

datasource aws_ecs_cluster

Terraform Configuration Files

data "aws_ecs_cluster" "pub" {
  cluster_name = "${var.public_cluster_name}"
}
resource "aws_ecs_service" "service" {
  cluster = "${data.aws_ecs_cluster.pub.arn}" # no arn exists but id
}
@stack72 stack72 added the bug Addresses a defect in current functionality. label Jun 28, 2017
@stack72
Copy link
Contributor

stack72 commented Jun 28, 2017

Hi @zoltan-toth-mw

Apologies for this - PR in progress to fix this for the next release :)

Paul

@stack72 stack72 self-assigned this Jun 28, 2017
stack72 added a commit that referenced this issue Jun 28, 2017
Fixes: #988

```
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcsDataSource'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEcsDataSource -timeout 120m
=== RUN   TestAccAWSEcsDataSource_ecsCluster
--- PASS: TestAccAWSEcsDataSource_ecsCluster (116.89s)
=== RUN   TestAccAWSEcsDataSource_ecsContainerDefinition
--- PASS: TestAccAWSEcsDataSource_ecsContainerDefinition (116.93s)
=== RUN   TestAccAWSEcsDataSource_ecsTaskDefinition
--- PASS: TestAccAWSEcsDataSource_ecsTaskDefinition (30.72s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	264.579s
```
stack72 added a commit that referenced this issue Jun 28, 2017
Fixes: #988

```
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcsDataSource'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEcsDataSource -timeout 120m
=== RUN   TestAccAWSEcsDataSource_ecsCluster
--- PASS: TestAccAWSEcsDataSource_ecsCluster (116.89s)
=== RUN   TestAccAWSEcsDataSource_ecsContainerDefinition
--- PASS: TestAccAWSEcsDataSource_ecsContainerDefinition (116.93s)
=== RUN   TestAccAWSEcsDataSource_ecsTaskDefinition
--- PASS: TestAccAWSEcsDataSource_ecsTaskDefinition (30.72s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	264.579s
```
@ghost
Copy link

ghost commented Apr 12, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants