Repository: GoogleCloudPlatform/terraform-validator
Pull request #551 (2022-02-26 00:09:21)

Update terraform `google_sql_user` documentation
<!-- Put a description of what this PR is for here, along with any references to issues that this resolves or contributes to -->

This PR updates terraform `google_sql_user` documentation to match the description from the code https://github.com/hashicorp/terraform-provider-google/commit/c379b233c255e189ed8f789549d0c8161995ec72#diff-45bacfc09fb005e7286cff68af7add826cfd1ffa603d27d621c2af0e076b859eR59-R60


<!--
Replace each [ ] with [X] to check it. Switch to the preview view to make it easier to click on links.
These steps will speed up the review process, and we appreciate you spending time on them before sending
your code to be reviewed.
-->
If this PR is for Terraform, I acknowledge that I have:

- [x] Searched through the [issue tracker](https://github.com/hashicorp/terraform-provider-google/issues) for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
- [ ] [Generated Terraform](https://github.com/GoogleCloudPlatform/magic-modules#generating-downstream-tools), and ran `make test` and `make lint` to ensure it passes unit and linter tests.
- [ ] Ensured that all new fields I added that can be set by a user appear in at least one [example](https://github.com/GoogleCloudPlatform/magic-modules/tree/master/templates/terraform/examples) (for generated resources) or [third_party test](https://github.com/GoogleCloudPlatform/magic-modules/tree/master/third_party/terraform/tests) (for handwritten resources or update tests).
- [ ] [Ran](https://github.com/hashicorp/terraform-provider-google/blob/master/.github/CONTRIBUTING.md#tests) relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
- [ ] Read the [Release Notes Guide](https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md) before writing my release note below.

<!-- AUTOCHANGELOG for Downstream PRs.

Please select one of the following "release-note:" headings:
    - release-note:enhancement
    - release-note:bug
    - release-note:note
    - release-note:new-resource
    - release-note:new-datasource
    - release-note:deprecation
    - release-note:breaking-change
    - release-note:none
    
Unless you choose release-note:none, please add a release note.

See .ci/RELEASE_NOTES_GUIDE.md for writing good release notes.

You can add more release note blocks if you want more than one CHANGELOG
entry for this PR.
-->
**Release Note Template for Downstream PRs (will be copied)**

```release-note:none
```


Derived from https://github.com/GoogleCloudPlatform/magic-modules/pull/5752


Patch:
diff --git a/go.mod b/go.mod
index 99e326d3..5022d85c 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
 	github.com/hashicorp/go-cleanhttp v0.5.2
 	github.com/hashicorp/terraform-json v0.13.0
 	github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
-	github.com/hashicorp/terraform-provider-google v1.20.1-0.20220225230226-dd37ba5f9ac7
+	github.com/hashicorp/terraform-provider-google v1.20.1-0.20220226000431-1027d660f20a
 	github.com/kr/pretty v0.3.0 // indirect
 	github.com/mitchellh/go-homedir v1.1.0
 	github.com/onsi/gomega v1.17.0 // indirect
diff --git a/go.sum b/go.sum
index bb546e45..80a2c12e 100644
--- a/go.sum
+++ b/go.sum
@@ -707,8 +707,8 @@ github.com/hashicorp/terraform-plugin-log v0.2.0/go.mod h1:E1kJmapEHzqu1x6M++gjv
 github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.0/go.mod h1:JBItawj+j8Ssla5Ib6BC/W9VQkOucBfnX7VRtyx1vw8=
 github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1 h1:B9AocC+dxrCqcf4vVhztIkSkt3gpRjUkEka8AmZWGlQ=
 github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1/go.mod h1:FjM9DXWfP0w/AeOtJoSKHBZ01LqmaO6uP4bXhv3fekw=
-github.com/hashicorp/terraform-provider-google v1.20.1-0.20220225230226-dd37ba5f9ac7 h1:x5tdyChUO8vfHlIeKZSP6jtuGcnb+JGFh/TP/S+mgaY=
-github.com/hashicorp/terraform-provider-google v1.20.1-0.20220225230226-dd37ba5f9ac7/go.mod h1:GS15ggbms0kmg5zKK1qCcnUKpLUEL2OL91hvuxFjKrA=
+github.com/hashicorp/terraform-provider-google v1.20.1-0.20220226000431-1027d660f20a h1:RwkIHxaYDhaOua/cLW4yRI3rX6seUNik28SjOhBj4TQ=
+github.com/hashicorp/terraform-provider-google v1.20.1-0.20220226000431-1027d660f20a/go.mod h1:GS15ggbms0kmg5zKK1qCcnUKpLUEL2OL91hvuxFjKrA=
 github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 h1:1FGtlkJw87UsTMg5s8jrekrHmUPUJaMcu6ELiVhQrNw=
 github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896/go.mod h1:bzBPnUIkI0RxauU8Dqo+2KrZZ28Cf48s8V6IHt3p4co=
 github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0=


Test patch:
diff --git a/testdata/generatedconvert/CloudRunDomainMapping_cloudRunDomainMappingBasicExample_offline.json b/testdata/generatedconvert/CloudRunDomainMapping_cloudRunDomainMappingBasicExample_offline.json
new file mode 100644
index 00000000..d884adf5
--- /dev/null
+++ b/testdata/generatedconvert/CloudRunDomainMapping_cloudRunDomainMappingBasicExample_offline.json
@@ -0,0 +1,55 @@
+[
+  {
+    "name": "//run.googleapis.com/projects/foobar/locations/us-central1/DomainMappings/tf-test-domainmeepmerp.gcp.tfacc.hashicorptest.com",
+    "asset_type": "run.googleapis.com/DomainMapping",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/run/v1/rest",
+      "discovery_name": "DomainMapping",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "apiVersion": "domains.cloudrun.com/v1",
+        "kind": "DomainMapping",
+        "metadata": {
+          "name": "tf-test-domainmeepmerp.gcp.tfacc.hashicorptest.com",
+          "namespace": "foobar"
+        },
+        "spec": {
+          "certificateMode": "AUTOMATIC",
+          "routeName": "tf-test-cloudrun-srvmeepmerp"
+        }
+      }
+    }
+  },
+  {
+    "name": "//run.googleapis.com/projects/foobar/locations/us-central1/services/tf-test-cloudrun-srvmeepmerp",
+    "asset_type": "run.googleapis.com/Service",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/run/v1/rest",
+      "discovery_name": "Service",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "apiVersion": "serving.knative.dev/v1",
+        "kind": "Service",
+        "metadata": {
+          "name": "tf-test-cloudrun-srvmeepmerp",
+          "namespace": "foobar"
+        },
+        "spec": {
+          "template": {
+            "spec": {
+              "containers": [
+                {
+                  "image": "us-docker.pkg.dev/cloudrun/container/hello"
+                }
+              ]
+            }
+          }
+        }
+      }
+    }
+  }
+]
diff --git a/testdata/generatedconvert/CloudRunService_cloudRunServiceBasicExample_offline.json b/testdata/generatedconvert/CloudRunService_cloudRunServiceBasicExample_offline.json
new file mode 100644
index 00000000..df78f812
--- /dev/null
+++ b/testdata/generatedconvert/CloudRunService_cloudRunServiceBasicExample_offline.json
@@ -0,0 +1,37 @@
+[
+  {
+    "name": "//run.googleapis.com/projects/foobar/locations/us-central1/services/tf-test-cloudrun-srvmeepmerp",
+    "asset_type": "run.googleapis.com/Service",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/run/v1/rest",
+      "discovery_name": "Service",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "apiVersion": "serving.knative.dev/v1",
+        "kind": "Service",
+        "metadata": {
+          "name": "tf-test-cloudrun-srvmeepmerp"
+        },
+        "spec": {
+          "template": {
+            "spec": {
+              "containers": [
+                {
+                  "image": "us-docker.pkg.dev/cloudrun/container/hello"
+                }
+              ]
+            }
+          },
+          "traffic": [
+            {
+              "latestRevision": true,
+              "percent": 100
+            }
+          ]
+        }
+      }
+    }
+  }
+]
diff --git a/testdata/generatedconvert/CloudRunService_cloudRunServiceMultipleEnvironmentVariablesExample_offline.json b/testdata/generatedconvert/CloudRunService_cloudRunServiceMultipleEnvironmentVariablesExample_offline.json
new file mode 100644
index 00000000..69a4d5b3
--- /dev/null
+++ b/testdata/generatedconvert/CloudRunService_cloudRunServiceMultipleEnvironmentVariablesExample_offline.json
@@ -0,0 +1,50 @@
+[
+  {
+    "name": "//run.googleapis.com/projects/foobar/locations/us-central1/services/tf-test-cloudrun-srvmeepmerp",
+    "asset_type": "run.googleapis.com/Service",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/run/v1/rest",
+      "discovery_name": "Service",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "apiVersion": "serving.knative.dev/v1",
+        "kind": "Service",
+        "metadata": {
+          "annotations": {
+            "generated-by": "magic-modules"
+          },
+          "name": "tf-test-cloudrun-srvmeepmerp"
+        },
+        "spec": {
+          "template": {
+            "spec": {
+              "containers": [
+                {
+                  "env": [
+                    {
+                      "name": "SOURCE",
+                      "value": "remote"
+                    },
+                    {
+                      "name": "TARGET",
+                      "value": "home"
+                    }
+                  ],
+                  "image": "us-docker.pkg.dev/cloudrun/container/hello"
+                }
+              ]
+            }
+          },
+          "traffic": [
+            {
+              "latestRevision": true,
+              "percent": 100
+            }
+          ]
+        }
+      }
+    }
+  }
+]
diff --git a/testdata/generatedconvert/CloudRunService_cloudRunServiceSqlExample_offline.json b/testdata/generatedconvert/CloudRunService_cloudRunServiceSqlExample_offline.json
new file mode 100644
index 00000000..6120dcdc
--- /dev/null
+++ b/testdata/generatedconvert/CloudRunService_cloudRunServiceSqlExample_offline.json
@@ -0,0 +1,56 @@
+[
+  {
+    "name": "//cloudsql.googleapis.com/projects/foobar/instances/tf-test-cloudrun-sqlmeepmerp",
+    "asset_type": "sqladmin.googleapis.com/Instance",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1beta4",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/sqladmin/v1beta4/rest",
+      "discovery_name": "DatabaseInstance",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "databaseVersion": "MYSQL_5_7",
+        "name": "tf-test-cloudrun-sqlmeepmerp",
+        "project": "foobar",
+        "region": "us-east1",
+        "settings": {
+          "activationPolicy": "ALWAYS",
+          "availabilityType": "ZONAL",
+          "dataDiskType": "PD_SSD",
+          "pricingPlan": "PER_USE",
+          "storageAutoResize": true,
+          "tier": "db-f1-micro"
+        }
+      }
+    }
+  },
+  {
+    "name": "//run.googleapis.com/projects/foobar/locations/us-central1/services/tf-test-cloudrun-srvmeepmerp",
+    "asset_type": "run.googleapis.com/Service",
+    "ancestry_path": "organization/12345/folder/67890/project/foobar",
+    "resource": {
+      "version": "v1",
+      "discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/run/v1/rest",
+      "discovery_name": "Service",
+      "parent": "//cloudresourcemanager.googleapis.com/projects/foobar",
+      "data": {
+        "apiVersion": "serving.knative.dev/v1",
+        "kind": "Service",
+        "metadata": {
+          "name": "tf-test-cloudrun-srvmeepmerp"
+        },
+        "spec": {
+          "template": {
+            "spec": {
+              "containers": [
+                {
+                  "image": "us-docker.pkg.dev/cloudrun/container/hello"
+                }
+              ]
+            }
+          }
+        }
+      }
+    }
+  }
+]