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

ECS Service enums + eventual consistency for service-role #11423

Merged
merged 7 commits into from
Jan 3, 2020

Conversation

DrFaust92
Copy link
Collaborator

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11417

Release note for CHANGELOG:

NONE

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEcsService_'
--- PASS: TestAccAWSEcsService_withARN (119.91s)
--- PASS: TestAccAWSEcsService_basicImport (108.86s)
--- PASS: TestAccAWSEcsService_disappears (85.71s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (86.39s)
--- PASS: TestAccAWSEcsService_withCapacityProviderStrategy (217.09s)
--- PASS: TestAccAWSEcsService_withMultipleCapacityProviderStrategies (181.20s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (113.15s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (144.32s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (491.93s)
--- PASS: TestAccAWSEcsService_withIamRole (204.28s)
--- PASS: TestAccAWSEcsService_withDeploymentController_Type_CodeDeploy (425.01s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (88.47s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (88.05s)
--- PASS: TestAccAWSEcsService_withLbChanges (311.33s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (86.52s)
--- PASS: TestAccAWSEcsService_withAlb (318.14s)
--- PASS: TestAccAWSEcsService_withMultipleTargetGroups (343.37s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (309.91s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (97.22s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (88.17s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (272.64s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargateAndPlatformVersion (274.08s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (198.85s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (57.49s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (49.63s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (98.25s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (241.48s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (228.24s)
--- FAIL: TestAccAWSEcsService_Tags (24.47s)
    testing.go:640: Step 0 error: errors during apply:
        
        Error: InvalidParameterException: The new ARN and resource ID format must be enabled to add tags to the service. Opt in to the new format and try again.
        	status code: 400, request id: a95f242d-f39d-4a0c-b3d3-77aa58290108 "tf-acc-test-842556518505141709"

--- FAIL: TestAccAWSEcsService_ManagedTags (25.97s)
    testing.go:640: Step 0 error: errors during apply:
        
        Error: InvalidParameterException: The new ARN and resource ID format must be enabled to work with ECS managed tags. Opt in to the new format and try again.
        	status code: 400, request id: 4b45ee96-fb50-49fb-a7fd-362c638e709b "tf-acc-test-842556518505141709"
        
--- FAIL: TestAccAWSEcsService_PropagateTags (26.38s)
    testing.go:640: Step 0 error: errors during apply:
        
        Error: InvalidParameterException: The new ARN and resource ID format must be enabled to work with ECS managed tags. Opt in to the new format and try again.
        	status code: 400, request id: 1d0d6c37-1f1a-43d9-b002-2979eb79009f "tf-acc-test-842556518505141709"
...

@DrFaust92 DrFaust92 requested a review from a team December 25, 2019 22:27
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. service/ecs Issues and PRs that pertain to the ecs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 25, 2019
@bflad bflad added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 2, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DrFaust92 👋 Thanks for submitting this. The updates to the acceptance test are currently failing, but otherwise these changes look okay.

In general, we would prefer if the unrelated changes (the bug fix, technical debt updates to the testing, and validation enhancements) were submitted separately just so we can merge bug fixes first if possible. This also helps us better note operator-facing changes in the CHANGELOG since this would require entries in multiple sections:

ENHANCEMENTS:

* resource/aws_ecs_service: Add plan time validation for `launch_type`, `load_balancer` configuration block `target_group_arn` and `container_port`, and `placement_constraints` configuration block `type` arguments [GH-11423]

BUG FIXES:

* resource/aws_ecs_service: Automatically retry IAM Service Linked Role error on creation due to asynchronous creation of role on first usage and IAM eventual consistency [GH-11423]

Thanks. 😄

aws/resource_aws_ecs_service_test.go Outdated Show resolved Hide resolved
@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Jan 2, 2020
@DrFaust92 DrFaust92 closed this Jan 2, 2020
@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Jan 2, 2020
@DrFaust92 DrFaust92 reopened this Jan 2, 2020
@DrFaust92
Copy link
Collaborator Author

@bflad, Sorry about that. will split these up next time.

@DrFaust92
Copy link
Collaborator Author

--- PASS: TestAccAWSEcsService_withARN (119.39s)
--- PASS: TestAccAWSEcsService_basicImport (80.88s)
--- PASS: TestAccAWSEcsService_disappears (74.58s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (81.07s)
--- PASS: TestAccAWSEcsService_withCapacityProviderStrategy (188.70s)
--- PASS: TestAccAWSEcsService_withMultipleCapacityProviderStrategies (168.71s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (114.97s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (162.16s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (396.77s)
--- PASS: TestAccAWSEcsService_withIamRole (140.96s)
--- PASS: TestAccAWSEcsService_withDeploymentController_Type_CodeDeploy (365.29s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (94.20s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (83.91s)
--- PASS: TestAccAWSEcsService_withLbChanges (257.87s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (84.84s)
--- PASS: TestAccAWSEcsService_withAlb (361.28s)
--- PASS: TestAccAWSEcsService_withMultipleTargetGroups (356.18s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (299.61s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (92.68s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (78.63s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (241.87s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargateAndPlatformVersion (239.29s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (169.12s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (48.40s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (48.88s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (82.39s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (203.61s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (204.40s)
--- PASS: TestAccAWSEcsService_Tags (156.22s)
--- PASS: TestAccAWSEcsService_ManagedTags (79.78s)
--- PASS: TestAccAWSEcsService_PropagateTags (208.96s)

@DrFaust92 DrFaust92 requested a review from bflad January 2, 2020 21:58
@bflad bflad self-assigned this Jan 3, 2020
@bflad bflad added this to the v2.44.0 milestone Jan 3, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for these updates, @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccAWSEcsService_basicImport (71.79s)
--- PASS: TestAccAWSEcsService_disappears (57.94s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (276.32s)
--- PASS: TestAccAWSEcsService_ManagedTags (52.67s)
--- PASS: TestAccAWSEcsService_PropagateTags (183.42s)
--- PASS: TestAccAWSEcsService_Tags (64.17s)
--- PASS: TestAccAWSEcsService_withAlb (259.80s)
--- PASS: TestAccAWSEcsService_withARN (79.09s)
--- PASS: TestAccAWSEcsService_withCapacityProviderStrategy (176.03s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (53.32s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (43.60s)
--- PASS: TestAccAWSEcsService_withDeploymentController_Type_CodeDeploy (280.11s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (72.30s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (72.28s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (81.11s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (76.29s)
--- PASS: TestAccAWSEcsService_withIamRole (156.20s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (74.68s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (111.62s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargateAndPlatformVersion (172.06s)
--- PASS: TestAccAWSEcsService_withLbChanges (166.77s)
--- PASS: TestAccAWSEcsService_withMultipleCapacityProviderStrategies (124.27s)
--- PASS: TestAccAWSEcsService_withMultipleTargetGroups (310.64s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (73.55s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (72.31s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (203.05s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (102.43s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (73.27s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (152.38s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (142.99s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (71.10s)
--- PASS: TestAccAWSEcsServiceDataSource_basic (73.13s)

@bflad bflad merged commit 1d5f9dd into hashicorp:master Jan 3, 2020
bflad added a commit that referenced this pull request Jan 3, 2020
@ghost
Copy link

ghost commented Jan 10, 2020

This has been released in version 2.44.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 27, 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 Mar 27, 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. enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When creating ECS service on a new cluster, the service linked role doesn't exist yet
2 participants