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

[documentation] It is not clear which commands are described #1809

Open
EugenKon opened this issue Sep 8, 2023 · 2 comments
Open

[documentation] It is not clear which commands are described #1809

EugenKon opened this issue Sep 8, 2023 · 2 comments
Labels

Comments

@EugenKon
Copy link

EugenKon commented Sep 8, 2023

https://github.com/hashicorp/consul-template#commands

I do not understand which commands are described and how to use them.

Particularly, I want to fetch value from aws secret manager: aws secretsmanager get-secret-value --secret-id ${PROJECT_NAME}/path --region ${AWS_REGION}. Is next possible?

job{ group { task {
      template {
        data = <<-EOH
          {{- with exec "aws secretmanager ..." -}}
          PGPASSWORD="{{ .Data.password }}"
          PGUSER="{{ .Data.user }}"
          PGDATABASE="{{ .Data.db }}"
          {{ end }}

        EOH
        destination = "secrets/file.env"
        env         = true
}}}
@blake
Copy link
Member

blake commented May 7, 2024

Hi @EugenKon, you might want to take a look at the plugin function. This would allow you to write a script that executes the aws secretmanager command and allows the output to be used within consul-template.

@blake blake added the question label May 7, 2024
@EugenKon
Copy link
Author

EugenKon commented May 7, 2024

@blake Interesting. Thank you, I'll look at it.

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

No branches or pull requests

2 participants