Skip to content

Commit

Permalink
ForwardingRule - Use selflink for ip_address, network, subnetwork and…
Browse files Browse the repository at this point in the history
… target selector
  • Loading branch information
Pocokwins committed Nov 29, 2022
1 parent c5031e5 commit e7adb34
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 32 deletions.
32 changes: 16 additions & 16 deletions apis/compute/v1beta1/zz_forwardingrule_types.go

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

8 changes: 4 additions & 4 deletions apis/compute/v1beta1/zz_generated.resolvers.go

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

16 changes: 16 additions & 0 deletions config/compute/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,22 @@ func Configure(p *config.Provider) { //nolint: gocyclo
Type: "RegionBackendService",
Extractor: common.PathSelfLinkExtractor,
}
r.References["ip_address"] = config.Reference{
Type: "Address",
Extractor: common.PathSelfLinkExtractor,
}
r.References["network"] = config.Reference{
Type: "Network",
Extractor: common.PathSelfLinkExtractor,
}
r.References["subnetwork"] = config.Reference{
Type: "Subnetwork",
Extractor: common.PathSelfLinkExtractor,
}
r.References["target"] = config.Reference{
Type: "RegionTargetHTTPProxy",
Extractor: common.PathSelfLinkExtractor,
}
config.MarkAsRequired(r.TerraformResource, "region")
})

Expand Down
22 changes: 10 additions & 12 deletions package/crds/compute.gcp.upbound.io_forwardingrules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ spec:
APIs, IP address must be provided.
type: string
ipAddressRef:
description: Reference to a Address in compute to populate ipAddress.
description: Reference to a Address to populate ipAddress.
properties:
name:
description: Name of the referenced object.
Expand Down Expand Up @@ -210,7 +210,7 @@ spec:
- name
type: object
ipAddressSelector:
description: Selector for a Address in compute to populate ipAddress.
description: Selector for a Address to populate ipAddress.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
Expand Down Expand Up @@ -289,7 +289,7 @@ spec:
balancing.
type: string
networkRef:
description: Reference to a Network in compute to populate network.
description: Reference to a Network to populate network.
properties:
name:
description: Name of the referenced object.
Expand Down Expand Up @@ -323,7 +323,7 @@ spec:
- name
type: object
networkSelector:
description: Selector for a Network in compute to populate network.
description: Selector for a Network to populate network.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
Expand Down Expand Up @@ -432,8 +432,7 @@ spec:
subnet mode, a subnetwork must be specified.
type: string
subnetworkRef:
description: Reference to a Subnetwork in compute to populate
subnetwork.
description: Reference to a Subnetwork to populate subnetwork.
properties:
name:
description: Name of the referenced object.
Expand Down Expand Up @@ -467,8 +466,7 @@ spec:
- name
type: object
subnetworkSelector:
description: Selector for a Subnetwork in compute to populate
subnetwork.
description: Selector for a Subnetwork to populate subnetwork.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
Expand Down Expand Up @@ -513,8 +511,8 @@ spec:
the target object.
type: string
targetRef:
description: Reference to a RegionTargetHTTPProxy in compute to
populate target.
description: Reference to a RegionTargetHTTPProxy to populate
target.
properties:
name:
description: Name of the referenced object.
Expand Down Expand Up @@ -548,8 +546,8 @@ spec:
- name
type: object
targetSelector:
description: Selector for a RegionTargetHTTPProxy in compute to
populate target.
description: Selector for a RegionTargetHTTPProxy to populate
target.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
Expand Down

0 comments on commit e7adb34

Please sign in to comment.