Skip to content

Commit

Permalink
Fix static resource name in acceptance test TestAccVmwareengineNetwor…
Browse files Browse the repository at this point in the history
…kPolicy_vmwareEngineNetworkPolicyFullExample (GoogleCloudPlatform#11294)
  • Loading branch information
SarahFrench authored Jul 31, 2024
1 parent 8a4ab31 commit 0d6049e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
6 changes: 4 additions & 2 deletions mmv1/products/vmwareengine/NetworkPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ examples:
name: "vmware_engine_network_policy_basic"
primary_resource_id: "vmw-engine-network-policy"
vars:
name: "sample-network-policy"
network_name: 'sample-network'
network_policy_name: 'sample-network-policy'
test_env_vars:
region: :REGION
- !ruby/object:Provider::Terraform::Examples
name: "vmware_engine_network_policy_full"
primary_resource_id: "vmw-engine-network-policy"
vars:
name: "sample-network-policy-full"
network_name: 'sample-network'
network_policy_name: 'sample-network-policy'
test_env_vars:
region: :REGION

Expand Down
6 changes: 4 additions & 2 deletions mmv1/products/vmwareengine/go_NetworkPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ examples:
- name: 'vmware_engine_network_policy_basic'
primary_resource_id: 'vmw-engine-network-policy'
vars:
name: 'sample-network-policy'
network_name: 'sample-network'
network_policy_name: 'sample-network-policy'
test_env_vars:
region: 'REGION'
- name: 'vmware_engine_network_policy_full'
primary_resource_id: 'vmw-engine-network-policy'
vars:
name: 'sample-network-policy-full'
network_name: 'sample-network'
network_policy_name: 'sample-network-policy'
test_env_vars:
region: 'REGION'
parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resource "google_vmwareengine_network" "network-policy-nw" {
name = "standard-full-nw"
name = "{{index $.Vars "network_name"}}"
location = "global"
type = "STANDARD"
description = "VMwareEngine standard network sample"
}

resource "google_vmwareengine_network_policy" "{{$.PrimaryResourceId}}" {
location = "{{index $.TestEnvVars "region"}}"
name = "{{index $.Vars "name"}}"
name = "{{index $.Vars "network_policy_name"}}"
edge_services_cidr = "192.168.30.0/26"
vmware_engine_network = google_vmwareengine_network.network-policy-nw.id
description = "Sample Network Policy"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resource "google_vmwareengine_network" "network-policy-nw" {
name = "standard-nw"
name = "<%= ctx[:vars]['network_name'] %>"
location = "global"
type = "STANDARD"
description = "VMwareEngine standard network sample"
}

resource "google_vmwareengine_network_policy" "<%= ctx[:primary_resource_id] %>" {
location = "<%= ctx[:test_env_vars]['region'] %>"
name = "<%= ctx[:vars]['name'] %>"
name = "<%= ctx[:vars]['network_policy_name'] %>"
edge_services_cidr = "192.168.30.0/26"
vmware_engine_network = google_vmwareengine_network.network-policy-nw.id
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resource "google_vmwareengine_network" "network-policy-nw" {
name = "standard-full-nw"
name = "<%= ctx[:vars]['network_name'] %>"
location = "global"
type = "STANDARD"
description = "VMwareEngine standard network sample"
}

resource "google_vmwareengine_network_policy" "<%= ctx[:primary_resource_id] %>" {
location = "<%= ctx[:test_env_vars]['region'] %>"
name = "<%= ctx[:vars]['name'] %>"
name = "<%= ctx[:vars]['network_policy_name'] %>"
edge_services_cidr = "192.168.30.0/26"
vmware_engine_network = google_vmwareengine_network.network-policy-nw.id
description = "Sample Network Policy"
Expand Down

0 comments on commit 0d6049e

Please sign in to comment.