Skip to content

Commit e895a76

Browse files
authored
Promote params to v1 for google_compute_router resource (#15225)
1 parent 27f6057 commit e895a76

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

mmv1/products/compute/Router.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ properties:
235235
required: true
236236
- name: 'params'
237237
type: NestedObject
238-
min_version: 'beta'
239238
ignore_read: true
240239
immutable: true
241240
description: |

mmv1/third_party/terraform/services/compute/resource_compute_router_test.go.tmpl renamed to mmv1/third_party/terraform/services/compute/resource_compute_router_test.go

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -211,45 +211,42 @@ func TestAccComputeRouter_addAndUpdateIdentifierRangeBgp(t *testing.T) {
211211
})
212212
}
213213

214-
215-
{{- if ne $.TargetVersionName "ga" }}
216214
func TestAccComputeRouter_resourceManagerTags(t *testing.T) {
217215
t.Parallel()
218216
org := envvar.GetTestOrgFromEnv(t)
219217

220218
suffixName := acctest.RandString(t, 10)
221219
tagKeyResult := acctest.BootstrapSharedTestTagKeyDetails(t, "crm-routers-tagkey", "organizations/"+org, make(map[string]interface{}))
222-
sharedTagkey,_ := tagKeyResult["shared_tag_key"]
220+
sharedTagkey, _ := tagKeyResult["shared_tag_key"]
223221
tagValueResult := acctest.BootstrapSharedTestTagValueDetails(t, "crm-routers-tagvalue", sharedTagkey, org)
224222
routerName := fmt.Sprintf("tf-test-router-resource-manager-tags-%s", suffixName)
225223
networkName := fmt.Sprintf("tf-test-network-resource-manager-tags-%s-net", suffixName)
226224
subnetName := fmt.Sprintf("tf-test-subnet-resource-manager-tags-%s-subnet", suffixName)
227225
context := map[string]interface{}{
228226
"network_name": networkName,
229-
"subnet_name": subnetName,
230-
"router_name": routerName,
231-
"tag_key_id": tagKeyResult["name"],
227+
"subnet_name": subnetName,
228+
"router_name": routerName,
229+
"tag_key_id": tagKeyResult["name"],
232230
"tag_value_id": tagValueResult["name"],
233231
}
234232

235233
acctest.VcrTest(t, resource.TestCase{
236234
PreCheck: func() { acctest.AccTestPreCheck(t) },
237-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
235+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
238236
CheckDestroy: testAccCheckComputeRouterDestroyProducer(t),
239237
Steps: []resource.TestStep{
240238
{
241239
Config: testAccComputeRouter_resourceManagerTags(context),
242240
},
243241
{
244-
ResourceName: "google_compute_router.foobar",
245-
ImportState: true,
246-
ImportStateVerify: true,
242+
ResourceName: "google_compute_router.foobar",
243+
ImportState: true,
244+
ImportStateVerify: true,
247245
ImportStateVerifyIgnore: []string{"params"},
248246
},
249247
},
250248
})
251249
}
252-
{{- end }}
253250

254251
func testAccComputeRouterBasic(routerName, resourceRegion string) string {
255252
return fmt.Sprintf(`
@@ -428,25 +425,20 @@ resource "google_compute_router" "foobar" {
428425
`, routerName, routerName)
429426
}
430427

431-
432-
{{- if ne $.TargetVersionName "ga" }}
433428
func testAccComputeRouter_resourceManagerTags(context map[string]interface{}) string {
434429
return acctest.Nprintf(`
435430
resource "google_compute_network" "foobar" {
436-
provider = google-beta
437431
name = "%{network_name}"
438432
auto_create_subnetworks = false
439433
}
440434
441435
resource "google_compute_subnetwork" "foobar" {
442-
provider = google-beta
443436
name = "%{subnet_name}"
444437
network = google_compute_network.foobar.self_link
445438
ip_cidr_range = "10.0.0.0/16"
446439
}
447440
448441
resource "google_compute_router" "foobar" {
449-
provider = google-beta
450442
name = "%{router_name}"
451443
region = google_compute_subnetwork.foobar.region
452444
network = google_compute_network.foobar.name
@@ -461,4 +453,3 @@ func testAccComputeRouter_resourceManagerTags(context map[string]interface{}) st
461453
}
462454
`, context)
463455
}
464-
{{- end }}

0 commit comments

Comments
 (0)