pulumi-aws icon indicating copy to clipboard operation
pulumi-aws copied to clipboard

ap-southeast-1c zone not unavailable

Open Matrix-Zhang opened this issue 1 year ago • 2 comments

What happened?

when i create aws rds cluster, it failed

creating RDS Cluster (data-sync-dev-cluster): InvalidVPCNetworkStateFault: Availability zone '[ap-southeast-1c]' is unavailable in this region, please choose another zone set.

Steps to reproduce

ws
  .getAvailabilityZones({
    state: "available",
  })
  .then((res) => {
    const clusterIdentifier = `${baseTags.Name}-cluster`;

    const rdsCluster = new aws.rds.Cluster(clusterIdentifier, {
      allocatedStorage: 20480,
      availabilityZones: res.names,
      clusterIdentifier,
      dbClusterInstanceClass: "db.m6g.8xlarge",
      backupRetentionPeriod: 30,
      preferredBackupWindow: "23:00-01:00",
      preferredMaintenanceWindow: "Sat:02:00-Sat:12:00",
      dbSubnetGroupName: subnetGroup.name,
      deletionProtection: true,
      vpcSecurityGroupIds: [networkingStack.getOutput("peeredSecurityGroupId")],
      finalSnapshotIdentifier,
      engine: "aurora-postgresql",
      engineVersion: "14.3",
      databaseName: baseConfig.dbName,
      masterPassword: baseConfig.dbPassword,
      masterUsername: "postgres",
      tags: baseTags,
    });
  });

Expected Behavior

it will create the cluster successed

Actual Behavior

failed

Output of pulumi about

Diagnostics: pulumi:pulumi:Stack (relation-data-sync-dev): error: update failed

aws:rds:Cluster (data-sync-dev-cluster): error: 1 error occurred: * creating RDS Cluster (data-sync-dev-cluster): InvalidVPCNetworkStateFault: Availability zone '[ap-southeast-1c]' is unavailable in this region, please choose another zone set. status code: 400, request id: 7f551116-22c4-40bd-9db4-f68d6119e9c0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Matrix-Zhang avatar Sep 26 '22 06:09 Matrix-Zhang

This feels like another manifestation of https://github.com/hashicorp/terraform-provider-aws/issues/5725. Could you make sure you have a subnet created in the availability zone being chosen?

viveklak avatar Sep 26 '22 19:09 viveklak

no, i used new awsx.ec2.Vpc to created the vpc with default subnets configuration, it will be 2

Matrix-Zhang avatar Oct 07 '22 12:10 Matrix-Zhang

Hi @Matrix-Zhang - thank you for opening this issue! As it seems like a resolution has been found (ensuring subnets are created in each AZ requested for this RDS cluster), I'm going to close this as it's working as intended. Once you've ensured such subnets are created, please retry the above code and let us know if any further issues occur. Thank you!

kpitzen avatar Mar 31 '23 14:03 kpitzen