Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
545 B
5
Indexable
Never
Parameters:
  MultiAZ:
    Type: String
    Default: "true"
    AllowedValues:
      - "true"
      - "false"
    Description: "Enable Multi-AZ deployment for the RDS instance"

Resources:
  MyVpc:
    Type: AWS::EC2::VPC
    Properties:
      # Your VPC configuration

  MyRdsInstance:
    Type: AWS::RDS::DBInstance
    Properties:
      Engine: mysql
      DBInstanceClass: db.t2.micro
      MultiAZ: !If [EnableMultiAZ, "true", "false"]
      # Other RDS instance configuration

Conditions:
  EnableMultiAZ: !Equals [ !Ref MultiAZ, "true" ]
Leave a Comment