fix: bail out if Pulumi secrets provider is missing, incl. overwrite for bootstrap
This commit is contained in:
parent
e74bca7199
commit
6a8c41ff47
@ -92,7 +92,7 @@ def pulumi_init(stack):
|
|||||||
os.environ["AWS_DEFAULT_REGION"] = stack.region
|
os.environ["AWS_DEFAULT_REGION"] = stack.region
|
||||||
|
|
||||||
# Secrets provider
|
# Secrets provider
|
||||||
try:
|
if "secretsProvider" in stack.pulumi:
|
||||||
secrets_provider = stack.pulumi["secretsProvider"]
|
secrets_provider = stack.pulumi["secretsProvider"]
|
||||||
if (
|
if (
|
||||||
secrets_provider == "passphrase"
|
secrets_provider == "passphrase"
|
||||||
@ -100,9 +100,13 @@ def pulumi_init(stack):
|
|||||||
):
|
):
|
||||||
raise ValueError("Missing PULUMI_CONFIG_PASSPHRASE environment variable!")
|
raise ValueError("Missing PULUMI_CONFIG_PASSPHRASE environment variable!")
|
||||||
|
|
||||||
except KeyError:
|
else:
|
||||||
logger.warning("Missing pulumi.secretsProvider setting, secrets disabled !")
|
try:
|
||||||
secrets_provider = None
|
if _stack.IKNOWHATIDO:
|
||||||
|
logger.warning("Missing pulumi.secretsProvider setting, IKNOWHATIDO enabled ... ")
|
||||||
|
secrets_provider = None
|
||||||
|
except AttributeError:
|
||||||
|
raise ValueError("Missing pulumi.secretsProvider setting!")
|
||||||
|
|
||||||
# Set tag for stack file name and version
|
# Set tag for stack file name and version
|
||||||
_tags = stack.tags
|
_tags = stack.tags
|
||||||
|
Loading…
Reference in New Issue
Block a user