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

service/ec2: Initial support for Local Zones #12400

Merged
merged 3 commits into from
Mar 24, 2020
Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 15, 2020

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 #11136
Reference: #11994

Release note for CHANGELOG:

FEATURES:

* **New Resource:** `aws_ec2_availability_zone_group`

ENHANCEMENTS:

* data-source/aws_availability_zone: Add `all_availability_zones` and `filter` arguments
* data-source/aws_availability_zone: Add `group_name`, `network_border_group`, and `opt_in_status` attributes
* data-source/aws_availability_zones: Add `all_availability_zones` and `filter` arguments
* data-source/aws_availability_zones: Add `group_names` attribute

Output from acceptance testing:

--- PASS: TestAccDataSourceAwsAvailabilityZone_Filter (17.53s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_ZoneId (17.74s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones (17.74s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Name (17.79s)

--- PASS: TestAccAWSAvailabilityZones_Filter (15.46s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (15.87s)
--- PASS: TestAccAWSAvailabilityZones_basic (16.60s)
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (16.70s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedNames (17.00s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedZoneIds (17.14s)

--- PASS: TestAccAWSEc2AvailabilityZoneGroup_OptInStatus (37.67s)

Reference: #11136
Reference: #11994

Changes:

* New Resource: `aws_ec2_availability_zone_group`
* data-source/aws_availability_zone: Add `all_availability_zones` and `filter` arguments
* data-source/aws_availability_zone: Add `group_name`, `network_border_group`, and `opt_in_status` attributes
* data-source/aws_availability_zones: Add `all_availability_zones` and `filter` arguments
* data-source/aws_availability_zones: Add `group_names` attribute

```
--- PASS: TestAccDataSourceAwsAvailabilityZone_Filter (17.53s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_ZoneId (17.74s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones (17.74s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Name (17.79s)

--- PASS: TestAccAWSAvailabilityZones_Filter (15.46s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (15.87s)
--- PASS: TestAccAWSAvailabilityZones_basic (16.60s)
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (16.70s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedNames (17.00s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedZoneIds (17.14s)

--- PASS: TestAccAWSEc2AvailabilityZoneGroup_OptInStatus (37.67s)
```
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. new-resource Introduces a new resource. labels Mar 15, 2020
@bflad bflad requested a review from a team March 15, 2020 23:52
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 15, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Mar 15, 2020
@ewbankkit
Copy link
Contributor

Verified acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsAvailabilityZone_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccDataSourceAwsAvailabilityZone_ -timeout 120m
=== RUN   TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones
=== PAUSE TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones
=== RUN   TestAccDataSourceAwsAvailabilityZone_Filter
=== PAUSE TestAccDataSourceAwsAvailabilityZone_Filter
=== RUN   TestAccDataSourceAwsAvailabilityZone_Name
=== PAUSE TestAccDataSourceAwsAvailabilityZone_Name
=== RUN   TestAccDataSourceAwsAvailabilityZone_ZoneId
=== PAUSE TestAccDataSourceAwsAvailabilityZone_ZoneId
=== CONT  TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones
=== CONT  TestAccDataSourceAwsAvailabilityZone_ZoneId
=== CONT  TestAccDataSourceAwsAvailabilityZone_Filter
=== CONT  TestAccDataSourceAwsAvailabilityZone_Name
--- PASS: TestAccDataSourceAwsAvailabilityZone_ZoneId (25.64s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones (25.83s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Filter (25.99s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Name (26.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.064s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAvailabilityZones_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAvailabilityZones_ -timeout 120m
=== RUN   TestAccAWSAvailabilityZones_basic
=== PAUSE TestAccAWSAvailabilityZones_basic
=== RUN   TestAccAWSAvailabilityZones_AllAvailabilityZones
=== PAUSE TestAccAWSAvailabilityZones_AllAvailabilityZones
=== RUN   TestAccAWSAvailabilityZones_BlacklistedNames
=== PAUSE TestAccAWSAvailabilityZones_BlacklistedNames
=== RUN   TestAccAWSAvailabilityZones_BlacklistedZoneIds
=== PAUSE TestAccAWSAvailabilityZones_BlacklistedZoneIds
=== RUN   TestAccAWSAvailabilityZones_Filter
=== PAUSE TestAccAWSAvailabilityZones_Filter
=== RUN   TestAccAWSAvailabilityZones_stateFilter
=== PAUSE TestAccAWSAvailabilityZones_stateFilter
=== CONT  TestAccAWSAvailabilityZones_basic
=== CONT  TestAccAWSAvailabilityZones_Filter
=== CONT  TestAccAWSAvailabilityZones_BlacklistedZoneIds
=== CONT  TestAccAWSAvailabilityZones_BlacklistedNames
=== CONT  TestAccAWSAvailabilityZones_AllAvailabilityZones
=== CONT  TestAccAWSAvailabilityZones_stateFilter
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (23.45s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (24.19s)
--- PASS: TestAccAWSAvailabilityZones_basic (24.20s)
--- PASS: TestAccAWSAvailabilityZones_Filter (24.25s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedNames (25.19s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedZoneIds (25.96s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.014s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEc2AvailabilityZoneGroup_' 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSEc2AvailabilityZoneGroup_ -timeout 120m
=== RUN   TestAccAWSEc2AvailabilityZoneGroup_OptInStatus
=== PAUSE TestAccAWSEc2AvailabilityZoneGroup_OptInStatus
=== CONT  TestAccAWSEc2AvailabilityZoneGroup_OptInStatus
--- PASS: TestAccAWSEc2AvailabilityZoneGroup_OptInStatus (41.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	41.390s

Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Aside from the documentation questions, LGTM 🚀

--- PASS: TestAvailabilityZonesSort (0.00s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_AllAvailabilityZones (9.32s)
--- PASS: TestAccAWSAvailabilityZones_basic (9.61s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedZoneIds (9.87s)
--- PASS: TestAccAWSAvailabilityZones_Filter (9.85s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Filter (10.28s)
--- PASS: TestAccAWSAvailabilityZones_BlacklistedNames (10.30s)
--- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (10.50s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_ZoneId (10.56s)
--- PASS: TestAccAWSAvailabilityZones_stateFilter (10.54s)
--- PASS: TestAccDataSourceAwsAvailabilityZone_Name (10.65s)
--- PASS: TestAccAWSEc2AvailabilityZoneGroup_OptInStatus (92.96s)


Manages an EC2 Availability Zone Group, such as updating its opt-in status.

~> **NOTE:** This is an advanced Terraform resource. Terraform will automatically assume management of the EC2 Availability Zone Group without import and perform no actions on removal from configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a note about needing to contact AWS Support to disable a Local Zone?

* `name` - (Optional) The full name of the availability zone to select.
* `state` - (Optional) A specific availability zone state to require. May be any of `"available"`, `"information"` or `"impaired"`.
Copy link
Contributor

@gdavison gdavison Mar 24, 2020

Choose a reason for hiding this comment

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

unavailable is also an available option 😉

@bflad bflad added this to the v2.55.0 milestone Mar 24, 2020
@bflad bflad merged commit cb72b1f into master Mar 24, 2020
@bflad bflad deleted the f-ec2-local-zone-support branch March 24, 2020 20:04
bflad added a commit that referenced this pull request Mar 24, 2020
ewbankkit added a commit to ewbankkit/terraform-provider-aws that referenced this pull request Mar 24, 2020
@ghost
Copy link

ghost commented Mar 27, 2020

This has been released in version 2.55.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 Apr 24, 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 24, 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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. size/XL 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.

Initial support for Local Zones
4 participants