pulumi/tests/integration/config_basic/python/__main__.py
Joe Duffy 41127c55e9
Add basic config tests (#1049)
This adds a basic config test, for both Node.js and Python runtimes,
that simply reads back and checks configuration and secret values.
2018-03-14 12:24:49 -07:00

14 lines
489 B
Python

# Copyright 2016-2017, Pulumi Corporation. All rights reserved.
import pulumi
# Just test that basic config works.
config = pulumi.Config('config_basic_py')
# This value is plaintext and doesn't require encryption.
value = config.require('aConfigValue')
assert value == 'this value is a Pythonic value'
# This value is a secret and is encrypted using the passphrase `supersecret`.
secret = config.require('bEncryptedSecret')
assert secret == 'this super Pythonic secret is encrypted'