Skip to content

Commit

Permalink
Merge pull request #83 from XXXLutz/RegionTargetHTTPProxy_Use-selflin…
Browse files Browse the repository at this point in the history
…k-instead-of-resourceId

RegionTargetHTTPProxy - Use selflink for resolving RegionURLMap
  • Loading branch information
ulucinar authored Dec 20, 2022
2 parents b793195 + 5788151 commit e0252bb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apis/compute/v1beta1/zz_generated.resolvers.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_regiontargethttpproxy_types.go

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

6 changes: 6 additions & 0 deletions config/compute/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ func Configure(p *config.Provider) { //nolint: gocyclo

p.AddResourceConfigurator("google_compute_region_target_http_proxy", func(r *config.Resource) {
config.MarkAsRequired(r.TerraformResource, "region")

r.References["url_map"] = config.Reference{
Type: "RegionURLMap",
Extractor: common.PathSelfLinkExtractor,
}

})

p.AddResourceConfigurator("google_compute_region_url_map", func(r *config.Resource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ spec:
the mapping from URL to the BackendService.
type: string
urlMapRef:
description: Reference to a RegionURLMap in compute to populate
urlMap.
description: Reference to a RegionURLMap to populate urlMap.
properties:
name:
description: Name of the referenced object.
Expand Down Expand Up @@ -117,8 +116,7 @@ spec:
- name
type: object
urlMapSelector:
description: Selector for a RegionURLMap in compute to populate
urlMap.
description: Selector for a RegionURLMap to populate urlMap.
properties:
matchControllerRef:
description: MatchControllerRef ensures an object with the
Expand Down

0 comments on commit e0252bb

Please sign in to comment.