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.v1.Trigger is auto-named incorrectly #872

Open
mikhailshilkov opened this issue Apr 27, 2023 · 0 comments
Open

eventarc.v1.Trigger is auto-named incorrectly #872

mikhailshilkov opened this issue Apr 27, 2023 · 0 comments
Labels
area/providers impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec

Comments

@mikhailshilkov
Copy link
Member

The eventarc.v1.Trigger resource has two properties related to its name: a required triggerId:

https://github.com/pulumi/pulumi-google-native/blob/master/sdk/nodejs/eventarc/v1/trigger.ts#L201

and an optional name:

https://github.com/pulumi/pulumi-google-native/blob/master/sdk/nodejs/eventarc/v1/trigger.ts#L188

I suppose they represent the same thing, just with a different format. I cannot omit the triggerId, so I always have to set an explicit resource name. If I omit name, it seems to generate an auto-name with a random suffix, however it gets ignored and the eventual resource in Google Cloud will have the same name as my specified triggerId.

Digging into Google's specs (AIP-133):

Create RPCs may support this behavior by providing a string {resource}_id field on the request message.

and later

The name field on the resource must be ignored.

Therefore, I think the correct behavior would be:

  1. Do not project the name property into resource inputs.
  2. triggerId should be an optional property. The provider should auto-name it if user doesn't specify an explicit value.
@mikhailshilkov mikhailshilkov added impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec area/providers labels Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/providers impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

1 participant