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

Create service accounts return INVALID_ARGUMENT #674

Open
TriPSs opened this issue Nov 5, 2021 · 0 comments
Open

Create service accounts return INVALID_ARGUMENT #674

TriPSs opened this issue Nov 5, 2021 · 0 comments

Comments

@TriPSs
Copy link

TriPSs commented Nov 5, 2021

Input:

imports:
  - path: templates/service_accounts.jinja
    name: service_accounts.jinja

resources:
  - name: cloud-functions
    type: service_accounts.jinja
    properties:
      description: "Fallback service account for functions"

service_accounts.jinja:

resources:
- type: gcp-types/iam-v1:projects.serviceAccounts
  name: {{ env['name'] }}
  properties:
    accountId: {{ env['name'] }}
    displayName: {{ env['name'] }}

    {% if 'description' in properties %}
    description: {{ properties['description'] }}
    {% endif %}

Output:

- code: RESOURCE_ERROR
  location: /deployments/resources-service-accounts/resources/cfs-email
  message: '{"ResourceType":"gcp-types/iam-v1:projects.serviceAccounts","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"Invalid
    JSON payload received. Unknown name \"description\": Cannot find field.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"description":"Invalid
    JSON payload received. Unknown name \"description\": Cannot find field."}]}],"statusMessage":"Bad
    Request","requestPath":"https://iam.googleapis.com/v1/projects/project-app/serviceAccounts","httpMethod":"POST"}}'

It's unclear why my request is invalid, and why it throws INVALID_ARGUMENT as docs say description is a valid field..

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant