【问题标题】:CDK rds database cluster and assigning existing security groupCDK rds 数据库集群和分配现有安全组
【发布时间】:2020-11-23 16:21:07
【问题描述】:

我正在使用 AWS CDK rds.DatabaseCluster 创建一个新的 RDS Postgres SQL 集群。它工作正常。

但是,为了安全起见,我找不到将现有安全组分配给此集群的现有方法。有人做过吗?

【问题讨论】:

    标签: amazon-web-services amazon-rds aws-cdk aws-security-group


    【解决方案1】:

    您可以使用以下方法找到现有的安全组:

    const securityGroup = SecurityGroup.fromSecurityGroupId(this, 'SG', 'sg-12345', {
       mutable: false
    });
    

    https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.SecurityGroup.html

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-20
    • 1970-01-01
    • 2021-02-08
    • 2020-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多