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

r+d/aws_launch_template: Add IPv4 & IPv6 prefix and PrivateDnsName options #23365

Merged
merged 37 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b97edfa
feat: add ipv4 & ipv6 prefix options to aws_launch_template resource
zachfeld Feb 24, 2022
3b968e7
fix: validation function should check for CIDR range
zachfeld Feb 24, 2022
de77415
feat: add ipv4 & ipv6 prefix options to aws_launch_template resource
zachfeld Feb 24, 2022
869f0fa
fix: validation function should check for CIDR range
zachfeld Feb 24, 2022
cd77a67
Revert "fix: validation function should check for CIDR range"
ewbankkit Mar 15, 2022
2e430d0
Revert "feat: add ipv4 & ipv6 prefix options to aws_launch_template r…
ewbankkit Mar 15, 2022
a0238c2
r/aws_launch_template: Alphabetize attributes.
ewbankkit Mar 15, 2022
97fa683
r/aws_launch_template: Start to tidy up resource Create.
ewbankkit Mar 15, 2022
1e95f35
r/aws_launch_template: Add and use 'FindLaunchTemplateByID'.
ewbankkit Mar 15, 2022
c73b2b4
r/aws_launch_template: Add and use 'FindLaunchTemplateVersionByTwoPar…
ewbankkit Mar 15, 2022
8f9fa51
r/aws_launch_template: Tidy up resource Delete.
ewbankkit Mar 15, 2022
ecf7ceb
r/aws_launch_template: Tidy up resource Read.
ewbankkit Mar 15, 2022
b6b3528
Merge branch 'main' into tmp-pr23365
ewbankkit Mar 15, 2022
501d248
r/aws_launch_template: Tidy up resource Update.
ewbankkit Mar 16, 2022
9212a8c
r/aws_launch_template: Tidy up acceptance tests.
ewbankkit Mar 16, 2022
543f23c
Use EC2 endpoint ID for 'acctest.ErrorCheck', not AutoScaling.
ewbankkit Mar 16, 2022
9710b31
r/aws_launch_template: Skip error indicating Licese Manager ResourceL…
ewbankkit Mar 16, 2022
a4cebe5
r/aws_launch_template: Tidy up expanders.
ewbankkit Mar 16, 2022
0b40da4
r/aws_launch_template: Tidy up flatteners.
ewbankkit Mar 17, 2022
e773d5e
d/aws_launch_template: Alphabetize attributes.
ewbankkit Mar 17, 2022
e67c9d0
d/aws_launch_template: Use 'flattenResponseLaunchTemplateData'.
ewbankkit Mar 17, 2022
c179f9b
r/aws_launch_template: Acceptance tests passing.
ewbankkit Mar 17, 2022
be4b706
d+r/aws_launch_template: Add `ipv4_prefixes`, `ipv4_prefix_count`, `i…
ewbankkit Mar 17, 2022
79a9d1a
Merge branch 'tmp-pr23365' into HEAD
ewbankkit Mar 17, 2022
2756b3c
Fix terrafmt errors in acceptance test configurations.
ewbankkit Mar 17, 2022
715a622
d+r/aws_launch_template: Add `capacity_reservation_resource_group_arn…
ewbankkit Mar 17, 2022
b5a5de0
Fix golangci-lint error 'SA9003: empty branch (staticcheck)'.
ewbankkit Mar 18, 2022
b4bc260
r/aws_launch_template: Alphabetize arguments in documentation.
ewbankkit Mar 18, 2022
1bcc935
d+r/aws_launch_template: Add `private_dns_name_options` configuration…
ewbankkit Mar 18, 2022
36871b9
Add 'FindCapacityReservationByID'.
ewbankkit Mar 18, 2022
06697ac
r/aws_ec2_capacity_reservation: Use '_Values' functions (#14601).
ewbankkit Mar 18, 2022
6b1d9b5
r/aws_ec2_capacity_reservation: Tidy up resource Create.
ewbankkit Mar 18, 2022
0f90e0a
r/aws_ec2_capacity_reservation: Tidy up resource Delete.
ewbankkit Mar 18, 2022
2251936
r/aws_ec2_capacity_reservation: Tidy up resource Update.
ewbankkit Mar 18, 2022
0b41890
r/aws_ec2_capacity_reservation: Tidy up resource Read.
ewbankkit Mar 18, 2022
8217368
r/aws_ec2_capacity_reservation: Tidy up acceptance tests.
ewbankkit Mar 18, 2022
09e741c
r/aws_ec2_capacity_reservation: State transitions.
ewbankkit Mar 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions internal/service/ec2/launch_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,30 @@ func ResourceLaunchTemplate() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"ipv4_prefixes": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: verify.ValidIPv4CIDRNetworkAddress,
},
},
"ipv4_prefix_count": {
Type: schema.TypeInt,
Optional: true,
},
"ipv6_prefixes": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: verify.ValidIPv6CIDRNetworkAddress,
},
},
"ipv6_prefix_count": {
Type: schema.TypeInt,
Optional: true,
},
"interface_type": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -1208,6 +1232,10 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi
"network_card_index": aws.Int64Value(v.NetworkCardIndex),
"network_interface_id": aws.StringValue(v.NetworkInterfaceId),
"private_ip_address": aws.StringValue(v.PrivateIpAddress),
"ipv4_prefixes": []*ec2.Ipv4PrefixSpecificationResponse(v.Ipv4Prefixes),
"ipv4_prefix_count": aws.Int64Value(v.Ipv4PrefixCount),
"ipv6_prefixes": []*ec2.Ipv6PrefixSpecificationResponse(v.Ipv6Prefixes),
"ipv6_prefix_count": aws.Int64Value(v.Ipv6PrefixCount),
"subnet_id": aws.StringValue(v.SubnetId),
}

Expand Down
18 changes: 18 additions & 0 deletions internal/service/ec2/launch_template_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,24 @@ func DataSourceLaunchTemplate() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"ipv4_prefixes": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"ipv4_prefix_count": {
Type: schema.TypeInt,
Computed: true,
},
"ipv6_prefixes": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"ipv6_prefix_count": {
Type: schema.TypeInt,
Computed: true,
},
"interface_type": {
Type: schema.TypeString,
Computed: true,
Expand Down