-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New Resource: aws_ecs_cluster_capacity_providers #22672
New Resource: aws_ecs_cluster_capacity_providers #22672
Conversation
bfe717d
to
5a52b93
Compare
5a52b93
to
d5166e7
Compare
@roberth-k You list this PR as related to #11409. However, you could make the argument that your PR fixes #11409, through use of this resource to make the association, and then avoiding the dependency block on delete. You can still run into the problem in the same way, using the |
…ingle cluster or error
9b7948f
to
1812535
Compare
@YakDriver In principle, the PR closes the headline of #11409. I chose to mark it as Relates as it doesn't resolve #5278, nor does it make a clear decision about whether the capacity provider attributes of I was planning to approach the remaining questions of #11409 separately once this PR is merged. |
Since the vast majority of upvotes for #11409 are likely from the error whilst destroying clusters and this PR provides the recommended way around that, let's have this PR close #11409. I recognize that a complete solution includes 1) resolving #5278, and 2) deprecating the capacity provider arguments (#22754). However, #5278 is already an issue and I've created an issue for deprecation (#22754). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor changes but looking very good:
Acceptance test output:
% make testacc TESTS=TestAccECSCluster PKG=ecs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20 -run='TestAccECSCluster' -timeout 180m
--- PASS: TestAccECSCluster_disappears (26.60s)
--- PASS: TestAccECSClusterDataSource_ecsCluster (29.15s)
--- PASS: TestAccECSClusterDataSource_ecsClusterContainerInsights (29.15s)
--- PASS: TestAccECSCluster_basic (29.60s)
--- PASS: TestAccECSCluster_tags (49.86s)
--- PASS: TestAccECSClusterCapacityProviders_disappears (52.17s)
--- PASS: TestAccECSClusterCapacityProviders_basic (52.19s)
--- PASS: TestAccECSClusterCapacityProviders_defaults (52.28s)
--- PASS: TestAccECSCluster_capacityProviders (52.54s)
--- PASS: TestAccECSCluster_capacityProvidersNoStrategy (55.50s)
--- PASS: TestAccECSCluster_configuration (56.24s)
--- PASS: TestAccECSCluster_containerInsights (68.45s)
--- PASS: TestAccECSCluster_capacityProvidersUpdate (84.96s)
--- PASS: TestAccECSCluster_singleCapacityProvider (106.63s)
--- PASS: TestAccECSClusterCapacityProviders_update_defaultCapacityProviderStrategy (119.66s)
--- PASS: TestAccECSClusterCapacityProviders_update_capacityProviders (119.88s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 121.190s
d3f73c5
to
f4c7937
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🎉
Output from acceptance tests (us-west-2
):
% make testacc TESTS=TestAccECSCluster PKG=ecs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20 -run='TestAccECSCluster' -timeout 180m
--- PASS: TestAccECSCluster_disappears (32.18s)
--- PASS: TestAccECSClusterDataSource_ecsCluster (36.98s)
--- PASS: TestAccECSClusterDataSource_ecsClusterContainerInsights (37.44s)
--- PASS: TestAccECSCluster_basic (40.06s)
--- PASS: TestAccECSClusterCapacityProviders_disappears (58.45s)
--- PASS: TestAccECSClusterCapacityProviders_defaults (63.82s)
--- PASS: TestAccECSClusterCapacityProviders_basic (63.85s)
--- PASS: TestAccECSCluster_capacityProvidersNoStrategy (66.59s)
--- PASS: TestAccECSCluster_capacityProviders (67.29s)
--- PASS: TestAccECSCluster_tags (69.36s)
--- PASS: TestAccECSCluster_configuration (73.15s)
--- PASS: TestAccECSCluster_containerInsights (84.24s)
--- PASS: TestAccECSCluster_capacityProvidersUpdate (91.86s)
--- PASS: TestAccECSCluster_singleCapacityProvider (103.78s)
--- PASS: TestAccECSClusterCapacityProviders_Update_capacityProviders (139.93s)
--- PASS: TestAccECSClusterCapacityProviders_Update_defaultStrategy (140.02s)
--- PASS: TestAccECSClusterCapacityProviders_destroy (237.35s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 238.879s
GovCloud:
% make testacc TESTS=TestAccECSCluster PKG=ecs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20 -run='TestAccECSCluster' -timeout 180m
--- PASS: TestAccECSCluster_disappears (39.75s)
--- PASS: TestAccECSClusterDataSource_ecsClusterContainerInsights (44.05s)
--- PASS: TestAccECSClusterDataSource_ecsCluster (44.06s)
--- PASS: TestAccECSCluster_basic (48.29s)
--- PASS: TestAccECSClusterCapacityProviders_disappears (58.49s)
--- PASS: TestAccECSClusterCapacityProviders_defaults (70.46s)
--- PASS: TestAccECSClusterCapacityProviders_basic (70.53s)
--- PASS: TestAccECSCluster_capacityProviders (76.30s)
--- PASS: TestAccECSCluster_configuration (81.95s)
--- PASS: TestAccECSCluster_tags (84.44s)
--- PASS: TestAccECSCluster_singleCapacityProvider (92.50s)
--- PASS: TestAccECSCluster_capacityProvidersNoStrategy (93.20s)
--- PASS: TestAccECSCluster_containerInsights (98.42s)
--- PASS: TestAccECSCluster_capacityProvidersUpdate (105.06s)
--- PASS: TestAccECSClusterCapacityProviders_Update_capacityProviders (159.09s)
--- PASS: TestAccECSClusterCapacityProviders_Update_defaultStrategy (159.12s)
--- PASS: TestAccECSClusterCapacityProviders_destroy (229.52s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 231.487s
This functionality has been released in v3.74.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Relates #5278
Relates #11351
Closes #11409
Closes #11531
Relates #22754
This is based on the S3 resource split, as it's a similar case of PUT-s modifying specific aspects of a resource.
In a similar vein it might make sense to deprecate the
capacity_providers
anddefault_capacity_provider_strategy
ofaws_ecs_cluster
in 4.0, but I'm not sure whether it's too late for that. In any case, this would be achieved in a separate PR.Output from acceptance testing: