Skip to content

Commit

Permalink
Address - Use selflink instead of resource ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Pocokwins committed Dec 28, 2022
1 parent 1bf342e commit 2108425
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions apis/compute/v1beta1/zz_address_types.go

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

4 changes: 2 additions & 2 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.

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

p.AddResourceConfigurator("google_compute_address", func(r *config.Resource) {
r.References["network"] = config.Reference{
Type: "Network",
Type: "Network",
Extractor: common.PathSelfLinkExtractor,
}
r.References["subnetwork"] = config.Reference{
Type: "Subnetwork",
Type: "Subnetwork",
Extractor: common.PathSelfLinkExtractor,
}
config.MarkAsRequired(r.TerraformResource, "region")
})
Expand Down

0 comments on commit 2108425

Please sign in to comment.