Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mmv1/products/networkservices/MulticastDomain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ properties:
Use the following format:
`projects/{project}/locations/global/multicastDomainGroups/{multicast_domain_group}`.
immutable: true
- name: ullMulticastDomain
type: NestedObject
description: Information for an Ultra-Low-Latency multicast domain.
immutable: true
properties:
- name: preconfiguredUllDomain
type: String
description: The preconfigured Ultra-Low-Latency domain name.
immutable: true
- name: name
type: String
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,88 @@ resource "google_network_services_multicast_domain" md_test {
}
`, context)
}

func TestAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"random_suffix": acctest.RandString(t, 10),
}

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
CheckDestroy: testAccCheckNetworkServicesMulticastDomainDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_full(context),
},
{
ResourceName: "google_network_services_multicast_domain.md_test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"},
},
{
Config: testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_diff(context),
ConfigPlanChecks: resource.ConfigPlanChecks{
PreApply: []plancheck.PlanCheck{
plancheck.ExpectResourceAction("google_network_services_multicast_domain.md_test", plancheck.ResourceActionUpdate),
},
},
},
{
ResourceName: "google_network_services_multicast_domain.md_test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"},
},
},
})
}

func testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_full(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_compute_network" "network" {
name = "tf-test-test-md-network%{random_suffix}"
auto_create_subnetworks = false
}
resource "google_network_services_multicast_domain" md_test {
multicast_domain_id = "tf-test-test-md-domain%{random_suffix}"
location = "global"
admin_network = google_compute_network.network.id
connection_config {
connection_type="SAME_VPC"
}
ull_multicast_domain_config {
preconfigured_ull_domain = "e2e-test-internal-feed"
}
depends_on = [google_compute_network.network]
}
`, context)
}

func testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_diff(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_compute_network" "network" {
name = "tf-test-test-md-network%{random_suffix}"
auto_create_subnetworks = false
}
resource "google_network_services_multicast_domain" md_test {
multicast_domain_id = "tf-test-test-md-domain%{random_suffix}"
location = "global"
description = "A sample domain"
labels = {
label-one = "value-one"
}
admin_network = google_compute_network.network.id
connection_config {
connection_type="SAME_VPC"
}
ull_multicast_domain_config {
preconfigured_ull_domain = "e2e-test-internal-feed"
}
depends_on = [google_compute_network.network]
}
`, context)
}
Loading