Skip to content

Commit 67b9632

Browse files
Use connection_name in Cloud Run Sql example (#4391) (#2861)
Signed-off-by: Modular Magician <[email protected]>
1 parent afffe51 commit 67b9632

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.changelog/4391.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_cloud_run_service_generated_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ func TestAccCloudRunService_cloudRunServiceSqlExample(t *testing.T) {
7878
t.Parallel()
7979

8080
context := map[string]interface{}{
81-
"project": getTestProjectFromEnv(),
8281
"deletion_protection": false,
8382
"random_suffix": randString(t, 10),
8483
}
@@ -120,7 +119,7 @@ resource "google_cloud_run_service" "default" {
120119
metadata {
121120
annotations = {
122121
"autoscaling.knative.dev/maxScale" = "1000"
123-
"run.googleapis.com/cloudsql-instances" = "%{project}:us-central1:${google_sql_database_instance.instance.name}"
122+
"run.googleapis.com/cloudsql-instances" = google_sql_database_instance.instance.connection_name
124123
"run.googleapis.com/client-name" = "terraform"
125124
}
126125
}

website/docs/r/cloud_run_service.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ resource "google_cloud_run_service" "default" {
9494
metadata {
9595
annotations = {
9696
"autoscaling.knative.dev/maxScale" = "1000"
97-
"run.googleapis.com/cloudsql-instances" = "my-project-name:us-central1:${google_sql_database_instance.instance.name}"
97+
"run.googleapis.com/cloudsql-instances" = google_sql_database_instance.instance.connection_name
9898
"run.googleapis.com/client-name" = "terraform"
9999
}
100100
}

0 commit comments

Comments
 (0)