Skip to content

Commit

Permalink
fix(ec2): fix ipv6 field issues in ec2 group
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Paul Haar <[email protected]>
  • Loading branch information
Christopher Paul Haar committed Apr 28, 2023
1 parent e62e471 commit f4cdb59
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
3 changes: 3 additions & 0 deletions apis/ec2/v1beta1/zz_generated_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build
4 changes: 3 additions & 1 deletion config/ec2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func Configure(p *config.Provider) {
"source_dest_check",
"vpc_security_group_ids",
"associate_public_ip_address",
"ipv6_addresses",
"ipv6_address_count",
},
}
config.MoveToStatus(r.TerraformResource, "security_groups")
Expand Down Expand Up @@ -173,7 +175,7 @@ func Configure(p *config.Provider) {
}
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{
"interface_type", "private_ip_list", "private_ips",
"interface_type", "private_ip_list", "private_ips", "ipv6_address_count",
},
}
// Mutually exclusive with aws_network_interface_attachment
Expand Down
65 changes: 62 additions & 3 deletions examples/ec2/instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Instance
metadata:
annotations:
uptest.upbound.io/timeout: "3600"
meta.upbound.io/example-id: ec2/v1beta1/instance
labels:
testing.upbound.io/example-name: sample-instance
name: sample-instance
spec:
forProvider:
Expand All @@ -11,7 +14,63 @@ spec:
instanceType: t2.micro
networkInterface:
- deviceIndex: 0
networkInterfaceIdRef:
name: sample-ni
networkInterfaceIdSelector:
matchLabels:
testing.upbound.io/example-name: sample-instance
creditSpecification:
- cpuCredits: unlimited
- cpuCredits: unlimited

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: NetworkInterface
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/instance
labels:
testing.upbound.io/example-name: sample-instance
name: sample-instance
spec:
forProvider:
region: us-west-1
subnetIdSelector:
matchLabels:
testing.upbound.io/example-name: sample-instance
privateIps:
- "172.16.10.100"

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/instance
labels:
testing.upbound.io/example-name: sample-instance
name: sample-instance
spec:
forProvider:
region: us-west-1
availabilityZone: us-west-1b
vpcIdSelector:
matchLabels:
testing.upbound.io/example-name: sample-instance
cidrBlock: 172.16.10.0/24

---

apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/instance
labels:
testing.upbound.io/example-name: sample-instance
name: sample-instance
spec:
forProvider:
region: us-west-1
cidrBlock: 172.16.0.0/16
tags:
Name: DemoVpc

0 comments on commit f4cdb59

Please sign in to comment.