Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global forwarding rule and forwarding rule DCL conversion. #5138

Merged
merged 8 commits into from
Sep 8, 2021
22 changes: 22 additions & 0 deletions mmv1/products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
fw_allow_ilb_to_backends_name: "l7-ilb-fw-allow-ilb-to-backends"
vm_test_name: "l7-ilb-test-vm"
min_version: beta
ignore_read_extra:
- "port_range"
- "target"
- !ruby/object:Provider::Terraform::Examples
name: "internal_tcp_udp_lb_with_mig_backend"
primary_resource_id: "google_compute_forwarding_rule"
Expand All @@ -753,6 +756,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
backend_name: "website-backend"
network_name: "website-net"
min_version: beta
ignore_read_extra:
- "port_range"
- !ruby/object:Provider::Terraform::Examples
name: "forwarding_rule_global_internallb"
primary_resource_id: "default"
Expand All @@ -766,6 +771,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
vars:
forwarding_rule_name: "website-forwarding-rule"
target_pool_name: "website-target-pool"
ignore_read_extra:
- "port_range"
- "target"
- !ruby/object:Provider::Terraform::Examples
name: "forwarding_rule_l3_default"
primary_resource_id: "fwd_rule"
Expand All @@ -781,6 +789,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
forwarding_rule_name: "website-forwarding-rule"
backend_name: "website-backend"
network_name: "website-net"
ignore_read_extra:
- "port_range"
- "target"
- !ruby/object:Provider::Terraform::Examples
name: "forwarding_rule_http_lb"
min_version: 'beta'
Expand All @@ -794,6 +805,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
rigm_name: "website-rigm"
network_name: "website-net"
fw_name: "website-fw"
ignore_read_extra:
- "port_range"
- "target"
custom_code: !ruby/object:Provider::Terraform::CustomCode
post_create: templates/terraform/post_create/labels.erb
properties:
Expand Down Expand Up @@ -872,6 +886,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
forwarding_rule_name: "global-rule"
http_proxy_name: "target-proxy"
backend_service_name: "backend"
ignore_read_extra:
- "port_range"
- "target"
- !ruby/object:Provider::Terraform::Examples
name: "global_forwarding_rule_internal"
min_version: beta
Expand All @@ -881,6 +898,9 @@ overrides: !ruby/object:Overrides::ResourceOverrides
http_proxy_name: "target-proxy"
backend_service_name: "backend"
igm_name: "igm-internal"
ignore_read_extra:
- "port_range"
- "target"
- !ruby/object:Provider::Terraform::Examples
name: "private_service_connect_google_apis"
min_version: beta
Expand All @@ -892,6 +912,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides
forwarding_rule_name: "globalrule"
test_env_vars:
project: :PROJECT_NAME
ignore_read_extra:
- "ip_address"
properties:
creationTimestamp: !ruby/object:Overrides::Terraform::PropertyOverride
exclude: true
Expand Down
2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-google<%= "-" + version unless ve

require (
cloud.google.com/go/bigtable v1.10.1
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210824221031-bbef03d2748a
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9
github.com/apparentlymart/go-cidr v1.1.0
github.com/client9/misspell v0.3.4
github.com/davecgh/go-spew v1.1.1
Expand Down
6 changes: 6 additions & 0 deletions mmv1/third_party/terraform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOC
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9 h1:b4+4SWkgDcBSTpKYvl+SaUDZ/PwEMfnuI1z41qPy+z8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210830202814-90d607e5aba1 h1:Cq6wsP8cz8yoyIqVe9qXiuLv6myB3jY5aCobrvTN5WQ=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210830202814-90d607e5aba1/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210828005957-5e300a425b22 h1:r1uW7IkHP90/jxMW8Br+DzEK2wuZQs0JFYC6T5foazk=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210828005957-5e300a425b22/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210824221031-bbef03d2748a h1:k71tcjN3d1+YrSB1cN2d9T787JjbwbfNFM6HarBrn2o=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210824221031-bbef03d2748a/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210623224421-7f5af5003bbb h1:9HBI5n77Z2ReBlOFk1h2JFLpY/HobH9Xaq90E7IjCpw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccDataSourceGoogleForwardingRule(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccDataSourceGoogleForwardingRuleConfig(poolName, ruleName),
Check: checkDataSourceStateMatchesResourceState("data.google_compute_forwarding_rule.my_forwarding_rule", "google_compute_forwarding_rule.foobar-fr"),
Check: checkDataSourceStateMatchesResourceStateWithIgnores("data.google_compute_forwarding_rule.my_forwarding_rule", "google_compute_forwarding_rule.foobar-fr", map[string]struct{}{"port_range": {}, "target": {}}),
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestAccDataSourceGoogleGlobalForwardingRule(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccDataSourceGoogleGlobalForwardingRuleConfig(poolName, ruleName),
Check: checkDataSourceStateMatchesResourceState("data.google_compute_global_forwarding_rule.my_forwarding_rule", "google_compute_global_forwarding_rule.foobar-fr"),
Check: checkDataSourceStateMatchesResourceStateWithIgnores("data.google_compute_global_forwarding_rule.my_forwarding_rule", "google_compute_global_forwarding_rule.foobar-fr", map[string]struct{}{"port_range": {}, "target": {}}),
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestAccComputeGlobalForwardingRule_updateTarget(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
{
Config: testAccComputeGlobalForwardingRule_httpProxy(fr, "proxy2", proxy, proxyUpdated, backend, hc, urlmap),
Expand All @@ -47,6 +48,7 @@ func TestAccComputeGlobalForwardingRule_updateTarget(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
},
})
Expand Down Expand Up @@ -77,6 +79,7 @@ func TestAccComputeGlobalForwardingRule_ipv6(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
},
})
Expand Down Expand Up @@ -104,6 +107,7 @@ func TestAccComputeGlobalForwardingRule_labels(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
{
Config: testAccComputeGlobalForwardingRule_labelsUpdated(fr, proxy, backend, hc, urlmap),
Expand All @@ -112,6 +116,7 @@ func TestAccComputeGlobalForwardingRule_labels(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
},
})
Expand Down Expand Up @@ -142,6 +147,7 @@ func TestAccComputeGlobalForwardingRule_internalLoadBalancing(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
{
Config: testAccComputeGlobalForwardingRule_internalLoadBalancingUpdate(fr, proxy, backend, hc, urlmap, igm, it),
Expand All @@ -150,6 +156,7 @@ func TestAccComputeGlobalForwardingRule_internalLoadBalancing(t *testing.T) {
ResourceName: "google_compute_global_forwarding_rule.forwarding_rule",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"port_range", "target"},
},
},
})
Expand Down
Loading