{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/467","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/467/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/467/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/467/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/467","id":235663341,"number":467,"title":"With aws_db_instance when you remove the snapshot_identifier it wants to force a new resource","user":{"login":"hashibot","id":26720499,"avatar_url":"https://avatars1.githubusercontent.com/u/26720499?v=4","gravatar_id":"","url":"https://api.github.com/users/hashibot","html_url":"https://github.com/hashibot","followers_url":"https://api.github.com/users/hashibot/followers","following_url":"https://api.github.com/users/hashibot/following{/other_user}","gists_url":"https://api.github.com/users/hashibot/gists{/gist_id}","starred_url":"https://api.github.com/users/hashibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashibot/subscriptions","organizations_url":"https://api.github.com/users/hashibot/orgs","repos_url":"https://api.github.com/users/hashibot/repos","events_url":"https://api.github.com/users/hashibot/events{/privacy}","received_events_url":"https://api.github.com/users/hashibot/received_events","type":"User","site_admin":false},"labels":[{"id":620316239,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/bug","name":"bug","color":"f7c6c7","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-13T19:23:27Z","updated_at":"2017-11-16T02:08:25Z","closed_at":null,"author_association":"NONE","body":"_This issue was originally opened by @donnoman as hashicorp/terraform#11196. It was migrated here as part of the [provider split](https://www.hashicorp.com/blog/upcoming-provider-changes-in-terraform-0-10/). The original body of the issue is below._\r\n\r\n<hr>\r\n\r\n### Terraform Version\r\nTerraform v0.8.4\r\n\r\n### Affected Resource(s)\r\n- aws_db_instance\r\n\r\n### Terraform Configuration Files\r\n```resource \"aws_db_instance\" \"default\" {\r\n  apply_immediately    = true\r\n  allocated_storage    = 10\r\n  engine               = \"mariadb\"\r\n  engine_version       = \"10.0.24\"\r\n  instance_class       = \"db.t2.medium\"\r\n  # add this back in after RDS has been created\r\n  name                 = \"wordpress\"\r\n  identifier           = \"lh-wordpress-${var.stage}\"\r\n  multi_az             = true\r\n  username             = \"${var.aws_rds_username}\"\r\n  password             = \"${var.aws_rds_password}\"\r\n  db_subnet_group_name = \"${var.aws_vpc_subnet_shared}\"\r\n  vpc_security_group_ids = [\"${aws_security_group.rds.id}\"]\r\n  parameter_group_name = \"default.mariadb10.0\"\r\n  final_snapshot_identifier = \"lh-wordpress-${var.stage}-final\"\r\n  # remove the snapshot_identifier\r\n  # snapshot_identifier = \"lh-wordpress-staging-before-tf\"\r\n  copy_tags_to_snapshot = true\r\n  backup_retention_period = 30\r\n  backup_window = \"07:00-08:00\"\r\n  maintenance_window = \"sun:10:00-sun:11:00\"\r\n  tags {\r\n    Name = \"lh-wordpress-${var.stage}\"\r\n    cluster = \"lh-wordpress-${var.stage}\"\r\n    terraform = \"true\"\r\n  }\r\n}\r\n```\r\n\r\n### Debug Output\r\n```\r\n    snapshot_identifier:               \"lh-wordpress-staging-before-tf\" => \"\" (forces new resource)\r\n```\r\n\r\n### Expected Behavior\r\nNo change required.  In the future and for other environments I don't want this snapshot used. This snapshot was a restoration, because the last terraform run killed my DB\r\n\r\n### Actual Behavior\r\nIt wants to kill my newly restored db\r\n\r\n### Steps to Reproduce\r\nPlease list the steps required to reproduce the issue, for example:\r\n1. `terraform apply` with the snapshot you need restored\r\n1. remove the snapshot_identifier you no longer need because your db is now working\r\n1. `terraform apply` \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments/344792537","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/467#issuecomment-344792537","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/467","id":344792537,"user":{"login":"mwarkentin","id":67560,"avatar_url":"https://avatars3.githubusercontent.com/u/67560?v=4","gravatar_id":"","url":"https://api.github.com/users/mwarkentin","html_url":"https://github.com/mwarkentin","followers_url":"https://api.github.com/users/mwarkentin/followers","following_url":"https://api.github.com/users/mwarkentin/following{/other_user}","gists_url":"https://api.github.com/users/mwarkentin/gists{/gist_id}","starred_url":"https://api.github.com/users/mwarkentin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwarkentin/subscriptions","organizations_url":"https://api.github.com/users/mwarkentin/orgs","repos_url":"https://api.github.com/users/mwarkentin/repos","events_url":"https://api.github.com/users/mwarkentin/events{/privacy}","received_events_url":"https://api.github.com/users/mwarkentin/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T02:08:25Z","updated_at":"2017-11-16T02:08:25Z","author_association":"NONE","body":"Any thoughts on how this could be improved? We are having to do some pretty gnarly TF state manipulation when setting up plans to restore multiple db instances from snapshots.. would be nice to have a simple way of doing the one-off snapshot id."}}
{"actor":{"display_login":"mwarkentin"}}