Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#883 from djeremiah/vpc-ipam-cid…
Browse files Browse the repository at this point in the history
…r-block

ignore cidr_block on lateinitialize to avoid conflicts when using ipam
  • Loading branch information
turkenf authored Sep 19, 2023
2 parents 6bbeee5 + 86d8944 commit b815340
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 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.

1 change: 1 addition & 0 deletions config/ec2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ func Configure(p *config.Provider) {
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{
"ipv6_cidr_block",
"cidr_block",
},
}
r.UseAsync = true
Expand Down
81 changes: 81 additions & 0 deletions examples/ec2/vpc-ipampool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/vpc-ipampool
name: sample-vpc
spec:
forProvider:
region: us-west-1
ipv4IpamPoolIdSelector:
matchLabels:
testing.upbound.io/example-name: ipampool
ipv4NetmaskLength: 28
tags:
Name: DemoVpc
---
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPCIpamPoolCidr
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/vpc-ipampool
labels:
testing.upbound.io/example-name: ipampool
name: example
spec:
forProvider:
cidr: 172.2.0.0/16
ipamPoolIdSelector:
matchLabels:
testing.upbound.io/example-name: ipampool
region: us-west-1
---
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPCIpamPool
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/vpc-ipampool
labels:
testing.upbound.io/example-name: ipampool
name: example
spec:
forProvider:
addressFamily: ipv4
ipamScopeIdSelector:
matchLabels:
testing.upbound.io/example-name: ipampool
locale: us-west-1
region: us-west-1
---
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPCIpamScope
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/vpc-ipampool
labels:
testing.upbound.io/example-name: ipampool
name: example
spec:
forProvider:
description: Another Scope
ipamIdSelector:
matchLabels:
testing.upbound.io/example-name: ipampool
region: us-west-1
---
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPCIpam
metadata:
annotations:
meta.upbound.io/example-id: ec2/v1beta1/vpc-ipampool
labels:
testing.upbound.io/example-name: ipampool
name: main
spec:
forProvider:
description: My IPAM
operatingRegions:
- regionName: us-west-1
region: us-west-1
tags:
Test: Main

0 comments on commit b815340

Please sign in to comment.