Skip to content

Commit bf20858

Browse files
committed
Add ultra-low-latency multicast config.
1 parent a77f2d2 commit bf20858

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

mmv1/products/networkservices/MulticastDomain.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ properties:
119119
Use the following format:
120120
`projects/{project}/locations/global/multicastDomainGroups/{multicast_domain_group}`.
121121
immutable: true
122+
- name: ullMulticastDomain
123+
type: NestedObject
124+
description: Information for an Ultra-Low-Latency multicast domain.
125+
immutable: true
126+
properties:
127+
- name: preconfiguredUllDomain
128+
type: String
129+
description: The preconfigured Ultra-Low-Latency domain name.
130+
immutable: true
122131
- name: name
123132
type: String
124133
description: |-

mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_domain_test.go

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,88 @@ resource "google_network_services_multicast_domain" md_test {
8585
}
8686
`, context)
8787
}
88+
89+
func TestAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample(t *testing.T) {
90+
t.Parallel()
91+
92+
context := map[string]interface{}{
93+
"random_suffix": acctest.RandString(t, 10),
94+
}
95+
96+
acctest.VcrTest(t, resource.TestCase{
97+
PreCheck: func() { acctest.AccTestPreCheck(t) },
98+
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
99+
CheckDestroy: testAccCheckNetworkServicesMulticastDomainDestroyProducer(t),
100+
Steps: []resource.TestStep{
101+
{
102+
Config: testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_full(context),
103+
},
104+
{
105+
ResourceName: "google_network_services_multicast_domain.md_test",
106+
ImportState: true,
107+
ImportStateVerify: true,
108+
ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"},
109+
},
110+
{
111+
Config: testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_diff(context),
112+
ConfigPlanChecks: resource.ConfigPlanChecks{
113+
PreApply: []plancheck.PlanCheck{
114+
plancheck.ExpectResourceAction("google_network_services_multicast_domain.md_test", plancheck.ResourceActionUpdate),
115+
},
116+
},
117+
},
118+
{
119+
ResourceName: "google_network_services_multicast_domain.md_test",
120+
ImportState: true,
121+
ImportStateVerify: true,
122+
ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"},
123+
},
124+
},
125+
})
126+
}
127+
128+
func testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_full(context map[string]interface{}) string {
129+
return acctest.Nprintf(`
130+
resource "google_compute_network" "network" {
131+
name = "tf-test-test-md-network%{random_suffix}"
132+
auto_create_subnetworks = false
133+
}
134+
resource "google_network_services_multicast_domain" md_test {
135+
multicast_domain_id = "tf-test-test-md-domain%{random_suffix}"
136+
location = "global"
137+
admin_network = google_compute_network.network.id
138+
connection_config {
139+
connection_type="SAME_VPC"
140+
}
141+
ull_multicast_domain = {
142+
preconfigured_ull_domain = "e2e-test-internal-feed"
143+
}
144+
depends_on = [google_compute_network.network]
145+
}
146+
`, context)
147+
}
148+
149+
func testAccNetworkServicesMulticastDomain_networkServicesUllMulticastDomainUpdateExample_diff(context map[string]interface{}) string {
150+
return acctest.Nprintf(`
151+
resource "google_compute_network" "network" {
152+
name = "tf-test-test-md-network%{random_suffix}"
153+
auto_create_subnetworks = false
154+
}
155+
resource "google_network_services_multicast_domain" md_test {
156+
multicast_domain_id = "tf-test-test-md-domain%{random_suffix}"
157+
location = "global"
158+
description = "A sample domain"
159+
labels = {
160+
label-one = "value-one"
161+
}
162+
admin_network = google_compute_network.network.id
163+
connection_config {
164+
connection_type="SAME_VPC"
165+
}
166+
ull_multicast_domain = {
167+
preconfigured_ull_domain = "e2e-test-internal-feed"
168+
}
169+
depends_on = [google_compute_network.network]
170+
}
171+
`, context)
172+
}

0 commit comments

Comments
 (0)