{"action":"created","issue":{"url":"https://api.github.com/repos/convox/rack/issues/2202","repository_url":"https://api.github.com/repos/convox/rack","labels_url":"https://api.github.com/repos/convox/rack/issues/2202/labels{/name}","comments_url":"https://api.github.com/repos/convox/rack/issues/2202/comments","events_url":"https://api.github.com/repos/convox/rack/issues/2202/events","html_url":"https://github.com/convox/rack/issues/2202","id":229549804,"number":2202,"title":"Create RDS postgres db from existing snapshot","user":{"login":"denmat","id":694767,"avatar_url":"https://avatars2.githubusercontent.com/u/694767?v=4","gravatar_id":"","url":"https://api.github.com/users/denmat","html_url":"https://github.com/denmat","followers_url":"https://api.github.com/users/denmat/followers","following_url":"https://api.github.com/users/denmat/following{/other_user}","gists_url":"https://api.github.com/users/denmat/gists{/gist_id}","starred_url":"https://api.github.com/users/denmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denmat/subscriptions","organizations_url":"https://api.github.com/users/denmat/orgs","repos_url":"https://api.github.com/users/denmat/repos","events_url":"https://api.github.com/users/denmat/events{/privacy}","received_events_url":"https://api.github.com/users/denmat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-18T04:10:57Z","updated_at":"2017-09-24T14:13:27Z","closed_at":null,"author_association":"NONE","body":"We would like to be able to restore a database from an exisiting database snapshot. We see this as part of a normal development cycle as we as a disaster recovery process.\r\n\r\nNaively, this _*could*_ possibly be done with the following:\r\n\r\n```\r\n--- a/provider/aws/templates/resource/postgres.tmpl\r\n+++ b/provider/aws/templates/resource/postgres.tmpl\r\n@@ -21,6 +21,11 @@\r\n         \"Default\": \"db.t2.micro\",\r\n         \"Description\": \"Instance class for database nodes\"\r\n       },\r\n+      \"DBSnapshotIdentifier\": {\r\n+        \"Type\": \"String\",\r\n+        \"Default\": \"AWS::NoValue\",\r\n+        \"Description\": \"ARN of database snapshot to restore from\"\r\n+      },\r\n       \"Family\": {\r\n         \"Type\": \"String\",\r\n         \"Default\": \"postgres9.6\",\r\n@@ -109,6 +114,7 @@\r\n           \"DBInstanceClass\": { \"Ref\": \"InstanceType\" },\r\n           \"DBInstanceIdentifier\": { \"Ref\": \"AWS::StackName\" },\r\n           \"DBName\": { \"Ref\": \"Database\" },\r\n+          \"DBSnapshotIdentifier\": { \"Ref\": \"DBSnapshotIdentifier\" },\r\n           \"DBParameterGroupName\": { \"Ref\": \"ParameterGroup\" },\r\n           \"DBSubnetGroupName\": { \"Ref\": \"SubnetGroup\" },\r\n           \"Engine\": \"postgres\",\r\n```\r\n\r\nHappy to help out getting this in.\r\n"},"comment":{"url":"https://api.github.com/repos/convox/rack/issues/comments/331712796","html_url":"https://github.com/convox/rack/issues/2202#issuecomment-331712796","issue_url":"https://api.github.com/repos/convox/rack/issues/2202","id":331712796,"user":{"login":"mwisner","id":201416,"avatar_url":"https://avatars2.githubusercontent.com/u/201416?v=4","gravatar_id":"","url":"https://api.github.com/users/mwisner","html_url":"https://github.com/mwisner","followers_url":"https://api.github.com/users/mwisner/followers","following_url":"https://api.github.com/users/mwisner/following{/other_user}","gists_url":"https://api.github.com/users/mwisner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwisner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwisner/subscriptions","organizations_url":"https://api.github.com/users/mwisner/orgs","repos_url":"https://api.github.com/users/mwisner/repos","events_url":"https://api.github.com/users/mwisner/events{/privacy}","received_events_url":"https://api.github.com/users/mwisner/received_events","type":"User","site_admin":false},"created_at":"2017-09-24T14:13:27Z","updated_at":"2017-09-24T14:13:27Z","author_association":"NONE","body":"The app-to-app connections were fine, but generally speaking (and this could totally be user error)\r\n\r\n1) I couldn't figure out how to get the new postgres instances to show up as a convox resource, not from the perspective of app connections, but for usage in things like `convox resource proxy`... Using Convox resource proxy is currently our defined strategy for obtaining database dumps of development or qa environments in the event of needing to debug or application for whatever reason.\r\n\r\nThis is important for us because it's kind of a PITA to go and update the actual RDS instance to support public access. Having to mark is as public and then mess with the security groups and whatnot.\r\n\r\nUsing Convox proxy is about 100x easier =). I couldn't figure out how to \"import\" an existing rds instance.\r\n\r\n2) There are a couple settings around security groups and subnets that have to ensure that the ones that were previously created were used to make sure everything is setup correctly in terms of communication with the specific rack.\r\n\r\nI'm sure it's possible to set all of that up manually, but when first working with Convox I wasn't sure what settings were really required by convox and which weren't. Probably due to my lack of deep AWS experience. \r\n\r\nSo when we went to go from one environment to 3, prod,qa,staging for our application, I wanted to take the existing data and basically deploy it to new racks. To do this in a way I knew would work out  I had to create a new postgres instance for the new app, then go in and delete once deleted use the leftover security groups. \r\n\r\nso TL;DR... i'll admit it might just be user error. But Convox is about 100x easier to use and setup than AWS itself, and I think that's part of the point. But with my personal workflows this was probably the only confusing thing we had to do in AWS for the entire app setup (Aside from having to deal with cloudformation errors)\r\n\r\n"}}
{"actor":{"display_login":"mwisner"}}