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

credentials yaml depends on type being the dict name #117

Closed
max-l-weaver opened this issue Feb 13, 2024 · 2 comments
Closed

credentials yaml depends on type being the dict name #117

max-l-weaver opened this issue Feb 13, 2024 · 2 comments
Milestone

Comments

@max-l-weaver
Copy link

I try to deploy new credentials in Tower using seqerakit with the following yaml:

credentials:
  - name: foo
    key: ./key.json
    type: google
    overwrite: true
    workspace: foo/bar

and I get the following output in the logs:

DEBUG:root:DRYRUN: Running command tw credentials add --name foo --key ./key.json google --workspace foo/bar

As you can see the command has been mangled and this is because seqerakit relies on type being the dict name for credentials objects. This appears to be inconsistent with other Tower resources which use name in the examples.

I'm suggesting that instead of this, when the tw command is constructed it uses the object names rather than relying on the positioning of the incoming yaml. So it explicitly refers to the type value when it builds the command.

This will also help when creating scripts to autogenerate yaml code for seqerakit as it means you're not having to put any conditionals in for credentials to ensure type is the dict name.

@max-l-weaver
Copy link
Author

This also relates to compute-env objects which rely on the type

@ejseqera
Copy link
Member

ejseqera commented Mar 4, 2024

Addressed this in #118. You should be able to create CEs, credentials and actions without explicit definition of type or file-path as the dict name. Also adds validation for these keys in the input YAML.

Let me know if you have further issues with this.

@ejseqera ejseqera closed this as completed Mar 4, 2024
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

2 participants