Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create/update aws/main.yaml when not providing LogArchives and CloudTrails #76

Open
mikevoets opened this issue Nov 12, 2023 · 0 comments

Comments

@mikevoets
Copy link

Expected Behavior

The stack deploys without failures.

Actual Behavior

CloudFormation fails with: Transforms defined as maps require Name key.

Steps to Reproduce the Problem

Using AWS CDK v2:

export class DatadogStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props: DatadogStackProps) {
    super(scope, id, props);

    const mainTemplate = new cfn_inc.CfnInclude(this, 'MainTemplate', {
      templateFile: 'aws/main.yaml',
      parameters: {
        ExternalId: props.externalId,
        DdApiKeySecretArn: props.apiKeySecretArn,
      },
      loadNestedStacks: {
        DatadogPolicyMacroStack: {
          templateFile: 'aws/datadog_policy_macro.yaml',
        },
        DatadogIntegrationRoleStack: {
          templateFile: 'aws/datadog_integration_role.yaml',
        },
      },
    });
    ...
}

See the synthetized nested DatadogIntegrationRoleStack template in cdk.out. The DatadogIntegrationRole has the following empty transforms, which causes this issue:

"Policies": [
     {
      "PolicyDocument": {
       "Version": "2012-10-17",
       "Statement": [
        {
         ...
        }
       ]
      },
      "PolicyName": "DatadogAWSIntegrationPolicy"
     },
     {
      "Fn::Transform": {}
     },
     {
      "Fn::Transform": {}
     }
    ],
    ...

Specifications

  • Datadog CloudFormation template version: 2010-09-09

Stacktrace

N/A, see above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant