nrkno/setenv

Set enviroment variables from Vault app_role_applications autodoc: permissions: id-token: write

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 28, 2026
License
GPL 3.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: nrkno/github-action-setenv@06991eb888f9773dd0b64b7ef12d85d5c367ea78 # v3.1.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
nameVault app_role_applications nameyes
envVault environment eg: prodyes
tokenVault token, defaults to /vault/secrets/tokenno
clusterCan be used multiple times, exported in KUBE_CONFIG_PATH: ~/.kube/atlantis/configno
azureGet Azure credentials, exported as ARM_CLIENT_ID and ARM_CLIENT_SECRETno
azure_tenant_idAzure tenant ID. Required if --azure is setno""
azure_subscription_idAzure subscription ID. Subscription ID for which your state is stored. Required if --azure is setno""
azure_resource_groupAzure resource group name. Resource group for which your state is stored. Required if --azure is setno""
azure_no_armDo not export ARM_CLIENT_ID and ARM_CLIENT_SECRET, only TF_VAR_azure_client_id and TF_VAR_azure_client_secretno
gcpGCP project names, creates TF_VAR_gcp_project_name for use in "credentials" in google providerno
terraform_registryGet Terraform registry token, expects to be found in vault under "token" in secret/applications/{name}/{env}/terraform-registryno
wait_timeDo not wait for credentials to propagateno
evalOutput as export statements, for use with eval $()no
new_lineOutput as text separated by newlineno
debugPrint progress messagesno
vault_role_id_nameName of the environment variable for Vault role ID, defaults to "TF_VAR_vault_role_id"no
vault_secret_id_nameName of the environment variable for Vault secret ID, defaults to "TF_VAR_vault_secret_id"no
vault_secret_id_cidrCIDR to use for Vault secret ID, defaults to the IP address from --myip-url with /32 suffixno
cacheCache/ use cached credentialsno
cache_filePath and name to cache file, defaults to /tmp/{repo_name}_{workflow_name}.cache.json when running in atlantis, or /tmp/{current_workdir}.cache.json when running from shellyes
secretEvery key/value pair in vault applications "setenv" secret is added to env vars on hardcoded path secret/applications/{name}/{env}/setenvno
vault_secretGet secret from vault, spec path to secret, key in secret and name of environment variable to export. Can be used multiple times, e.g. --vault-secret secret/applications/myapp/prod:mykey:MY_VAR_NAME. using * as key, all keys in secret will be exported with the speced var_name as prefix, e.g.: --vault-secret secret/applications/myapp/prod:*:MY_PREFIX_ will export MY_PREFIX_key1, MY_PREFIX_key2 etc.no
myip_urlURL to get current IP address, default is http://icanhazip.comno

no outputs