question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CfnAssociation outputs invalid CloudFormation

See original GitHub issue

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.

  • I’m submitting a …

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior? When creating a CfnAssociation parameter:

Parameters = new Dictionary<string, Amazon.CDK.AWS.SSM.CfnAssociation.ParameterValuesProperty>
{ 
  {
    "Operation", new Amazon.CDK.AWS.SSM.CfnAssociation.ParameterValuesProperty
    { 
      ParameterValues = new[] { "Scan" } 
    }
  }
}

The output appears to be correct, but cloud formation reports the following error: “Value of {Parameters} must be a map where each value is a list of {String}”

Looking at the documentation, it appears from the sample yaml it should be:

Parameters:
      Directory: ["myWorkSpace"]

but what is emitted from the code above is:

Parameters:
  Operation:
    ParameterValues:
      - Scan
  • What is the expected behavior (or behavior of feature suggested)?

Would expect the association to be created with the correct parameters and values.

  • What is the motivation / use case for changing the behavior or adding this feature?

Would like to have CfnAssociation working.

  • Please tell us about your environment:

    • CDK CLI Version: 0.28.0
    • Module Version: 0.28.0
    • OS: Windows 10
    • Language: CSharp
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
skinny85commented, Sep 10, 2020

Confirming. I’m working on a fix.

1reaction
udondancommented, Sep 16, 2020

Thanks @skinny85! Excited for the next release to try this and remove my overrides.

Read more comments on GitHub >

github_iconTop Results From Across the Web

class CfnAssociation (construct) · AWS CDK
Examines the CloudFormation resource and discloses attributes. overrideLogicalId(newLogicalId). public overrideLogicalId(newLogicalId: string): void.
Read more >
AWS Cloudformation error: Template format error: Invalid ...
But I receive the error in the object: Template format error: Invalid outputs property : [Ref]. If I open the designer and try...
Read more >
AWS Cloud Formation: role (arn:aws:iam:xxx) is invalid or ...
CLI Output. Basically the IAM role that CFN needs to assume (to do anything to the stack) has disappeared. The problem with this...
Read more >
Deploy an AWS CloudFormation template
In addition to any outputs defined in your CloudFormation template, ... or because some required variables were missing or invalid.
Read more >
AWS Cloudformation: Invalid template resource property error
You have set "BambooInstanceProfile" as an attribute of "BambooAgentRole" instead of it's own resource. One more } needs to come before your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found