* Make Python StackReference test similar to others (with two steps) * Include new Python StackReference integration test that uses multiple stacks * Expose various life cycle methods for ProgramTester
18 lines
412 B
Python
18 lines
412 B
Python
# Copyright 2020, Pulumi Corporation. All rights reserved.
|
|
|
|
import pulumi
|
|
|
|
config = pulumi.Config()
|
|
org = config.require('org')
|
|
slug = f"{org}/{pulumi.get_project()}/{pulumi.get_stack()}"
|
|
a = pulumi.StackReference(slug)
|
|
|
|
got_err = False
|
|
|
|
try:
|
|
a.get_output('val2')
|
|
except Exception:
|
|
got_err = True
|
|
|
|
if not got_err:
|
|
raise Exception('Expected to get error trying to read secret from stack reference.')
|