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

(ApplicationListener): (Static method "from_application_listener_attributes" property "security_group" is not "Optional" as listed in docs) #21930

Closed
nelomsmn opened this issue Sep 6, 2022 · 2 comments · Fixed by #21934
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@nelomsmn
Copy link

nelomsmn commented Sep 6, 2022

Describe the issue

For importing a pre-existing Application Listener using the "from_application_listener_attributes" static method, the docs lists the "security_group" parameter as "Optional". When attempting to import an existing Application listener without specifying a security group parameter you are met with the following error during "cdk synth":

Error: Either securityGroup or securityGroupId must be specified to import an application listener.

Adding the security group allows for successful "cdk synth" and "cdk deploy" commands. The above error message makes it so that the security_group parameter is not optional as listed in the docs.

Links

from_application_listener_attributes:
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_elasticloadbalancingv2/ApplicationListener.html#aws_cdk.aws_elasticloadbalancingv2.ApplicationListener.from_application_listener_attributes

@nelomsmn nelomsmn added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Sep 6, 2022
@github-actions github-actions bot added the @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 label Sep 6, 2022
@corymhall
Copy link
Contributor

@nelomsmn thanks for reporting this! It looks like this is a bug. There used to be an additional
property securityGroupId which was deprecated and is no longer available in CDK v2. We should
change securityGroup to be required.

This issue has been classified as p2. That means a workaround is available or it is deemed a nice-to-have feature. Given the amount of work there is to do and the relative priority of this issue, the CDK team is unlikely to address it. That does not mean the issue will never be fixed! If someone from the community submits a PR to fix this issue, and the PR is small and straightforward enough, and meets the quality bars to be reviewed and merged with little effort we will accept that PR. PRs that do not build or need complex or multiple rounds of reviews are unlikely to be merged and will be closed to keep our backlog manageable.

In the mean time, remember that you can always use the escape hatch (https://docs.aws.amazon.com/cdk/v2/guide/cfn_layer.html) mechanism to have fine control over the CloudFormation output you want. We will keep the issue open for discoverability, to collect upvotes, and to facilitate discussion around this topic.

We use +1s on this issue to help prioritize our work, and are happy to re-evaluate the prioritization of this issue based on community feedback. You can reach out to the cdk.dev community on Slack (https://cdk.dev/) to solicit support for reprioritization.

@corymhall corymhall added bug This issue is a bug. p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. documentation This is a problem with documentation. labels Sep 6, 2022
@corymhall corymhall removed their assignment Sep 6, 2022
@mergify mergify bot closed this as completed in #21934 Sep 11, 2022
mergify bot pushed a commit that referenced this issue Sep 11, 2022
…n fromApplicationListenerAttributes (#21934)

### Problem

The static method `fromApplicationListenerAttributes` was describe with `securityGroup` property optional on documentation but this will throw an error because `securityGroup` is required

### Solution

This PR makes the `securityGroup` property mandatory

Fixes #21930 
----

### 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

⚠️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.

Kruspe pushed a commit to DavidSchwarz2/aws-cdk that referenced this issue Sep 13, 2022
…n fromApplicationListenerAttributes (aws#21934)

### Problem

The static method `fromApplicationListenerAttributes` was describe with `securityGroup` property optional on documentation but this will throw an error because `securityGroup` is required

### Solution

This PR makes the `securityGroup` property mandatory

Fixes aws#21930 
----

### 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*
mackalex pushed a commit to wanjacki/aws-cdk that referenced this issue Sep 15, 2022
…n fromApplicationListenerAttributes (aws#21934)

### Problem

The static method `fromApplicationListenerAttributes` was describe with `securityGroup` property optional on documentation but this will throw an error because `securityGroup` is required

### Solution

This PR makes the `securityGroup` property mandatory

Fixes aws#21930 
----

### 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-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
2 participants