Skip to content

Commit

Permalink
provider/aws: Add ARN as an exported param for aws_ecs_cluster (#991)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
stack72 authored Jun 28, 2017
1 parent 7e7c7df commit 5ad5228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions aws/data_source_aws_ecs_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func dataSourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error
continue
}
d.SetId(aws.StringValue(cluster.ClusterArn))
d.Set("arn", cluster.ClusterArn)
d.Set("status", cluster.Status)
d.Set("pending_tasks_count", cluster.PendingTasksCount)
d.Set("running_tasks_count", cluster.RunningTasksCount)
Expand Down
1 change: 1 addition & 0 deletions aws/data_source_aws_ecs_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestAccAWSEcsDataSource_ecsCluster(t *testing.T) {
resource.TestCheckResourceAttr("data.aws_ecs_cluster.default", "pending_tasks_count", "0"),
resource.TestCheckResourceAttr("data.aws_ecs_cluster.default", "running_tasks_count", "0"),
resource.TestCheckResourceAttr("data.aws_ecs_cluster.default", "registered_container_instances_count", "0"),
resource.TestCheckResourceAttrSet("data.aws_ecs_cluster.default", "arn"),
),
},
},
Expand Down

0 comments on commit 5ad5228

Please sign in to comment.