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

allow ipv4_address_count to be modifiable #5830

Merged
merged 3 commits into from
Sep 12, 2018

Conversation

kl4w
Copy link
Contributor

@kl4w kl4w commented Sep 10, 2018

Fixes #5851

Changes proposed in this pull request:

  • allow ipv4_address_count to be modifiable

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchTemplate_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSLaunchTemplate_ -timeout 120m
=== RUN   TestAccAWSLaunchTemplate_importBasic
--- PASS: TestAccAWSLaunchTemplate_importBasic (12.45s)
=== RUN   TestAccAWSLaunchTemplate_importData
--- PASS: TestAccAWSLaunchTemplate_importData (12.14s)
=== RUN   TestAccAWSLaunchTemplate_basic
--- PASS: TestAccAWSLaunchTemplate_basic (11.34s)
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (47.63s)
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.14s)
=== RUN   TestAccAWSLaunchTemplate_data
--- PASS: TestAccAWSLaunchTemplate_data (11.60s)
=== RUN   TestAccAWSLaunchTemplate_update
--- PASS: TestAccAWSLaunchTemplate_update (45.08s)
=== RUN   TestAccAWSLaunchTemplate_tags
--- PASS: TestAccAWSLaunchTemplate_tags (20.69s)
=== RUN   TestAccAWSLaunchTemplate_nonBurstable
--- PASS: TestAccAWSLaunchTemplate_nonBurstable (11.49s)
=== RUN   TestAccAWSLaunchTemplate_networkInterface
--- PASS: TestAccAWSLaunchTemplate_networkInterface (28.71s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	249.303s

@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Sep 10, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels Sep 10, 2018
@bflad
Copy link
Contributor

bflad commented Sep 10, 2018

See also: #5771 (I would suggest working together)

@@ -525,6 +527,8 @@ resource "aws_launch_template" "test" {

network_interfaces {
network_interface_id = "${aws_network_interface.test.id}"
ipv4_address_count = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably split these out into their own acceptance tests and test configurations to make them more maintainable in the future. 👍

@kl4w kl4w changed the title allow ipv4_address_count and ipv6_address_count to be modifiable allow ipv4_address_count to be modifiable Sep 12, 2018
@ghost ghost added size/S Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Sep 12, 2018
@kl4w
Copy link
Contributor Author

kl4w commented Sep 12, 2018

@bflad backed out of the ipv6 changes

make testacc TEST=./aws TESTARGS='-run=TestAccAWSLaunchTemplate_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSLaunchTemplate_ -timeout 120m
=== RUN   TestAccAWSLaunchTemplate_importBasic
--- PASS: TestAccAWSLaunchTemplate_importBasic (12.66s)
=== RUN   TestAccAWSLaunchTemplate_importData
--- PASS: TestAccAWSLaunchTemplate_importData (12.56s)
=== RUN   TestAccAWSLaunchTemplate_basic
--- PASS: TestAccAWSLaunchTemplate_basic (11.29s)
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (48.04s)
=== RUN   TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.92s)
=== RUN   TestAccAWSLaunchTemplate_data
--- PASS: TestAccAWSLaunchTemplate_data (11.51s)
=== RUN   TestAccAWSLaunchTemplate_update
--- PASS: TestAccAWSLaunchTemplate_update (46.80s)
=== RUN   TestAccAWSLaunchTemplate_tags
--- PASS: TestAccAWSLaunchTemplate_tags (21.14s)
=== RUN   TestAccAWSLaunchTemplate_nonBurstable
--- PASS: TestAccAWSLaunchTemplate_nonBurstable (11.98s)
=== RUN   TestAccAWSLaunchTemplate_networkInterface
--- PASS: TestAccAWSLaunchTemplate_networkInterface (29.51s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	254.455s

@@ -211,12 +211,12 @@ Each `network_interfaces` block supports the following:
* `delete_on_termination` - Whether the network interface should be destroyed on instance termination.
* `description` - Description of the network interface.
* `device_index` - The integer index of the network interface attachment.
* `ipv6_addresses` - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet.
* `ipv6_addresses` - One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with `ipv6_address_count`
Copy link
Contributor

Choose a reason for hiding this comment

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

This snuck in, but I think its fine to leave in as it'll be handled shortly.

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! 🚀

10 tests passed (all tests)
--- PASS: TestAccAWSLaunchTemplate_nonBurstable (4.65s)
--- PASS: TestAccAWSLaunchTemplate_data (5.05s)
--- PASS: TestAccAWSLaunchTemplate_basic (5.16s)
--- PASS: TestAccAWSLaunchTemplate_importData (5.32s)
--- PASS: TestAccAWSLaunchTemplate_importBasic (5.68s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (8.01s)
--- PASS: TestAccAWSLaunchTemplate_tags (7.96s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (37.76s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (44.14s)
--- PASS: TestAccAWSLaunchTemplate_update (45.14s)

@bflad bflad added this to the v1.36.0 milestone Sep 12, 2018
@bflad bflad merged commit ab70575 into hashicorp:master Sep 12, 2018
bflad added a commit that referenced this pull request Sep 12, 2018
@kl4w kl4w deleted the launch-template-network-address-count branch September 12, 2018 18:17
@bflad
Copy link
Contributor

bflad commented Sep 13, 2018

This has been released in version 1.36.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@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
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_launch_template: ipv4_address_count cannot be set
2 participants