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

r/ecs_service: add enable_ecs_managed_tags attribute #6544

Merged
merged 1 commit into from
Nov 25, 2018

Conversation

kl4w
Copy link
Contributor

@kl4w kl4w commented Nov 21, 2018

Fixes #6542

Changes proposed in this pull request:

  • add enable_ecs_managed_tags attribute

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcsService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSEcsService_ -timeout 120m
=== RUN   TestAccAWSEcsService_withARN
=== PAUSE TestAccAWSEcsService_withARN
=== RUN   TestAccAWSEcsService_basicImport
=== PAUSE TestAccAWSEcsService_basicImport
=== RUN   TestAccAWSEcsService_disappears
=== PAUSE TestAccAWSEcsService_disappears
=== RUN   TestAccAWSEcsService_withUnnormalizedPlacementStrategy
=== PAUSE TestAccAWSEcsService_withUnnormalizedPlacementStrategy
=== RUN   TestAccAWSEcsService_withFamilyAndRevision
=== PAUSE TestAccAWSEcsService_withFamilyAndRevision
=== RUN   TestAccAWSEcsService_withRenamedCluster
=== PAUSE TestAccAWSEcsService_withRenamedCluster
=== RUN   TestAccAWSEcsService_healthCheckGracePeriodSeconds
=== PAUSE TestAccAWSEcsService_healthCheckGracePeriodSeconds
=== RUN   TestAccAWSEcsService_withIamRole
=== PAUSE TestAccAWSEcsService_withIamRole
=== RUN   TestAccAWSEcsService_withDeploymentValues
=== PAUSE TestAccAWSEcsService_withDeploymentValues
=== RUN   TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred
=== PAUSE TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred
=== RUN   TestAccAWSEcsService_withLbChanges
=== PAUSE TestAccAWSEcsService_withLbChanges
=== RUN   TestAccAWSEcsService_withEcsClusterName
=== PAUSE TestAccAWSEcsService_withEcsClusterName
=== RUN   TestAccAWSEcsService_withAlb
=== PAUSE TestAccAWSEcsService_withAlb
=== RUN   TestAccAWSEcsService_withPlacementStrategy
=== PAUSE TestAccAWSEcsService_withPlacementStrategy
=== RUN   TestAccAWSEcsService_withPlacementConstraints
=== PAUSE TestAccAWSEcsService_withPlacementConstraints
=== RUN   TestAccAWSEcsService_withPlacementConstraints_emptyExpression
=== PAUSE TestAccAWSEcsService_withPlacementConstraints_emptyExpression
=== RUN   TestAccAWSEcsService_withLaunchTypeFargate
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (214.79s)
=== RUN   TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration
=== PAUSE TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration
=== RUN   TestAccAWSEcsService_withDaemonSchedulingStrategy
=== PAUSE TestAccAWSEcsService_withDaemonSchedulingStrategy
=== RUN   TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum
=== PAUSE TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum
=== RUN   TestAccAWSEcsService_withReplicaSchedulingStrategy
=== PAUSE TestAccAWSEcsService_withReplicaSchedulingStrategy
=== RUN   TestAccAWSEcsService_withServiceRegistries
=== PAUSE TestAccAWSEcsService_withServiceRegistries
=== RUN   TestAccAWSEcsService_withServiceRegistries_container
=== PAUSE TestAccAWSEcsService_withServiceRegistries_container
=== RUN   TestAccAWSEcsService_Tags
=== PAUSE TestAccAWSEcsService_Tags
=== RUN   TestAccAWSEcsService_ManagedTags
=== PAUSE TestAccAWSEcsService_ManagedTags
=== CONT  TestAccAWSEcsService_withARN
=== CONT  TestAccAWSEcsService_withPlacementStrategy
=== CONT  TestAccAWSEcsService_ManagedTags
=== CONT  TestAccAWSEcsService_Tags
=== CONT  TestAccAWSEcsService_withServiceRegistries_container
=== CONT  TestAccAWSEcsService_withServiceRegistries
=== CONT  TestAccAWSEcsService_withReplicaSchedulingStrategy
=== CONT  TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum
=== CONT  TestAccAWSEcsService_withDaemonSchedulingStrategy
=== CONT  TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration
=== CONT  TestAccAWSEcsService_withPlacementConstraints_emptyExpression
=== CONT  TestAccAWSEcsService_withIamRole
=== CONT  TestAccAWSEcsService_withAlb
=== CONT  TestAccAWSEcsService_withEcsClusterName
=== CONT  TestAccAWSEcsService_withLbChanges
=== CONT  TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred
=== CONT  TestAccAWSEcsService_withDeploymentValues
=== CONT  TestAccAWSEcsService_withFamilyAndRevision
=== CONT  TestAccAWSEcsService_healthCheckGracePeriodSeconds
=== CONT  TestAccAWSEcsService_withRenamedCluster
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (14.14s)
=== CONT  TestAccAWSEcsService_disappears
--- PASS: TestAccAWSEcsService_withDeploymentValues (14.70s)
=== CONT  TestAccAWSEcsService_withUnnormalizedPlacementStrategy
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (16.66s)
=== CONT  TestAccAWSEcsService_basicImport
--- PASS: TestAccAWSEcsService_disappears (13.27s)
=== CONT  TestAccAWSEcsService_withPlacementConstraints
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (29.78s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (29.81s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (30.81s)
--- PASS: TestAccAWSEcsService_ManagedTags (31.15s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (20.60s)
--- PASS: TestAccAWSEcsService_withARN (36.67s)
--- PASS: TestAccAWSEcsService_Tags (46.63s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (48.43s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (50.34s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (51.48s)
--- PASS: TestAccAWSEcsService_basicImport (42.16s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (39.28s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (94.28s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (103.02s)
--- PASS: TestAccAWSEcsService_withIamRole (114.71s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (201.11s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (211.76s)
--- PASS: TestAccAWSEcsService_withLbChanges (229.74s)
--- PASS: TestAccAWSEcsService_withAlb (260.76s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (277.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	492.122s

@ghost ghost added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ecs Issues and PRs that pertain to the ecs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 21, 2018
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 21, 2018
@bflad bflad added this to the v1.47.0 milestone Nov 25, 2018
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.

LGTM, thanks @kl4w! 🚀

--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (10.61s)
--- PASS: TestAccAWSEcsService_withARN (12.47s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints (12.62s)
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (14.01s)
--- PASS: TestAccAWSEcsService_withEcsClusterName (16.04s)
--- PASS: TestAccAWSEcsService_disappears (21.21s)
--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (11.30s)
--- PASS: TestAccAWSEcsService_withIamRole (25.95s)
--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategySetDeploymentMinimum (27.20s)
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (34.30s)
--- PASS: TestAccAWSEcsService_basicImport (34.55s)
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (34.75s)
--- PASS: TestAccAWSEcsService_ManagedTags (19.14s)
--- PASS: TestAccAWSEcsService_withDeploymentMinimumZeroMaximumOneHundred (44.19s)
--- PASS: TestAccAWSEcsService_withDeploymentValues (44.33s)
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (45.47s)
--- PASS: TestAccAWSEcsService_Tags (34.96s)
--- PASS: TestAccAWSEcsService_withPlacementStrategy (58.90s)
--- PASS: TestAccAWSEcsService_withRenamedCluster (65.43s)
--- PASS: TestAccAWSEcsService_withLbChanges (125.63s)
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (166.39s)
--- PASS: TestAccAWSEcsService_withServiceRegistries_container (168.80s)
--- PASS: TestAccAWSEcsService_withServiceRegistries (178.79s)
--- PASS: TestAccAWSEcsService_withAlb (206.57s)
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (234.57s)

Check: resource.ComposeTestCheckFunc(
testAccCheckAWSEcsServiceExists(resourceName, &service),
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
resource.TestCheckResourceAttr(resourceName, "enable_ecs_managed_tags", "true"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Generally its good to verify the default value in one of the "basic" acceptance tests somewhere too 👍

@bflad bflad merged commit 9bbdfff into hashicorp:master Nov 25, 2018
bflad added a commit that referenced this pull request Nov 25, 2018
@kl4w kl4w deleted the ecs-service-managed-tags branch November 26, 2018 15:14
@bflad
Copy link
Contributor

bflad commented Nov 30, 2018

This was released (4 days ago) in version 1.47.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@@ -56,6 +56,12 @@ func resourceAwsEcsService() *schema.Resource {
},
},

"enable_ecs_managed_tags": {

Choose a reason for hiding this comment

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

should this be setting ForceNew: true? From what I can see, this property is only configurable during the initial creation of a service and not for UpdateService API. If I try to flip it on for an existing service, TF plan repeatedly tries to re-set it back to true because the updates aren't going through.

@ghost
Copy link

ghost commented Mar 31, 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 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service. size/M 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.

Add ECS service managed tags
3 participants