amazon web services - AWS doesn't pick the zone from terraform when creating aurora rds -


currently have requirement of creating both aws instance , aurora rds instance in same availability zone. noticed rds instance doesn't pick giving availability zone. i.e : when pass zone ( eu-west-2a ) via attribute "availability_zones" inside terraform resource "aws_rds_cluster" rds instance creates in zone (eu-west-2b). common time regardless "count" value.

we pass zone name "list" variable in runtime. i.e :

tf_var_rds_aval_zones='[\"eu-west-2a\"]' terraform apply -var 'region=${env.region}' 

terraform output :

.....   apply_immediately:                 "" => "<computed>"   availability_zones.#:              "" => "1"   availability_zones.3230292939:     "" => "eu-west-2a"   backup_retention_period:           "" => "1" ..... 

( instance creates in "eu-west-2b". there no warnings in terraform output )

getting subnet ids rds (in aurora module) :

subnet_az1 = "${data.terraform_remote_state.vpc_state.private_subnets[0]}" subnet_az2 = "${data.terraform_remote_state.vpc_state.private_subnets[1]}" 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -