I have an issue with aws_db_snapshot, I am trying to clone the Production db instance to a new DB Instance which will become the new Production DB Instance.
data "aws_db_snapshot" "db_snapshot" {
most_recent = true
db_instance_identifier = "${var.db-instance-identifier-snapshot}"
}
resource "aws_db_instance" "oracle" {
allocated_storage = "${var.rds_allocated_storage}"
engine = "${var.rds_oracle_engine}"
engine_version = "${var.rds_engine_version}"
iops = "${var.rds_iops}"
instance_class = "${var.rds_instance_class}"
identifier = "${var.rds_identifier}"
name = "${var.rds_db_name}"
username = "${var.rds_user}"
password = "${var.rds_password}"
multi_az = "false"
storage_type = "${var.rds_storage_type}"
backup_retention_period = "${var.rds_backup_retention}"
availability_zone = "${aws_subnet.main-private-1.availability_zone}"
skip_final_snapshot = "${var.skip_final_snapshot}"
tags {
Name = "${var.app-db-instance-name}"
}
However it is failing with an error, your query returned no results. I verified the snapshot is valid.
Please help.