From 9336f6bb2d06d8585da30bbfd64d097e2d8a2214 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Wed, 6 Jul 2022 17:48:50 +0000 Subject: [PATCH] Upgrade DCL to v1.12.1 (#6179) Signed-off-by: Modular Magician --- .changelog/6179.txt | 3 +++ go.mod | 2 +- go.sum | 4 ++++ google-beta/resource_apikeys_key.go | 2 +- google-beta/resource_clouddeploy_target.go | 13 ++++++++----- google-beta/resource_container_aws_cluster.go | 4 ---- google-beta/resource_container_aws_node_pool.go | 2 +- google-beta/resource_container_azure_cluster.go | 5 ----- google-beta/resource_firebaserules_release.go | 4 ++-- website/docs/r/apikeys_key.html.markdown | 2 +- website/docs/r/firebaserules_release.html.markdown | 10 ++++++---- website/docs/r/firebaserules_ruleset.html.markdown | 6 ++++-- 12 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 .changelog/6179.txt diff --git a/.changelog/6179.txt b/.changelog/6179.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/6179.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/go.mod b/go.mod index 586c870a3c..b86371fd7e 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/hashicorp/terraform-provider-google-beta require ( cloud.google.com/go/bigtable v1.13.0 - github.com/GoogleCloudPlatform/declarative-resource-client-library v1.11.0 + github.com/GoogleCloudPlatform/declarative-resource-client-library v1.12.1 github.com/apparentlymart/go-cidr v1.1.0 github.com/client9/misspell v0.3.4 github.com/davecgh/go-spew v1.1.1 diff --git a/go.sum b/go.sum index c843eb06d4..f73cabdec0 100644 --- a/go.sum +++ b/go.sum @@ -368,6 +368,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932 h1:5/4TSDzpDnHQ8rKEEQBjRlYx77mHOvXu08oGchxej7o= +github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932/go.mod h1:cC6EdPbj/17GFCPDK39NRarlMI+kt+O60S12cNB5J9Y= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -1515,3 +1517,5 @@ github.com/GoogleCloudPlatform/declarative-resource-client-library v1.10.3 h1:Ds github.com/GoogleCloudPlatform/declarative-resource-client-library v1.10.3/go.mod h1:UJoDYx6t3+xCOd+dZX8+NrEB+Y/eW1pQlvxh2Gt7y5E= github.com/GoogleCloudPlatform/declarative-resource-client-library v1.11.0 h1:ZGyOhpvdhu9P7KFR3GtqresK5WyCX5bRP3AwCsRTjqw= github.com/GoogleCloudPlatform/declarative-resource-client-library v1.11.0/go.mod h1:UJoDYx6t3+xCOd+dZX8+NrEB+Y/eW1pQlvxh2Gt7y5E= +github.com/GoogleCloudPlatform/declarative-resource-client-library v1.12.1 h1:/wOjQoExE9DuynQfCv6gNQyOLPYL2v1vUpbB8TRj/Ho= +github.com/GoogleCloudPlatform/declarative-resource-client-library v1.12.1/go.mod h1:i6Pmzp7aolLmJY86RaJ9wjqm/HFleMeN7Vl5uIWLwE8= diff --git a/google-beta/resource_apikeys_key.go b/google-beta/resource_apikeys_key.go index 6e756c074a..064550e883 100644 --- a/google-beta/resource_apikeys_key.go +++ b/google-beta/resource_apikeys_key.go @@ -49,7 +49,7 @@ func resourceApikeysKey() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The resource name of the key. The name must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the name must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.", + Description: "The resource name of the key. The name must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the name must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.", }, "display_name": { diff --git a/google-beta/resource_clouddeploy_target.go b/google-beta/resource_clouddeploy_target.go index 73b1fa80b2..756165ae80 100644 --- a/google-beta/resource_clouddeploy_target.go +++ b/google-beta/resource_clouddeploy_target.go @@ -83,6 +83,7 @@ func resourceClouddeployTarget() *schema.Resource { "execution_configs": { Type: schema.TypeList, + Computed: true, Optional: true, Description: "Configurations for all execution that relates to this `Target`. Each `ExecutionEnvironmentUsage` value may only be used in a single configuration; using the same value multiple times is an error. When one or more configurations are specified, they must include the `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values. When no configurations are specified, execution will use the default specified in `DefaultPool`.", Elem: ClouddeployTargetExecutionConfigsSchema(), @@ -177,12 +178,14 @@ func ClouddeployTargetExecutionConfigsSchema() *schema.Resource { "artifact_storage": { Type: schema.TypeString, + Computed: true, Optional: true, Description: "Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket (\"gs://my-bucket\") or a path within a bucket (\"gs://my-bucket/my-dir\"). If unspecified, a default bucket located in the same region will be used.", }, "service_account": { Type: schema.TypeString, + Computed: true, Optional: true, Description: "Optional. Google service account to use for execution. If unspecified, the project execution service account (-compute@developer.gserviceaccount.com) is used.", }, @@ -508,12 +511,12 @@ func flattenClouddeployTargetAnthosCluster(obj *clouddeploy.TargetAnthosCluster) } func expandClouddeployTargetExecutionConfigsArray(o interface{}) []clouddeploy.TargetExecutionConfigs { if o == nil { - return make([]clouddeploy.TargetExecutionConfigs, 0) + return nil } objs := o.([]interface{}) if len(objs) == 0 || objs[0] == nil { - return make([]clouddeploy.TargetExecutionConfigs, 0) + return nil } items := make([]clouddeploy.TargetExecutionConfigs, 0, len(objs)) @@ -527,14 +530,14 @@ func expandClouddeployTargetExecutionConfigsArray(o interface{}) []clouddeploy.T func expandClouddeployTargetExecutionConfigs(o interface{}) *clouddeploy.TargetExecutionConfigs { if o == nil { - return clouddeploy.EmptyTargetExecutionConfigs + return nil } obj := o.(map[string]interface{}) return &clouddeploy.TargetExecutionConfigs{ Usages: expandClouddeployTargetExecutionConfigsUsagesArray(obj["usages"]), - ArtifactStorage: dcl.String(obj["artifact_storage"].(string)), - ServiceAccount: dcl.String(obj["service_account"].(string)), + ArtifactStorage: dcl.StringOrNil(obj["artifact_storage"].(string)), + ServiceAccount: dcl.StringOrNil(obj["service_account"].(string)), WorkerPool: dcl.String(obj["worker_pool"].(string)), } } diff --git a/google-beta/resource_container_aws_cluster.go b/google-beta/resource_container_aws_cluster.go index de8cda6c61..132a7f2677 100644 --- a/google-beta/resource_container_aws_cluster.go +++ b/google-beta/resource_container_aws_cluster.go @@ -117,7 +117,6 @@ func resourceContainerAwsCluster() *schema.Resource { Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Logging configuration.", MaxItems: 1, Elem: ContainerAwsClusterLoggingConfigSchema(), @@ -240,7 +239,6 @@ func ContainerAwsClusterControlPlaneSchema() *schema.Resource { "iam_instance_profile": { Type: schema.TypeString, Required: true, - ForceNew: true, Description: "The name of the AWS IAM instance pofile to assign to each control plane replica.", }, @@ -543,7 +541,6 @@ func ContainerAwsClusterLoggingConfigSchema() *schema.Resource { Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Configuration of the logging components.", MaxItems: 1, Elem: ContainerAwsClusterLoggingConfigComponentConfigSchema(), @@ -559,7 +556,6 @@ func ContainerAwsClusterLoggingConfigComponentConfigSchema() *schema.Resource { Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Components of the logging configuration to be enabled.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/resource_container_aws_node_pool.go b/google-beta/resource_container_aws_node_pool.go index 93fc48f010..1f5320522f 100644 --- a/google-beta/resource_container_aws_node_pool.go +++ b/google-beta/resource_container_aws_node_pool.go @@ -192,7 +192,6 @@ func ContainerAwsNodePoolConfigSchema() *schema.Resource { "iam_instance_profile": { Type: schema.TypeString, Required: true, - ForceNew: true, Description: "The name of the AWS IAM role assigned to nodes in the pool.", }, @@ -218,6 +217,7 @@ func ContainerAwsNodePoolConfigSchema() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, + ForceNew: true, Description: "Optional. The AWS instance type. When unspecified, it defaults to `m5.large`.", }, diff --git a/google-beta/resource_container_azure_cluster.go b/google-beta/resource_container_azure_cluster.go index 0894791d47..e9581b1037 100644 --- a/google-beta/resource_container_azure_cluster.go +++ b/google-beta/resource_container_azure_cluster.go @@ -132,7 +132,6 @@ func resourceContainerAzureCluster() *schema.Resource { Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Logging configuration.", MaxItems: 1, Elem: ContainerAzureClusterLoggingConfigSchema(), @@ -230,7 +229,6 @@ func ContainerAzureClusterControlPlaneSchema() *schema.Resource { "ssh_config": { Type: schema.TypeList, Required: true, - ForceNew: true, Description: "SSH configuration for how to access the underlying control plane machines.", MaxItems: 1, Elem: ContainerAzureClusterControlPlaneSshConfigSchema(), @@ -319,7 +317,6 @@ func ContainerAzureClusterControlPlaneSshConfigSchema() *schema.Resource { "authorized_key": { Type: schema.TypeString, Required: true, - ForceNew: true, Description: "The SSH public key data for VMs managed by Anthos. This accepts the authorized_keys file format used in OpenSSH according to the sshd(8) manual page.", }, }, @@ -464,7 +461,6 @@ func ContainerAzureClusterLoggingConfigSchema() *schema.Resource { Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Configuration of the logging components.", MaxItems: 1, Elem: ContainerAzureClusterLoggingConfigComponentConfigSchema(), @@ -480,7 +476,6 @@ func ContainerAzureClusterLoggingConfigComponentConfigSchema() *schema.Resource Type: schema.TypeList, Computed: true, Optional: true, - ForceNew: true, Description: "Components of the logging configuration to be enabled.", Elem: &schema.Schema{Type: schema.TypeString}, }, diff --git a/google-beta/resource_firebaserules_release.go b/google-beta/resource_firebaserules_release.go index e0c943ca01..d7e2f4d118 100644 --- a/google-beta/resource_firebaserules_release.go +++ b/google-beta/resource_firebaserules_release.go @@ -49,14 +49,14 @@ func resourceFirebaserulesRelease() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "Format: `projects/{project_id}/releases/{release_id}`", + Description: "Format: `projects/{project_id}/releases/{release_id}`\\Firestore Rules Releases will **always** have the name 'cloud.firestore'", }, "ruleset_name": { Type: schema.TypeString, Required: true, DiffSuppressFunc: compareSelfLinkOrResourceName, - Description: "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist the `Release` to be created.", + Description: "Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created.", }, "project": { diff --git a/website/docs/r/apikeys_key.html.markdown b/website/docs/r/apikeys_key.html.markdown index 304e496b29..930df7b64f 100644 --- a/website/docs/r/apikeys_key.html.markdown +++ b/website/docs/r/apikeys_key.html.markdown @@ -164,7 +164,7 @@ The following arguments are supported: * `name` - (Required) - The resource name of the key. The name must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the name must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + The resource name of the key. The name must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the name must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. diff --git a/website/docs/r/firebaserules_release.html.markdown b/website/docs/r/firebaserules_release.html.markdown index 549a2fe5cd..d7a70e9f2e 100644 --- a/website/docs/r/firebaserules_release.html.markdown +++ b/website/docs/r/firebaserules_release.html.markdown @@ -18,13 +18,15 @@ layout: "google" page_title: "Google: google_firebaserules_release" sidebar_current: "docs-google-firebaserules-release" description: |- - The Firebaserules Release resource + --- # google_firebaserules_release -The Firebaserules Release resource + +For more information, see: +* [Get started with Firebase Security Rules](https://firebase.google.com/docs/rules/get-started) ## Example Usage - basic_release Creates a basic Firebase Rules Release ```hcl @@ -90,11 +92,11 @@ The following arguments are supported: * `name` - (Required) - Format: `projects/{project_id}/releases/{release_id}` + Format: `projects/{project_id}/releases/{release_id}`\Firestore Rules Releases will **always** have the name 'cloud.firestore' * `ruleset_name` - (Required) - Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist the `Release` to be created. + Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. diff --git a/website/docs/r/firebaserules_ruleset.html.markdown b/website/docs/r/firebaserules_ruleset.html.markdown index cd1afbdcf4..da97711c5c 100644 --- a/website/docs/r/firebaserules_ruleset.html.markdown +++ b/website/docs/r/firebaserules_ruleset.html.markdown @@ -18,13 +18,15 @@ layout: "google" page_title: "Google: google_firebaserules_ruleset" sidebar_current: "docs-google-firebaserules-ruleset" description: |- - The Firebaserules Ruleset resource + --- # google_firebaserules_ruleset -The Firebaserules Ruleset resource + +For more information, see: +* [Get started with Firebase Security Rules](https://firebase.google.com/docs/rules/get-started) ## Example Usage - basic_ruleset Creates a basic Firestore ruleset ```hcl