Closed willvincent closed 4 years ago
SOLVED --
Missing bit to get this working properly is pulling variables into the environment using drone 1.0 from_secret
syntax.
IE:
steps:
- name: ecs
image: peloton/drone-ecs
environment:
APP_KEY:
from_secret: APP_KEY
settings:
secret_environment_variables:
- APP_KEY
---
kind: secret
name: APP_KEY
get:
path: my/external/secrets
name: APP_KEY
The main reason I opted for this plugin vs the other ecs plugin was that it appeared more complete, and that it clearly indicates the ability to inject secrets as environment variables.
I am, however, completely unable to do so. Ideally I want to pull secrets from aws secrets manager, which I have everything necessary configured on the drone server, and can pull secrets via the cli tool. However, within config for this plugin, whether I try to use the
secret_environment_variables
or justenvironment_variables
and whether the secret is coming from the amazon secrets external secrets source, or inbuilt drone repo secrets config, no matter what I try the value is always an empty string.That ought to be available as
STG_NODE_ENV
so I would think I should be able to do either of these:or:
Neither work, always results the same getting defined in the ecs task definition:
I'm dead in the water if I can't populate environment variables!