GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders-community

envsubst won't substitute secrets

Open
#629 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.3k
Forks
848
PR merge metrics
No merged PRs in 30d

Description

## Affected builder image

`gcr.io/cloud-builders-community/envsubst`

## Expected Behavior
```
APP_KEY=1234
TEST_APP_KEY=hello-world
```

## Actual Behavior
```
APP_KEY=$APP_KEY
TEST_APP_KEY=hello-world
```

## Steps to Reproduce the Problem

`app.yaml` file:
```
...
env_variables:
APP_KEY: ${SECRET_APP_KEY}
TEST_APP_KEY: ${TEST_APP_KEY}
```

`cloudbuild.yaml`:
```
steps:
- id: Config
name: 'gcr.io/${PROJECT_ID}/envsubst'
args: ['app.yaml']
env: ['SECRET_APP_KEY=$$APP_KEY', 'TEST_APP_KEY=hello-world']
secretEnv: ['APP_KEY']

availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/APP_KEY/versions/latest
env: 'APP_KEY'
```

## Additional Info

I can't get the secret value substituted. What am I missing?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.