The following resources are composed to implement the referenced Composite Resource Definition (XRD).
Network
Router
RouterNAT
kind: Composition
apiVersion: apiextensions.crossplane.io/v1
metadata:
name: network-composition
creationTimestamp: null
labels:
provider: gcp-provider
spec:
compositeTypeRef:
apiVersion: devops.dexcom.io/v1alpha1
kind: XNetwork
resources:
- base:
apiVersion: compute.gcp.upbound.io/v1beta1
kind: Network
spec:
forProvider:
autoCreateSubnetworks: false
routingMode: GLOBAL
providerConfigRef:
name: gcp-provider
patches:
- fromFieldPath: spec.networkName
toFieldPath: metadata.name
- fromFieldPath: spec.networkName
toFieldPath: metadata.labels[networks.devops.dexcom.io/network-id]
- base:
apiVersion: compute.gcp.upbound.io/v1beta1
kind: Router
metadata:
name: router
spec:
forProvider:
networkSelector:
matchControllerRef: true
region: us-central1
providerConfigRef:
name: gcp-provider
patches:
- fromFieldPath: spec.region
toFieldPath: spec.forProvider.region
- base:
apiVersion: compute.gcp.upbound.io/v1beta1
kind: RouterNAT
metadata:
labels:
testing.upbound.io/example-name: example_routernat
name: routernat
spec:
forProvider:
logConfig:
- enable: true
filter: ERRORS_ONLY
natIpAllocateOption: AUTO_ONLY
region: us-central1
routerSelector:
matchControllerRef: true
sourceSubnetworkIpRangesToNat: ALL_SUBNETWORKS_ALL_IP_RANGES
providerConfigRef:
name: gcp-provider
patches:
- fromFieldPath: spec.region
toFieldPath: spec.forProvider.region