Aws-cdk: allow creation of ssm documents

Created on 11 Sep 2019  路  7Comments  路  Source: aws/aws-cdk

:rocket: Feature Request

General Information

  • [ ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

Description

Currently to create a ssm document in cdk you can only use a json object as the content

with open('ssm/removal.json', 'r') as f:
            removalDoc = json.load(f)

        aws_ssm.CfnDocument(
          self,'ssmdoc',
          content=removalDoc,
          document_type="Automation"
        )

Proposed Solution

Allow creating of ssm documents in cdk. ability to generate a full document with parameters etc

Other information

I believe this is not on the roadmap for the ssm team but want to capture this so more eyes are on it

@aws-cdaws-ssm efformedium feature-request p1

Most helpful comment

@MrArnoldPalmer Just released 1.0.0 of my L3 here: https://github.com/udondan/cdk-ssm-document Let me know If you're interested in having this migrated into the cdk repo.

All 7 comments

Both "cfnDocument" and "cfnAssociation"

I think this should be closed. Creation of SSM docs is already possible - https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ssm.CfnDocument.html

Yes, it's possible using lower level constructs like CfnDocument and CfnAssociation.

But we need a higher level construct and more detailed properties for document instead of providing content as JSON document.

Ah yes. I misread the description. I read the code block as what is expected from this task.

I'm currently working on an L3 construct. Happy to contribute that to cdk but it makes use of a custom resource. Don't know if that's welcome.

@udondan ssm is in need of the L2s for Document and Association. If you're interested in implementing those, we always welcome contributions. We probably want to define the L2s and kick those around for a bit before we include higher level abstractions like an L3. Regardless would love to see what you come up with. You can build the L3 as a third party construct lib and we could eventually maybe migrate it into cdk.

@MrArnoldPalmer Just released 1.0.0 of my L3 here: https://github.com/udondan/cdk-ssm-document Let me know If you're interested in having this migrated into the cdk repo.

Any movement on this? @udondan's solution looked really promising, but I just tried v1.1.2 and I was immediately discouraged with broken dependencies. This project still seems to be moving pretty quickly!

Was this page helpful?
0 / 5 - 0 ratings