Skip to content

Commit

Permalink
Fix ECS cluster ARN attribute name/value for aws_batch_compute_enviro…
Browse files Browse the repository at this point in the history
…nment resource (#1809)

* Fix ECS cluster ARN attribute name/value

* Allow both ecc/ecs attribute names, add deprecation warning
  • Loading branch information
rxacevedo authored and radeksimko committed Oct 5, 2017
1 parent cd61725 commit 7a9516b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion aws/resource_aws_batch_compute_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ func resourceAwsBatchComputeEnvironment() *schema.Resource {
Computed: true,
},
"ecc_cluster_arn": {
Type: schema.TypeString,
Computed: true,
Deprecated: "Use ecs_cluster_arn instead",
},
"ecs_cluster_arn": {
Type: schema.TypeString,
Computed: true,
},
Expand Down Expand Up @@ -266,7 +271,8 @@ func resourceAwsBatchComputeEnvironmentRead(d *schema.ResourceData, meta interfa
}

d.Set("arn", computeEnvironment.ComputeEnvironmentArn)
d.Set("ecc_cluster_arn", computeEnvironment.ComputeEnvironmentArn)
d.Set("ecc_cluster_arn", computeEnvironment.EcsClusterArn)
d.Set("ecs_cluster_arn", computeEnvironment.EcsClusterArn)
d.Set("status", computeEnvironment.Status)
d.Set("status_reason", computeEnvironment.StatusReason)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/batch_compute_environment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ resource "aws_batch_compute_environment" "sample" {
## Attributes Reference

* `arn` - The Amazon Resource Name (ARN) of the compute environment.
* `ecc_cluster_arn` - The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
* `ecs_cluster_arn` - The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
* `status` - The current status of the compute environment (for example, CREATING or VALID).
* `status_reason` - A short, human-readable string to provide additional details about the current status of the compute environment.

Expand Down

0 comments on commit 7a9516b

Please sign in to comment.