Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventArc trigger matching_criteria does not support 'operator' field #11312

Closed
hile-codento opened this issue Mar 21, 2022 · 4 comments
Closed
Labels
enhancement size/s tpgtools Issues related to the tpgtools generator
Milestone

Comments

@hile-codento
Copy link

hile-codento commented Mar 21, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

EventArc eventFilters resource can be configured with matching_criteria field in terraform. This terraform schema supports fields 'attribute' and 'value' only.

Third field 'operator' is also required. This field can be used to implement additional resource filtering, at least with matching path patterns.

New or Affected Resource(s)

  • google_eventarc_trigger

Example configuration for the 'operator' field can be defined from cloud console by selecting resource type 'path pattern' in the eventarc trigger 'edit' form.

For a cloud storage bucket the resulting configuration is something like following, as seen in gcloud eventarc triggers describe output after defining pathPattern in web console:

eventFilters:
- attribute: resourceName
  operator: match-path-pattern
  value: /projects/_/buckets/my-bucket-name/objects/*
- attribute: type
  value: google.cloud.audit.log.v1.written
- attribute: serviceName
  value: storage.googleapis.com
- attribute: methodName
  value: storage.objects.create

Potential Terraform Configuration

    matching_criteria {
      attribute = "resourceName"
      operator = "match-path-pattern"
      value = "projects/_/buckets/${var.my_bucket_name}/objects/*"
    }

References

b/272800934

@rileykarson rileykarson added this to the Goals milestone Mar 21, 2022
@rileykarson rileykarson added the tpgtools Issues related to the tpgtools generator label Mar 21, 2022
@rileykarson
Copy link
Collaborator

@slevenick to raise against DCL

@slevenick
Copy link
Collaborator

Internal issue # 225936385

@slevenick slevenick removed their assignment Mar 21, 2022
@melinath
Copy link
Collaborator

This should be resolved at this point.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement size/s tpgtools Issues related to the tpgtools generator
Projects
None yet
Development

No branches or pull requests

4 participants