{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4836","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4836/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4836/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4836/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/4836","id":332230065,"node_id":"MDU6SXNzdWUzMzIyMzAwNjU=","number":4836,"title":"Issue with creating db_snapshot","user":{"login":"darrylmendez","id":17715580,"node_id":"MDQ6VXNlcjE3NzE1NTgw","avatar_url":"https://avatars0.githubusercontent.com/u/17715580?v=4","gravatar_id":"","url":"https://api.github.com/users/darrylmendez","html_url":"https://github.com/darrylmendez","followers_url":"https://api.github.com/users/darrylmendez/followers","following_url":"https://api.github.com/users/darrylmendez/following{/other_user}","gists_url":"https://api.github.com/users/darrylmendez/gists{/gist_id}","starred_url":"https://api.github.com/users/darrylmendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrylmendez/subscriptions","organizations_url":"https://api.github.com/users/darrylmendez/orgs","repos_url":"https://api.github.com/users/darrylmendez/repos","events_url":"https://api.github.com/users/darrylmendez/events{/privacy}","received_events_url":"https://api.github.com/users/darrylmendez/received_events","type":"User","site_admin":false},"labels":[{"id":620316239,"node_id":"MDU6TGFiZWw2MjAzMTYyMzk=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":801370439,"node_id":"MDU6TGFiZWw4MDEzNzA0Mzk=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/service/rds","name":"service/rds","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-14T02:31:43Z","updated_at":"2018-06-21T18:01:16Z","closed_at":null,"author_association":"NONE","body":"I have the below rds provisioning script. I am trying to copy an existing rds oracle instance in us-east-1 into a new instance at us-east-2 using aws_db_snapshot.\r\n\r\n```hcl\r\nresource \"aws_db_subnet_group\" \"oracle-subnet\" {\r\n  name        = \"oracle-subnet\"\r\n  description = \"RDS subnet group\"\r\n  subnet_ids  = [\"${aws_subnet.main-private-1.id}\", \"${aws_subnet.main-private-2.id}\"]\r\n}\r\n\r\nresource \"aws_db_parameter_group\" \"oracle-parameters\" {\r\n  name        = \"oracle-db-parameters\"\r\n  family      = \"oracle-ee-12.1\"\r\n  description = \"Oracle DB parameter group\"\r\n}\r\n\r\ndata \"aws_db_snapshot\" \"db_snapshot\" {\r\n  most_recent            = true\r\n  db_instance_identifier = \"${var.db-instance-identifier-snapshot}\"\r\n}\r\n\r\nresource \"aws_db_instance\" \"oracle\" {\r\n  allocated_storage       = \"${var.rds_allocated_storage}\"\r\n  engine                  = \"${var.rds_oracle_engine}\"\r\n  engine_version          = \"${var.rds_engine_version}\"\r\n  iops                    = \"${var.rds_iops}\"\r\n  instance_class          = \"${var.rds_instance_class}\"\r\n  identifier              = \"${var.rds_identifier}\"\r\n  name                    = \"${var.rds_db_name}\"\r\n  username                = \"${var.rds_user}\"\r\n  password                = \"${var.rds_password}\"\r\n  db_subnet_group_name    = \"${aws_db_subnet_group.oracle-subnet.name}\"\r\n  snapshot_identifier     = \"${data.aws_db_snapshot.db_snapshot.id}\"\r\n  parameter_group_name    = \"${aws_db_parameter_group.oracle-parameters.name}\"\r\n  multi_az                = \"false\"\r\n  vpc_security_group_ids  = [\"${aws_security_group.allow-oracle.id}\"]\r\n  storage_type            = \"${var.rds_storage_type}\"\r\n  backup_retention_period = \"${var.rds_backup_retention}\"\r\n  availability_zone       = \"${aws_subnet.main-private-1.availability_zone}\"\r\n  skip_final_snapshot     = \"${var.skip_final_snapshot}\"\r\n\r\n  tags {\r\n    Name = \"${var.app-db-instance-name}\"\r\n  }\r\n}\r\n```\r\n\r\nHowever I am getting the below error on terraform plan\r\ndata.aws_db_snapshot.db_snapshot: Your query returned no results. Please change your search criteria and try again.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments/399192190","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/4836#issuecomment-399192190","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4836","id":399192190,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTE5MjE5MA==","user":{"login":"mildwonkey","id":6210214,"node_id":"MDQ6VXNlcjYyMTAyMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6210214?v=4","gravatar_id":"","url":"https://api.github.com/users/mildwonkey","html_url":"https://github.com/mildwonkey","followers_url":"https://api.github.com/users/mildwonkey/followers","following_url":"https://api.github.com/users/mildwonkey/following{/other_user}","gists_url":"https://api.github.com/users/mildwonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/mildwonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mildwonkey/subscriptions","organizations_url":"https://api.github.com/users/mildwonkey/orgs","repos_url":"https://api.github.com/users/mildwonkey/repos","events_url":"https://api.github.com/users/mildwonkey/events{/privacy}","received_events_url":"https://api.github.com/users/mildwonkey/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T18:01:15Z","updated_at":"2018-06-21T18:01:15Z","author_association":"NONE","body":"Aha!\r\n\r\n@darrylmendez - \r\n>  Is it because the source RDS is in us-east-1(N. Virginia) and target RDS in us-east-2 (Ohio)\r\n\r\nI think you found the  problem - I'm pretty confident that the RDS snapshot needs to be in the same region. Copy the snapshot first (or find/create a snapshot in the same region).\r\n"}}
{"actor":{"display_login":"mildwonkey"}}