From 8227284648d43865300eeb13e4aa29345c005b7e Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 30 Sep 2021 09:13:07 -0700 Subject: [PATCH] Remove the need to specify api/ files, pull directly from the DCL (#5197) (#10199) Signed-off-by: Modular Magician --- .changelog/5197.txt | 15 +++++++++++++++ go.mod | 2 +- go.sum | 8 ++++++++ google/resource_eventarc_trigger.go | 2 +- .../resource_privateca_certificate_template.go | 12 ------------ website/docs/r/eventarc_trigger.html.markdown | 17 ++++++++++++----- 6 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 .changelog/5197.txt diff --git a/.changelog/5197.txt b/.changelog/5197.txt new file mode 100644 index 00000000000..4b2dc5ce2c7 --- /dev/null +++ b/.changelog/5197.txt @@ -0,0 +1,15 @@ +```release-note:breaking-change +gke_hub: made the `config_membership` field in `google_gke_hub_feature` required, disallowing invalid configurations +``` +```release-note:breaking-change +gke_hub: made the `configmanagement`, `feature`, `location`, `membership` fields in `google_gke_hub_feature_membership` required, disallowing invalid configurations +``` +```release-note:enhancement +eventarc: added support for `uid` output field, `cloud_function` destination to `google_eventarc_trigger` +``` +```release-note:enhancement +gke_hub: added support for `resource_state`, `state` outputs to `google_gke_hub_feature` +``` +```release-note:enhancement +gke_hub: added support for `gcp_service_account_email` when configuring Git sync in `google_gke_hub_feature_membership` +``` diff --git a/go.mod b/go.mod index 6aca69080bf..09848d69bdc 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/hashicorp/terraform-provider-google require ( cloud.google.com/go/bigtable v1.10.1 - github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca + github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210929201636-4f607239a42a 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 15cfc5455f3..64ec8078e7b 100644 --- a/go.sum +++ b/go.sum @@ -1413,3 +1413,11 @@ github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-202109 github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923164710-b8734d273ffb/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca h1:mFy2An6ybqX6BTi0J2l2/sdqVF6EJW5AmqSeXC0L0sc= github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210923224644-6d2562f679ca/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210927194748-f5285936daed h1:3hFQRf4IDO7UOm4u1vfM4d406wLuHLLcXx/uMVGuVK8= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210927194748-f5285936daed/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210928224657-e77924ba70ed h1:YBsFxn8UjX6HlJBECGSW4iMVWqDK0zqSoZ/ouPeKGig= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210928224657-e77924ba70ed/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210929183012-8396494d598c h1:vyoyTx1HvbnIcyJv83G7IpsZzjJq/wn5/5ofD/lYoh4= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210929183012-8396494d598c/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210929201636-4f607239a42a h1:Qxf6GAn7dnwHI69E9fWhnVqBng4lpVjAJcLEuf1vffs= +github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210929201636-4f607239a42a/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU= diff --git a/google/resource_eventarc_trigger.go b/google/resource_eventarc_trigger.go index 09b7aadbf43..17511ababa5 100644 --- a/google/resource_eventarc_trigger.go +++ b/google/resource_eventarc_trigger.go @@ -221,7 +221,7 @@ func EventarcTriggerTransportPubsubSchema() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - Description: "Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. You may set an existing topic for triggers of the type `google.cloud.pubsub.topic.v1.messagePublished` only. The topic you provide here will not be deleted by Eventarc at trigger deletion.", + Description: "Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished` only. The topic you provide here will not be deleted by Eventarc at trigger deletion.", }, "subscription": { diff --git a/google/resource_privateca_certificate_template.go b/google/resource_privateca_certificate_template.go index d1d275711c1..4f28f7888a4 100644 --- a/google/resource_privateca_certificate_template.go +++ b/google/resource_privateca_certificate_template.go @@ -599,19 +599,7 @@ func resourcePrivatecaCertificateTemplateUpdate(d *schema.ResourceData, meta int PredefinedValues: expandPrivatecaCertificateTemplatePredefinedValues(d.Get("predefined_values")), Project: dcl.String(project), } - // Construct state hint from old values - old := &privateca.CertificateTemplate{ - Location: dcl.String(oldValue(d.GetChange("location")).(string)), - Name: dcl.String(oldValue(d.GetChange("name")).(string)), - Description: dcl.String(oldValue(d.GetChange("description")).(string)), - IdentityConstraints: expandPrivatecaCertificateTemplateIdentityConstraints(oldValue(d.GetChange("identity_constraints"))), - Labels: checkStringMap(oldValue(d.GetChange("labels"))), - PassthroughExtensions: expandPrivatecaCertificateTemplatePassthroughExtensions(oldValue(d.GetChange("passthrough_extensions"))), - PredefinedValues: expandPrivatecaCertificateTemplatePredefinedValues(oldValue(d.GetChange("predefined_values"))), - Project: dcl.StringOrNil(oldValue(d.GetChange("project")).(string)), - } directive := UpdateDirective - directive = append(directive, dcl.WithStateHint(old)) userAgent, err := generateUserAgentString(d, config.userAgent) if err != nil { return err diff --git a/website/docs/r/eventarc_trigger.html.markdown b/website/docs/r/eventarc_trigger.html.markdown index 49bb95f93b6..4edacb62e38 100644 --- a/website/docs/r/eventarc_trigger.html.markdown +++ b/website/docs/r/eventarc_trigger.html.markdown @@ -87,7 +87,7 @@ The following arguments are supported: * `matching_criteria` - (Required) - Required. The criteria by which events are filtered. Only events that match with this criteria will be sent to the destination. + Required. null The list of filters that applies to event attributes. Only events that match all the provided filters will be sent to the destination. * `name` - (Required) @@ -97,15 +97,19 @@ The following arguments are supported: The `destination` block supports: +* `cloud_function` - + (Optional) + The Cloud Function resource name. Only Cloud Functions V2 is supported. Format: projects/{project}/locations/{location}/functions/{function} + * `cloud_run_service` - (Optional) - Cloud Run fully-managed service that receives the events. The service should be running in the same project as the trigger. + Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger. The `matching_criteria` block supports: * `attribute` - (Required) - Required. The name of a CloudEvents attribute. Currently, only a subset of attributes can be specified. All triggers MUST provide a matching criteria for the 'type' attribute. + Required. The name of a CloudEvents attribute. Currently, only a subset of attributes are supported for filtering. All triggers MUST provide a filter for the 'type' attribute. * `value` - (Required) @@ -143,7 +147,7 @@ The `cloud_run_service` block supports: * `service` - (Required) - Required. The name of the Cloud run service being addressed (see https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services). Only services located in the same project of the trigger object can be addressed. + Required. The name of the Cloud Run service being addressed. See https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. Only services located in the same project of the trigger object can be addressed. The `transport` block supports: @@ -158,7 +162,7 @@ The `pubsub` block supports: * `topic` - (Optional) - Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. You may set an existing topic for triggers of the type `google.cloud.pubsub.topic.v1.messagePublished` only. The topic you provide here will not be deleted by Eventarc at trigger deletion. + Optional. The name of the Pub/Sub topic created and managed by Eventarc system as a transport for the event delivery. Format: `projects/{PROJECT_ID}/topics/{TOPIC_NAME You may set an existing topic for triggers of the type google.cloud.pubsub.topic.v1.messagePublished` only. The topic you provide here will not be deleted by Eventarc at trigger deletion. ## Attributes Reference @@ -172,6 +176,9 @@ In addition to the arguments listed above, the following computed attributes are * `etag` - Output only. This checksum is computed by the server based on the value of other fields, and may be sent only on create requests to ensure the client has an up-to-date value before proceeding. +* `uid` - + Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. + * `update_time` - Output only. The last-modified time.