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

New Resource: aws_ec2_fleet #5960

Merged
merged 2 commits into from
Oct 3, 2018
Merged

New Resource: aws_ec2_fleet #5960

merged 2 commits into from
Oct 3, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Sep 21, 2018

Closes #4581

Changes proposed in this pull request:

  • New Resource: aws_ec2_fleet

Output from acceptance testing:

Tests passed: 25, ignored: 1
--- PASS: TestAccAWSEc2Fleet_basic (26.31s)
--- PASS: TestAccAWSEc2Fleet_disappears (26.95s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_InstanceType (49.06s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_LaunchTemplateSpecification_LaunchTemplateId (55.89s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_LaunchTemplateSpecification_LaunchTemplateName (56.60s)
--- PASS: TestAccAWSEc2Fleet_ExcessCapacityTerminationPolicy (58.72s)
--- PASS: TestAccAWSEc2Fleet_Tags (59.63s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_AllocationStrategy (62.09s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_LaunchTemplateSpecification_Version (61.98s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_OnDemand (35.94s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType (62.78s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_WeightedCapacity (62.83s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstancePoolsToUseCount (63.36s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstanceInterruptionBehavior (63.30s)
--- PASS: TestAccAWSEc2Fleet_ReplaceUnhealthyInstances (65.50s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_Priority (66.12s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_Priority_Multiple (66.07s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_Spot (40.08s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_SubnetId (67.60s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_WeightedCapacity_Multiple (67.61s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfigs_Overrides_AvailabilityZone (76.65s)
--- PASS: TestAccAWSEc2Fleet_OnDemandOptions_AllocationStrategy (79.66s)
--- PASS: TestAccAWSEc2Fleet_Type (25.54s)
--- PASS: TestAccAWSEc2Fleet_TerminateInstancesWithExpiration (47.88s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_TotalTargetCapacity (423.74s)

@bflad bflad added new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service. labels Sep 21, 2018
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 21, 2018
@bflad bflad mentioned this pull request Sep 22, 2018
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 24, 2018
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 24, 2018
@bflad bflad requested a review from a team September 24, 2018 14:58
@bflad bflad changed the title [WIP] New Resource: aws_ec2_fleet New Resource: aws_ec2_fleet Sep 24, 2018
@zytek
Copy link
Contributor

zytek commented Sep 25, 2018

Does this supersede ec2_spot_fleet ? Seems so.

@cread
Copy link

cread commented Sep 25, 2018

They are two separate AWS services.

aws/resource_aws_ec2_fleet.go Outdated Show resolved Hide resolved
},
},
},
"overrides": {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be singular

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update code, testing, and documentation. 👍

aws/resource_aws_ec2_fleet.go Show resolved Hide resolved
aws/resource_aws_ec2_fleet.go Show resolved Hide resolved

input := &ec2.CreateFleetInput{
ExcessCapacityTerminationPolicy: aws.String(d.Get("excess_capacity_termination_policy").(string)),
LaunchTemplateConfigs: expandEc2FleetLaunchTemplateConfigRequests(d.Get("launch_template_configs").([]interface{})),
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like these casts are panic potential, but won't hold up a merge over it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Calling d.Get() against a schema.TypeList will always return a []interface{} with 0 or more elements 😄

aws/resource_aws_ec2_fleet.go Show resolved Hide resolved
@bflad
Copy link
Contributor Author

bflad commented Oct 3, 2018

@paultyng feedback hopefully addressed! 😄

Output from acceptance testing:

--- PASS: TestAccAWSEc2Fleet_basic (35.71s)
--- PASS: TestAccAWSEc2Fleet_disappears (32.21s)
--- PASS: TestAccAWSEc2Fleet_ExcessCapacityTerminationPolicy (94.75s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchTemplateId (72.23s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchTemplateName (65.05s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_Version (66.15s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_AvailabilityZone (64.70s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_InstanceType (70.11s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority (62.72s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority_Multiple (62.67s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_SubnetId (84.59s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity (66.18s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity_Multiple (66.18s)
--- PASS: TestAccAWSEc2Fleet_OnDemandOptions_AllocationStrategy (65.99s)
--- PASS: TestAccAWSEc2Fleet_ReplaceUnhealthyInstances (67.76s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_AllocationStrategy (65.17s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstanceInterruptionBehavior (64.85s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstancePoolsToUseCount (62.53s)
--- PASS: TestAccAWSEc2Fleet_Tags (65.32s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType (64.69s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_OnDemand (32.68s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_Spot (34.97s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_TotalTargetCapacity (468.10s)
--- PASS: TestAccAWSEc2Fleet_TerminateInstancesWithExpiration (63.03s)
--- PASS: TestAccAWSEc2Fleet_Type (32.81s)

Output from acceptance testing:

```
--- PASS: TestAccAWSEc2Fleet_basic (35.71s)
--- PASS: TestAccAWSEc2Fleet_disappears (32.21s)
--- PASS: TestAccAWSEc2Fleet_ExcessCapacityTerminationPolicy (94.75s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchTemplateId (72.23s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_LaunchTemplateName (65.05s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_LaunchTemplateSpecification_Version (66.15s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_AvailabilityZone (64.70s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_InstanceType (70.11s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority (62.72s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_Priority_Multiple (62.67s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_SubnetId (84.59s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity (66.18s)
--- PASS: TestAccAWSEc2Fleet_LaunchTemplateConfig_Override_WeightedCapacity_Multiple (66.18s)
--- PASS: TestAccAWSEc2Fleet_OnDemandOptions_AllocationStrategy (65.99s)
--- PASS: TestAccAWSEc2Fleet_ReplaceUnhealthyInstances (67.76s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_AllocationStrategy (65.17s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstanceInterruptionBehavior (64.85s)
--- PASS: TestAccAWSEc2Fleet_SpotOptions_InstancePoolsToUseCount (62.53s)
--- PASS: TestAccAWSEc2Fleet_Tags (65.32s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType (64.69s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_OnDemand (32.68s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_DefaultTargetCapacityType_Spot (34.97s)
--- PASS: TestAccAWSEc2Fleet_TargetCapacitySpecification_TotalTargetCapacity (468.10s)
--- PASS: TestAccAWSEc2Fleet_TerminateInstancesWithExpiration (63.03s)
--- PASS: TestAccAWSEc2Fleet_Type (32.81s)
```
@bflad bflad added this to the v1.39.0 milestone Oct 3, 2018
@bflad bflad merged commit d93081b into master Oct 3, 2018
@bflad bflad deleted the f-aws_ec2_fleet branch October 3, 2018 17:30
bflad added a commit that referenced this pull request Oct 3, 2018
@ghost
Copy link

ghost commented Oct 3, 2018

This has been released in version 1.39.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "aws" {
	version = "~> 1.39.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 3, 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 Apr 3, 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. new-resource Introduces a new resource. service/ec2 Issues and PRs that pertain to the ec2 service. size/XXL 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.

EC2 Fleet Resource
4 participants