-
Notifications
You must be signed in to change notification settings - Fork 885
Closed
Labels
Status: Needs infoFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedType: BugSomething isn't working as documentedSomething isn't working as documentedr/actions_secret
Description
Terraform Version
Terraform v0.13.5
Affected Resource(s)
Please list the resources as a list, for example:
- github_actions_organization_secret
Terraform Configuration Files
resource "github_actions_organization_secret" "this" {
for_each = toset(local.secrets)
secret_name = each.value
visibility = "selected"
plaintext_value = "(placeholder)" # we'll change these values outside of Terraform
selected_repository_ids = [
for repo in data.github_repository.repos : repo.repo_id
]
lifecycle {
ignore_changes = [
plaintext_value
]
}
}Expected Behavior
In this example, I'm giving providing a list of repositories that can access the secret. You can see I'm using (placeholder) as the plaintext value, with the idea that I would go into Github outside of TF and add in the real value once.
When I change the list of repositories, I expect that the real value I inputted would remain the same.
Actual Behavior
However, it actually replaces the real value with the placeholder.
Steps to Reproduce
- Use the
github_actions_organization_secretresource to create a value likeFOOwith a default value of(placeholder) terraform applythe change/creation- Go into your Github organization and edit the secret to have a value like
Hello World - Using the above config, modify the
selected_repository_idsand apply the change - In your Github Actions workflow, create a step like this:
- name: DEBUG! env: MY_SECRET: ${{ secrets.FOO }} run: | echo ${MY_SECRET} | sed 's/./& /g'
- Push and/or trigger the Github Action
- Note how the value that gets printed out is
(placeholder)and not the expectedHello World
SanderKnape, jvanbrunschot, kclarkey, jeremywitte, gimbo and 6 more
Metadata
Metadata
Assignees
Labels
Status: Needs infoFull requirements are not yet known, so implementation should not be startedFull requirements are not yet known, so implementation should not be startedType: BugSomething isn't working as documentedSomething isn't working as documentedr/actions_secret
Type
Projects
Status
✅ Done
Status
Done