Skip to content

github_actions_secret: document how to obtain encrypted_value #888

@hoxu

Description

@hoxu

Affected Resource(s)

  • github_actions_secret

github_actions_secret page does not contain any documentation on how to produce the encrypted_value.

There are two alternatives on how to create encrypted_value from the plaintext value:

  1. One using TF_LOG=debug terraform apply to observe what "encrypted_secret" value is sent as JSON in the GitHub API call, as @jcudit outlined in a PR Added encrypted_value to Actions + Organizations's secrets #807 comment, although this is missing instructions necessary to avoid storing the plaintext_secret in a remote backend.
  2. Make an API call to https://api.github.com/repos/ORG/REPO/actions/secrets/public-key and write a helper script using the example code in GitHub reference for "Create or update a repository secret".

Both of these are too cumbersome in my opinion.

But at the very least, a way to do this should be documented on github_actions_secret documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions