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

aws-events: Archive construct does not have defaultChild set #21263

Closed
Gtofig opened this issue Jul 21, 2022 · 2 comments · Fixed by #21345
Closed

aws-events: Archive construct does not have defaultChild set #21263

Gtofig opened this issue Jul 21, 2022 · 2 comments · Fixed by #21345
Labels
@aws-cdk/aws-events Related to CloudWatch Events bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1

Comments

@Gtofig
Copy link
Contributor

Gtofig commented Jul 21, 2022

Describe the bug

Archive construct has defaultChild as undefined instead of an instance of CfnArchive

Expected Behavior

I expect archive.node.defaultChild to return instance of CfnArchive, but it is currently undefined

Current Behavior

archive.node.defaultChild returns undefined

Reproduction Steps

const app = new App();
const stack = new Stack(app);
const eventBus = new EventBus(stack, 'eventbus', {
      eventBusName: 'EventBus',
    });
const archive = new Archive(eventBus, 'archive', {
      sourceEventBus: eventBus,
      eventPattern: {
        source: ['test'],
      },
    });
const cfnArchive = archive.node.defaultChild as CfnArchive; // This fails

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.20.0

Framework Version

No response

Node.js Version

14.19.1

OS

Ubuntu 18

Language

Typescript

Language Version

4.4.4

Other information

No response

@Gtofig Gtofig added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 21, 2022
@github-actions github-actions bot added the @aws-cdk/aws-events Related to CloudWatch Events label Jul 21, 2022
@rix0rrr
Copy link
Contributor

rix0rrr commented Jul 25, 2022

That's unfortunate. The author must have used the wrong construct id.

@rix0rrr rix0rrr added effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 25, 2022
@rix0rrr rix0rrr removed their assignment Jul 25, 2022
@mergify mergify bot closed this as completed in #21345 Aug 1, 2022
mergify bot pushed a commit that referenced this issue Aug 1, 2022
Fixes #21263 

Adds id 'Default' to CfnArchive in Archive construct.

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] 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*
@github-actions
Copy link

github-actions bot commented Aug 1, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

josephedward pushed a commit to josephedward/aws-cdk that referenced this issue Aug 30, 2022
)

Fixes aws#21263 

Adds id 'Default' to CfnArchive in Archive construct.

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] 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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-events Related to CloudWatch Events bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants