-
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
r/ecs_service: Added ordered placement strategy #4390
r/ecs_service: Added ordered placement strategy #4390
Conversation
@atsushi-ishibashi Can't wait for this! :) |
if err := d.Set("placement_strategy", flattenPlacementStrategy(service.PlacementStrategy)); err != nil { | ||
log.Printf("[ERR] Error setting placement_strategy for (%s): %s", d.Id(), err) | ||
if _, ok := d.GetOk("placement_strategy"); ok { | ||
d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)) |
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.
We should check for errors when setting non-scalar values into the Terraform state:
if err := d.Set("placement_strategy", flattenPlacementStrategyDeprecated(service.PlacementStrategy)); err != nil {
return fmt.Errorf("error setting placement_strategy: %s", err)
}
I will fix this for both of these on merge.
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.
Thanks for this @atsushi-ishibashi, looks good 🚀
make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcsService'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSEcsService -timeout 120m
=== RUN TestAccAWSEcsService_withARN
--- PASS: TestAccAWSEcsService_withARN (39.34s)
=== RUN TestAccAWSEcsService_basicImport
--- PASS: TestAccAWSEcsService_basicImport (33.45s)
=== RUN TestAccAWSEcsService_withUnnormalizedPlacementStrategy
--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (41.26s)
=== RUN TestAccAWSEcsService_withFamilyAndRevision
--- PASS: TestAccAWSEcsService_withFamilyAndRevision (36.92s)
=== RUN TestAccAWSEcsService_withRenamedCluster
--- PASS: TestAccAWSEcsService_withRenamedCluster (82.45s)
=== RUN TestAccAWSEcsService_healthCheckGracePeriodSeconds
--- PASS: TestAccAWSEcsService_healthCheckGracePeriodSeconds (289.60s)
=== RUN TestAccAWSEcsService_withIamRole
--- PASS: TestAccAWSEcsService_withIamRole (115.29s)
=== RUN TestAccAWSEcsService_withDeploymentValues
--- PASS: TestAccAWSEcsService_withDeploymentValues (31.31s)
=== RUN TestAccAWSEcsService_withLbChanges
--- PASS: TestAccAWSEcsService_withLbChanges (237.38s)
=== RUN TestAccAWSEcsService_withEcsClusterName
--- PASS: TestAccAWSEcsService_withEcsClusterName (41.86s)
=== RUN TestAccAWSEcsService_withAlb
--- PASS: TestAccAWSEcsService_withAlb (265.51s)
=== RUN TestAccAWSEcsService_withPlacementStrategy
--- PASS: TestAccAWSEcsService_withPlacementStrategy (75.28s)
=== RUN TestAccAWSEcsService_withPlacementConstraints
--- PASS: TestAccAWSEcsService_withPlacementConstraints (53.16s)
=== RUN TestAccAWSEcsService_withPlacementConstraints_emptyExpression
--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (17.99s)
=== RUN TestAccAWSEcsService_withLaunchTypeFargate
--- PASS: TestAccAWSEcsService_withLaunchTypeFargate (210.09s)
=== RUN TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration
--- PASS: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (49.96s)
=== RUN TestAccAWSEcsService_withServiceRegistries
--- PASS: TestAccAWSEcsService_withServiceRegistries (50.93s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1671.811s
Thank you so much, @atsushi-ishibashi! This is a tremendous help! |
Thanks to @bflad and the Hashicorp team for getting this in as well! |
This has been released in version 1.17.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Related: #1476
TestAccAWSEcsService_withLaunchTypeFargate
isn't associated with this change.