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

[redshift] Cannot create more than 1 redshift cluster due to hard-coded security group name #10740

Closed
mitchlloyd opened this issue Oct 6, 2020 · 1 comment · Fixed by #10742
Assignees
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@mitchlloyd
Copy link
Contributor

mitchlloyd commented Oct 6, 2020

Cannot create more than 1 Redshift Cluster in an account because the redshift security group "redshift SG" name must be unique.

Reproduction Steps

import * as ec2 from '@aws-cdk/aws-ec2';
import * as redshift from '@aws-cdk/aws-redshift';
import * as cdk from '@aws-cdk/core';

export class RedshiftStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const vpc = new ec2.Vpc(this, 'VPC');

    new redshift.Cluster(this, 'R1', {
      vpc,
      masterUser: {
        masterUsername: 'name',
      },
    });

    new redshift.Cluster(this, 'R2', {
      vpc,
      masterUser: {
        masterUsername: 'name',
      },
    });
  }
}

What did you expect to happen?

Create 2 redshift clusters.

What actually happened?

Cloudformation error:

redshift SG already exists in stack arn:aws:cloudformation:us-west-2...

Environment

  • CLI Version : 1.66.0
  • Framework Version: 1.66.0
  • Node.js Version: v12.18.4
  • OS : MacOS
  • Language (Version): TypeScript 4.0.2

Other

Hard coded security group name:

securityGroupName: 'redshift SG',

Security group names must be unique:
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html


This is 🐛 Bug Report

@mitchlloyd mitchlloyd added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2020
@github-actions github-actions bot added the @aws-cdk/aws-redshift Related to Amazon Redshift label Oct 6, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Oct 6, 2020
@mergify mergify bot closed this as completed in #10742 Oct 7, 2020
mergify bot pushed a commit that referenced this issue Oct 7, 2020
…ed (#10742)

PR that resolves #10740

----

*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 Oct 7, 2020

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

njlynch pushed a commit that referenced this issue Oct 7, 2020
…ed (#10742)

PR that resolves #10740

----

*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-redshift Related to Amazon Redshift bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants