Skip to content

Commit

Permalink
Upgraded Eventarc trigger (#5704) (#4053)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Feb 14, 2022
1 parent c89bfe1 commit 986bace
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/5704.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
eventarc: changes in field documentation for eventarc_trigger resource
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/hashicorp/terraform-provider-google-beta
require (
cloud.google.com/go/bigtable v1.10.1
cloud.google.com/go/iam v0.1.1 // indirect
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20220125025424-6dfdf699127c
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20220210182700-d907d9756c56
github.com/apparentlymart/go-cidr v1.1.0
github.com/client9/misspell v0.3.4
github.com/davecgh/go-spew v1.1.1
Expand Down
4 changes: 3 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1502,4 +1502,6 @@ rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20220210182700-d907d9756c56 h1:nLSqClKErKCpuI/k+kU88PWB0E8cr08fyD7hCjdsirk=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20220210182700-d907d9756c56/go.mod h1:UJoDYx6t3+xCOd+dZX8+NrEB+Y/eW1pQlvxh2Gt7y5E=
7 changes: 4 additions & 3 deletions google-beta/resource_eventarc_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func resourceEventarcTrigger() *schema.Resource {
"name": {
Type: schema.TypeString,
Required: true,
Description: "Required. The resource name of the trigger. Must be unique within the location on the project and must be in `projects/{project}/locations/{location}/triggers/{trigger}` format.",
ForceNew: true,
Description: "Required. The resource name of the trigger. Must be unique within the location on the project.",
},

"labels": {
Expand Down Expand Up @@ -141,7 +142,7 @@ func EventarcTriggerDestinationSchema() *schema.Resource {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
Description: "The Cloud Function resource name. Only Cloud Functions V2 is supported. Format: projects/{project}/locations/{location}/functions/{function}",
Description: "[WARNING] Configuring a Cloud Function in Trigger is not supported as of today. The Cloud Function resource name. Format: projects/{project}/locations/{location}/functions/{function}",
},

"cloud_run_service": {
Expand Down Expand Up @@ -222,7 +223,7 @@ func EventarcTriggerTransportPubsubSchema() *schema.Resource {
Optional: true,
ForceNew: true,
DiffSuppressFunc: compareSelfLinkOrResourceName,
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": {
Expand Down
5 changes: 3 additions & 2 deletions google-beta/resource_gke_hub_feature_membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ func GkeHubFeatureMembershipConfigmanagementSchema() *schema.Resource {

"version": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Description: "Version of ACM installed.",
Description: "Optional. Version of ACM to install. Defaults to the latest version.",
},
},
}
Expand Down Expand Up @@ -533,7 +534,7 @@ func expandGkeHubFeatureMembershipConfigmanagement(o interface{}) *gkehub.Featur
ConfigSync: expandGkeHubFeatureMembershipConfigmanagementConfigSync(obj["config_sync"]),
HierarchyController: expandGkeHubFeatureMembershipConfigmanagementHierarchyController(obj["hierarchy_controller"]),
PolicyController: expandGkeHubFeatureMembershipConfigmanagementPolicyController(obj["policy_controller"]),
Version: dcl.String(obj["version"].(string)),
Version: dcl.StringOrNil(obj["version"].(string)),
}
}

Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/eventarc_trigger.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ The following arguments are supported:

* `name` -
(Required)
Required. The resource name of the trigger. Must be unique within the location on the project and must be in `projects/{project}/locations/{location}/triggers/{trigger}` format.
Required. The resource name of the trigger. Must be unique within the location on the project.



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}
[WARNING] Configuring a Cloud Function in Trigger is not supported as of today. The Cloud Function resource name. Format: projects/{project}/locations/{location}/functions/{function}

* `cloud_run_service` -
(Optional)
Expand Down Expand Up @@ -163,7 +163,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

Expand Down

0 comments on commit 986bace

Please sign in to comment.