Skip to content

Commit 155ff1e

Browse files
committed
get output from nested stack
1 parent 2651709 commit 155ff1e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cdk_app/hyp3_stack.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ class HyP3Stack(cdk.Stack):
88
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
99
super().__init__(scope, id, **kwargs)
1010

11-
cfn_inc.CfnInclude(
11+
main_template = cfn_inc.CfnInclude(
1212
scope=self,
13-
id='Template',
13+
id='MainStack',
1414
template_file='packaged.yml',
1515
)
16+
17+
# TODO: this isn't needed, but is an example of getting an output from a nested stack
18+
cluster_template = main_template.load_nested_stack(
19+
'Cluster',
20+
template_file='apps/compute-cf.yml'
21+
).included_template
22+
print(cluster_template.get_output('JobQueueArn'))

0 commit comments

Comments
 (0)