【问题标题】:Example input for AWS CDK loadNestedStacksAWS CDK loadNestedStacks 的示例输入
【发布时间】:2021-06-29 11:38:50
【问题描述】:

我想知道如何为loadNestedStacks 创建一个示例参数。

private CfnInclude template;
template = CfnInclude.Builder.create(this, "Template")
                  .loadNestedStacks(**what goes here**)
                  .build();

【问题讨论】:

    标签: java aws-cdk


    【解决方案1】:

    这是 Typescript 的等效答案。

    包括嵌套模板,如果你有树的。它下面的嵌套堆栈的名称。

    import * as cf from "@aws-cdk/cloudformation-include";
    ...
    const cfnTemplate = new cf.CfnInclude(this, 'Template', {
            templateFile: 'my-template.yaml',
            loadNestedStacks: {
                'stack-name': {
                    templateFile: 'my-second-template.yaml',
                }
            },
          });
    // Note: cdk.CfnInclude is deprecated so you may need to pull in cloudformation includes.
    

    【讨论】:

      猜你喜欢
      • 2021-05-08
      • 2020-04-25
      • 2021-09-04
      • 2020-12-06
      • 2020-06-18
      • 2020-12-05
      • 1970-01-01
      • 2023-01-19
      • 2020-05-01
      相关资源
      最近更新 更多