-
Notifications
You must be signed in to change notification settings - Fork 772
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
Feature request: Support secret creation for github actions #271
Comments
Yes please |
github hasn't made api for secrets available yet, we have to wait for now |
Hi. Any updates on this - is the Secrets API still private...? |
❤️ |
GitHub is aiming to make this endpoint available within the next few sprints. Mention me here if I don't post an update in a month or so. |
Secrets have been added to the GitHub API https://developer.github.com/v3/actions/secrets/ |
We now need to wait till Go GitHub client releases action secrets - google/go-github#1402 |
+1 |
It looks like it was merged google/go-github#1402 (comment) and released in the v29.0.3 tag. |
I think we should also wait for #342 before we start implementing this one. |
What do we think about usage? Should action secrets be a new resource - resource "github_repository_action_secret" "foo" {
repository = "${github_repository.repo.name}"
name = "FOO"
secret = "plain secret"
} |
Is there a way to provide ciphertexts in terraform and supply the key via an environment variable? |
@hazcod I think one option would be that resource accepts two conflicting arguments - Off topic: In order to not store secrets in terraform files I use an approach where I store secrets somewhere else, and then use a data provider to get the secret values from there. In that case I only need to reference the value from data source in my TF resources. Secrets are managed manually. |
@radeksimko @jcudit @paultyng what are your thoughts on this? |
Note for the implementation: how to know if a secret has been changed and need to be updated by terraform ? The secret API does not offer a way to read the content of a secret (normal) but return the Should we store at least the |
Another option is that terraform does not detect and repair "drift" on this resource in case the data is updated or deleted outside of Terraform. I think it might also be possible to not store secrets in state, but instead store a hash value of the secret, in case current value hash does not match hash stored in state an update should be performed. |
A lurker (who wants this feature) chiming in... I suggest not trying to get too clever regarding secrets in state. I often treat the Terraform Vault Provider as a guide for the official-ish Hashicorp way of doing things in Terraform.
(https://www.terraform.io/docs/providers/vault/index.html) Directly on the label, they disclaim any cleverness to protect secrets. I think Terraform core offers enough ways to protect secrets. The combination of using remote state and an encryption-enabled backend seems sufficient. See https://www.terraform.io/docs/state/sensitive-data.html. |
Indeed @StephenWithPH , state is already sensitive so we do not have to be too clever using hash in state (instead of plaintext values).
This is also fine if it is clearly mentioned in the doc of the resource. |
Nice to see that this is being worked on! imho ... just get it done ... KISS |
Hi, I'd like to take on this as we have a requirement for it in our organisation. |
@benj-fletch if you need any help, feel free to ask me. |
@martinssipenko Thanks! |
@benj-fletch my only ask on this one is to try to keep things forward compatible with these related enhancements. I'm 👍 on designing for overall Actions support rather than just the |
@jcudit Sure thing, I will try my best to do so! |
Any idea when this will get merged? Would be very handy feature |
I believe that this ticket can be closed now, following the merge of #362 ? |
…update-to-go-github-v29-0-3 Updated to go-github v29.0.3
integrationsGH-271 - Added actions_public_key data resource integrationsGH-271 - Added actions_secrets data source Further testing is required on this data source integrationsGH-271 - Added actions_secret resource integrationsGH-271 - Adding actions_secret resource documentation updates Fix formatting Updates following PR comments Updates following PR comments integrationsGH-271 - Resolving more PR comments Updating documentation integrationsGH-271 - removing references to old TF SDK
…github-secrets Gh 271 GitHub secrets
Hi friends,
it would be super cool to be able to set secrets for actions through terraform while creating a repository. ;)
ty,
g. (happy action user)
The text was updated successfully, but these errors were encountered: