Skip to content

Commit c29fc4f

Browse files
Move CGC region tags to template file (#4999) (#3454)
* Move CGC region tags to template file * make rubocop happy * more rubocop * Update private_service_connect_google_apis.tf.erb * skip oics link for examples with test_env_vars * extra condition Signed-off-by: Modular Magician <[email protected]>
1 parent 86e9def commit c29fc4f

File tree

42 files changed

+48
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+48
-307
lines changed

.changelog/4999.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_compute_global_forwarding_rule_generated_test.go

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,11 @@ resource "google_compute_health_check" "default" {
232232
`, context)
233233
}
234234

235-
func TestAccComputeGlobalForwardingRule_globalForwardingRulePrivateServicesConnectExample(t *testing.T) {
235+
func TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample(t *testing.T) {
236236
t.Parallel()
237237

238238
context := map[string]interface{}{
239+
"project": getTestProjectFromEnv(),
239240
"random_suffix": randString(t, 10),
240241
}
241242

@@ -245,16 +246,34 @@ func TestAccComputeGlobalForwardingRule_globalForwardingRulePrivateServicesConne
245246
CheckDestroy: testAccCheckComputeGlobalForwardingRuleDestroyProducer(t),
246247
Steps: []resource.TestStep{
247248
{
248-
Config: testAccComputeGlobalForwardingRule_globalForwardingRulePrivateServicesConnectExample(context),
249+
Config: testAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample(context),
249250
},
250251
},
251252
})
252253
}
253254

254-
func testAccComputeGlobalForwardingRule_globalForwardingRulePrivateServicesConnectExample(context map[string]interface{}) string {
255+
func testAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample(context map[string]interface{}) string {
255256
return Nprintf(`
257+
resource "google_compute_network" "network" {
258+
provider = google-beta
259+
project = "%{project}"
260+
name = "tf-test-my-network%{random_suffix}"
261+
auto_create_subnetworks = false
262+
}
263+
264+
resource "google_compute_subnetwork" "vpc_subnetwork" {
265+
provider = google-beta
266+
project = google_compute_network.network.project
267+
name = "tf-test-my-subnetwork%{random_suffix}"
268+
ip_cidr_range = "10.2.0.0/16"
269+
region = "us-central1"
270+
network = google_compute_network.network.id
271+
private_ip_google_access = true
272+
}
273+
256274
resource "google_compute_global_address" "default" {
257275
provider = google-beta
276+
project = google_compute_network.network.project
258277
name = "tf-test-global-psconnect-ip%{random_suffix}"
259278
address_type = "INTERNAL"
260279
purpose = "PRIVATE_SERVICE_CONNECT"
@@ -264,18 +283,13 @@ resource "google_compute_global_address" "default" {
264283
265284
resource "google_compute_global_forwarding_rule" "default" {
266285
provider = google-beta
286+
project = google_compute_network.network.project
267287
name = "globalrule%{random_suffix}"
268288
target = "all-apis"
269289
network = google_compute_network.network.id
270290
ip_address = google_compute_global_address.default.id
271291
load_balancing_scheme = ""
272292
}
273-
274-
resource "google_compute_network" "network" {
275-
provider = google-beta
276-
name = "tf-test%{random_suffix}"
277-
auto_create_subnetworks = false
278-
}
279293
`, context)
280294
}
281295

google-beta/resource_dataproc_cluster_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import (
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1414
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1515

16-
dataproc "google.golang.org/api/dataproc/v1beta2"
1716
"google.golang.org/api/googleapi"
17+
18+
dataproc "google.golang.org/api/dataproc/v1beta2"
1819
)
1920

2021
func TestDataprocExtractInitTimeout(t *testing.T) {

website/docs/r/app_engine_firewall_rule.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ To get more information about FirewallRule, see:
3333
* How-to Guides
3434
* [Official Documentation](https://cloud.google.com/appengine/docs/standard/python/creating-firewalls#creating_firewall_rules)
3535

36-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
37-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=app_engine_firewall_rule_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
38-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
39-
</a>
40-
</div>
4136
## Example Usage - App Engine Firewall Rule Basic
4237

4338

website/docs/r/app_engine_flexible_app_version.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ To get more information about FlexibleAppVersion, see:
3737
* How-to Guides
3838
* [Official Documentation](https://cloud.google.com/appengine/docs/flexible)
3939

40-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
41-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=app_engine_flexible_app_version&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
42-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
43-
</a>
44-
</div>
4540
## Example Usage - App Engine Flexible App Version
4641

4742

website/docs/r/app_engine_service_split_traffic.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ To get more information about ServiceSplitTraffic, see:
2929

3030
* [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services)
3131

32-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
33-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=app_engine_service_split_traffic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
34-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
35-
</a>
36-
</div>
3732
## Example Usage - App Engine Service Split Traffic
3833

3934

website/docs/r/app_engine_standard_app_version.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ To get more information about StandardAppVersion, see:
3434
* How-to Guides
3535
* [Official Documentation](https://cloud.google.com/appengine/docs/standard)
3636

37-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
38-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=app_engine_standard_app_version&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
39-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
40-
</a>
41-
</div>
4237
## Example Usage - App Engine Standard App Version
4338

4439

website/docs/r/bigquery_job.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,6 @@ resource "google_bigquery_job" "job" {
176176
}
177177
}
178178
```
179-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
180-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=bigquery_job_copy&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
181-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
182-
</a>
183-
</div>
184179
## Example Usage - Bigquery Job Copy
185180

186181

website/docs/r/billing_budget.html.markdown

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ in the provider configuration. Otherwise the Billing Budgets API will return a 4
3737
Your account must have the `serviceusage.services.use` permission on the
3838
`billing_project` you defined.
3939

40-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
41-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=billing_budget_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
42-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
43-
</a>
44-
</div>
4540
## Example Usage - Billing Budget Basic
4641

4742

@@ -64,11 +59,6 @@ resource "google_billing_budget" "budget" {
6459
}
6560
}
6661
```
67-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
68-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=billing_budget_lastperiod&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
69-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
70-
</a>
71-
</div>
7262
## Example Usage - Billing Budget Lastperiod
7363

7464

@@ -100,11 +90,6 @@ resource "google_billing_budget" "budget" {
10090
}
10191
}
10292
```
103-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
104-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=billing_budget_filter&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
105-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
106-
</a>
107-
</div>
10893
## Example Usage - Billing Budget Filter
10994

11095

@@ -142,11 +127,6 @@ resource "google_billing_budget" "budget" {
142127
}
143128
}
144129
```
145-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
146-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=billing_budget_notify&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
147-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
148-
</a>
149-
</div>
150130
## Example Usage - Billing Budget Notify
151131

152132

website/docs/r/cloud_asset_folder_feed.html.markdown

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ To get more information about FolderFeed, see:
3131
* How-to Guides
3232
* [Official Documentation](https://cloud.google.com/asset-inventory/docs)
3333

34-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
35-
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=cloud_asset_folder_feed&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
36-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
37-
</a>
38-
</div>
3934
## Example Usage - Cloud Asset Folder Feed
4035

4136

0 commit comments

Comments
 (0)