Closed AndyHuang1991 closed 5 years ago
hi @AndyHuang1991
I'll look into it!
Thanks
Issue still persists in version 0.9.1
error:
Error: Error creating DB Instance: InvalidParameterCombination: The DB instance and EC2 security group are in different VPCs. The DB instance is in vpc-XXYY and the EC2 security group is in vpc-ZZWW
status code: 400, request id: 1420c07e-4a42-41e0-9b88-1a70a9c03b9f
on .terraform/modules/airflow/PowerDataHub-terraform-aws-airflow-a679957/main.tf line 411, in resource "aws_db_instance" "airflow_database":
411: resource "aws_db_instance" "airflow_database" {
Module Version: 0.7.2 (after initial investigate, this issue might also happened in latest version 0.8.10)
Issue: when I providing
vpc_id
variables (my existing vpc). it will failed when creating RDS instance.Reason: this module will create rds in default vpc, and with providing VPC id, it will generate and attached providing VPC's secruity group to default VPC which cause failure.
The vpc_security_group_ids in bellowed code (in main.tf)
Possible solution: create subnet group with providing vpc and add to aws_db_instance's db_sunet_group argument