Skip to content

Conversation

@NathanTCz
Copy link
Contributor

@NathanTCz NathanTCz commented Oct 25, 2022

Added new Event Rule Targets:

  • SsmRunCommand
  • SsmAutomation

This provides the ability to target Amazon EC2 Systems Manager Run Command and Automation Documents in Event Rules.

closes #7710

All Submissions:

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Oct 25, 2022

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1 labels Oct 25, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team October 25, 2022 16:18
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

@aws-cdk-automation aws-cdk-automation dismissed their stale review October 25, 2022 16:38

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@NathanTCz NathanTCz force-pushed the feat/ssm-events-targets branch from 338d5f7 to cb51bae Compare October 25, 2022 16:38
@TheRealAmazonKendra TheRealAmazonKendra changed the title feat(aws-events-targets): target systems manager run command and automation with event rules feat(events-targets): target systems manager run command and automation with event rules Oct 25, 2022
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only got part of the way though this review because I don't think this can be implemented at this time given that it will create a breaking change once Document is implemented as a resource for ssm and also because union types don't work with jsii so any further review of this PR will require extensive reworking or another PR implementing Document.

/**
* Can be an instance of `ssm.CfnDocument` or a share/managed document ARN.
*/
public readonly document: ssm.CfnDocument | string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Union types don't work with jsii.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I don't think we want to use the Cfn type of anything here. When Document gets implemented, this will then create a breaking change. This should use an IDocument as the type. I realize that this isn't implemented yet but I think that it needs to be before we can accept this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the exact same thought and started down that road.. but figured I would get your feedback first. Is there any existing or in-progress work already on implementing L2 constructs for Document? Is it possible to just wrap CfnDocument to avoid the breaking change down the road?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be willing to start the implementation of Document. Is there any documentation, standards, or requirements I can follow or reference for that implementation? Other than looking at other similar L2 implementations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thought.. once Document is implemented, there would be no need for the union type as theoretically (and hopefully) there would be some sort of .fromLookup() method on Document for shared documents.

Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this package: https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/example-construct-library

Specifically, the example resource, as that would be what the Document would be. Please also open that in a separate PR.

From the documentation it looks like this should be a pretty simple implementation.

@mergify mergify bot dismissed TheRealAmazonKendra’s stale review November 13, 2022 21:02

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d6c8390
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@NathanTCz
Copy link
Contributor Author

Blocked by #22911

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@NathanTCz
Copy link
Contributor Author

Waiting on #22911

@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

events: support SSM RunCommand

3 participants