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

Use placement group in spot fleet requests when it is specified #10103

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

ryndaniels
Copy link
Contributor

Looking at the API, this probably should get set if it is present in the schema.

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #6713

Release note for CHANGELOG:

BUG FIXES:
* resource/aws_spot_fleet_request: Placement group names in launch specifications no longer get ignored

Output from acceptance testing:

$ make testacc TESTARGS="-run=TestAccAWSSpotFleetRequest_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSSpotFleetRequest_ -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSSpotFleetRequest_basic
=== PAUSE TestAccAWSSpotFleetRequest_basic
=== RUN   TestAccAWSSpotFleetRequest_associatePublicIpAddress
=== PAUSE TestAccAWSSpotFleetRequest_associatePublicIpAddress
=== RUN   TestAccAWSSpotFleetRequest_instanceInterruptionBehavior
=== PAUSE TestAccAWSSpotFleetRequest_instanceInterruptionBehavior
=== RUN   TestAccAWSSpotFleetRequest_fleetType
=== PAUSE TestAccAWSSpotFleetRequest_fleetType
=== RUN   TestAccAWSSpotFleetRequest_iamInstanceProfileArn
=== PAUSE TestAccAWSSpotFleetRequest_iamInstanceProfileArn
=== RUN   TestAccAWSSpotFleetRequest_changePriceForcesNewRequest
=== PAUSE TestAccAWSSpotFleetRequest_changePriceForcesNewRequest
=== RUN   TestAccAWSSpotFleetRequest_updateTargetCapacity
=== PAUSE TestAccAWSSpotFleetRequest_updateTargetCapacity
=== RUN   TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy
=== PAUSE TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy
=== RUN   TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion
=== PAUSE TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion
=== RUN   TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList
=== PAUSE TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList
=== RUN   TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList
=== PAUSE TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList
=== RUN   TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz
=== PAUSE TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz
=== RUN   TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet
=== PAUSE TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet
=== RUN   TestAccAWSSpotFleetRequest_overriddingSpotPrice
=== PAUSE TestAccAWSSpotFleetRequest_overriddingSpotPrice
=== RUN   TestAccAWSSpotFleetRequest_withoutSpotPrice
=== PAUSE TestAccAWSSpotFleetRequest_withoutSpotPrice
=== RUN   TestAccAWSSpotFleetRequest_diversifiedAllocation
=== PAUSE TestAccAWSSpotFleetRequest_diversifiedAllocation
=== RUN   TestAccAWSSpotFleetRequest_multipleInstancePools
=== PAUSE TestAccAWSSpotFleetRequest_multipleInstancePools
=== RUN   TestAccAWSSpotFleetRequest_withWeightedCapacity
=== PAUSE TestAccAWSSpotFleetRequest_withWeightedCapacity
=== RUN   TestAccAWSSpotFleetRequest_withEBSDisk
=== PAUSE TestAccAWSSpotFleetRequest_withEBSDisk
=== RUN   TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId
=== PAUSE TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId
=== RUN   TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId
=== PAUSE TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId
=== RUN   TestAccAWSSpotFleetRequest_withTags
=== PAUSE TestAccAWSSpotFleetRequest_withTags
=== RUN   TestAccAWSSpotFleetRequest_placementTenancyAndGroup
=== PAUSE TestAccAWSSpotFleetRequest_placementTenancyAndGroup
=== RUN   TestAccAWSSpotFleetRequest_WithELBs
=== PAUSE TestAccAWSSpotFleetRequest_WithELBs
=== RUN   TestAccAWSSpotFleetRequest_WithTargetGroups
=== PAUSE TestAccAWSSpotFleetRequest_WithTargetGroups
=== CONT  TestAccAWSSpotFleetRequest_basic
=== CONT  TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet
=== CONT  TestAccAWSSpotFleetRequest_overriddingSpotPrice
=== CONT  TestAccAWSSpotFleetRequest_WithTargetGroups
=== CONT  TestAccAWSSpotFleetRequest_WithELBs
=== CONT  TestAccAWSSpotFleetRequest_placementTenancyAndGroup
=== CONT  TestAccAWSSpotFleetRequest_withTags
=== CONT  TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId
=== CONT  TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId
=== CONT  TestAccAWSSpotFleetRequest_withEBSDisk
=== CONT  TestAccAWSSpotFleetRequest_withWeightedCapacity
=== CONT  TestAccAWSSpotFleetRequest_multipleInstancePools
=== CONT  TestAccAWSSpotFleetRequest_diversifiedAllocation
=== CONT  TestAccAWSSpotFleetRequest_updateTargetCapacity
=== CONT  TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz
=== CONT  TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList
=== CONT  TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList
=== CONT  TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion
=== CONT  TestAccAWSSpotFleetRequest_changePriceForcesNewRequest
=== CONT  TestAccAWSSpotFleetRequest_withoutSpotPrice
--- PASS: TestAccAWSSpotFleetRequest_placementTenancyAndGroup (78.75s)
=== CONT  TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId (160.24s)
=== CONT  TestAccAWSSpotFleetRequest_fleetType
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId (161.63s)
=== CONT  TestAccAWSSpotFleetRequest_associatePublicIpAddress
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList (274.85s)
=== CONT  TestAccAWSSpotFleetRequest_iamInstanceProfileArn
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet (274.91s)
=== CONT  TestAccAWSSpotFleetRequest_instanceInterruptionBehavior
--- PASS: TestAccAWSSpotFleetRequest_WithELBs (320.21s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion (332.26s)
--- PASS: TestAccAWSSpotFleetRequest_withWeightedCapacity (334.06s)
--- PASS: TestAccAWSSpotFleetRequest_withoutSpotPrice (335.68s)
--- PASS: TestAccAWSSpotFleetRequest_withTags (337.31s)
--- PASS: TestAccAWSSpotFleetRequest_diversifiedAllocation (406.59s)
--- PASS: TestAccAWSSpotFleetRequest_fleetType (249.62s)
--- PASS: TestAccAWSSpotFleetRequest_associatePublicIpAddress (250.12s)
--- PASS: TestAccAWSSpotFleetRequest_withEBSDisk (413.81s)
--- PASS: TestAccAWSSpotFleetRequest_overriddingSpotPrice (414.89s)    
--- PASS: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest (465.94s)
--- PASS: TestAccAWSSpotFleetRequest_WithTargetGroups (451.52s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstancePools (477.37s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList (479.62s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz (480.14s)
--- PASS: TestAccAWSSpotFleetRequest_basic (487.09s)
--- PASS: TestAccAWSSpotFleetRequest_iamInstanceProfileArn (267.28s)
--- PASS: TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy (465.85s)
--- PASS: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (270.67s)
--- PASS: TestAccAWSSpotFleetRequest_updateTargetCapacity (882.71s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       883.867s

@ryndaniels ryndaniels requested review from aeschright and a team September 13, 2019 16:12
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 13, 2019
@bflad bflad added the bug Addresses a defect in current functionality. label Sep 24, 2019
@bflad bflad added this to the v2.30.0 milestone Sep 24, 2019
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 🚀

--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId (138.65s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList (241.25s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList (242.34s)
--- PASS: TestAccAWSSpotFleetRequest_withoutSpotPrice (245.56s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet (246.23s)
--- PASS: TestAccAWSSpotFleetRequest_associatePublicIpAddress (253.14s)
--- SKIP: TestAccAWSSpotFleetRequest_WithInstanceStoreAmi (0.00s)
--- PASS: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (253.80s)
--- PASS: TestAccAWSSpotFleetRequest_iamInstanceProfileArn (256.04s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion (256.06s)
--- PASS: TestAccAWSSpotFleetRequest_withEBSDisk (255.88s)
--- PASS: TestAccAWSSpotFleetRequest_fleetType (261.50s)
--- PASS: TestAccAWSSpotFleetRequest_basic (263.14s)
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId (137.75s)
--- PASS: TestAccAWSSpotFleetRequest_placementTenancyAndGroup (58.79s)
--- PASS: TestAccAWSSpotFleetRequest_withWeightedCapacity (314.07s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstancePools (316.38s)
--- PASS: TestAccAWSSpotFleetRequest_diversifiedAllocation (316.73s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz (319.66s)
--- PASS: TestAccAWSSpotFleetRequest_overriddingSpotPrice (321.58s)
--- PASS: TestAccAWSSpotFleetRequest_withTags (284.47s)
--- PASS: TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy (527.23s)
--- PASS: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest (527.64s)
--- PASS: TestAccAWSSpotFleetRequest_WithELBs (360.42s)
--- PASS: TestAccAWSSpotFleetRequest_WithTargetGroups (404.70s)
--- PASS: TestAccAWSSpotFleetRequest_updateTargetCapacity (721.99s)

@@ -620,7 +620,7 @@ func TestAccAWSSpotFleetRequest_withTags(t *testing.T) {
})
}

func TestAccAWSSpotFleetRequest_placementTenancy(t *testing.T) {
func TestAccAWSSpotFleetRequest_placementTenancyAndGroup(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: It is generally preferable to create new testing rather than modify existing tests to ensure we do not introduce regressions (even if it is very verbose to do so). 👍

@bflad bflad merged commit e713b84 into master Sep 24, 2019
@bflad bflad deleted the rfd-placement-group branch September 24, 2019 17:59
bflad added a commit that referenced this pull request Sep 24, 2019
@ghost
Copy link

ghost commented Sep 26, 2019

This has been released in version 2.30.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 Nov 1, 2019

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 Nov 1, 2019
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. service/ec2 Issues and PRs that pertain to the ec2 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.

placement_group not being used in resource_aws_spot_fleet_request.go
2 participants