代码之家  ›  专栏  ›  技术社区  ›  Jiew Meng

由于小写,cloudformation找不到rds子网组

  •  0
  • Jiew Meng  · 技术社区  · 6 年前

    我通过引用参数projectname的cloudformation创建了我的rds子网组。

      DB:
        Type: AWS::RDS::DBInstance
        Properties:
          DBSubnetGroupName: !Ref RDSSubnetGroup
    

    现在的问题是CloudInformation说它找不到我的子网组:

    DB子网组“abcdef”不存在,因为它实际上是abcdef…我如何解决这个问题?

    我试过找一个tolower函数,但似乎没有?

    另一个选项似乎是重新创建堆栈?

    3 回复  |  直到 6 年前
        1
  •  2
  •   Asdfg    6 年前

    CloudFormation

    Fn::ToLower Lambda backed custom resource

        2
  •  0
  •   John Rotenstein    6 年前

    ###########
    # DB Subnet Group
    ###########
    
      DBSubnetGroup:
        Type: AWS::RDS::DBSubnetGroup
        Properties: 
          DBSubnetGroupDescription: Lab DB Subnet Group
          DBSubnetGroupName: Lab DB Subnet Group
          SubnetIds:
            - !Ref PrivateSubnet1
            - !Ref PrivateSubnet2
          Tags:
            -
              Key: Name
              Value: DBSubnetGroup
    
    ###########
    # RDS Database
    ###########
    
      RDSDatabase:
        Type: AWS::RDS::DBInstance
        Properties:
          DBName: inventory
          DBInstanceIdentifier: inventory-db
          AllocatedStorage: 5
          DBInstanceClass: db.t2.micro
          Engine: MySQL
          MasterUsername: master
          MasterUserPassword: lab-password
          MultiAZ: false
          DBSubnetGroupName: !Ref DBSubnetGroup
          VPCSecurityGroups:
            - !Ref DBSecurityGroup
          Tags:
            -
              Key: Name
              Value: inventory-db
    
        3
  •  0
  •   Rajat jain    6 年前

    DBSubnetGroup dbsubnetgroup