{"action":"closed","issue":{"url":"https://api.github.com/repos/ingenieux/beanstalker/issues/48","labels_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/48/comments","events_url":"https://api.github.com/repos/ingenieux/beanstalker/issues/48/events","html_url":"https://github.com/ingenieux/beanstalker/issues/48","id":36507218,"number":48,"title":"Unable to use bind-domains after replace-environment","user":{"login":"zachlowry","id":2203948,"avatar_url":"https://avatars.githubusercontent.com/u/2203948?v=3","gravatar_id":"","url":"https://api.github.com/users/zachlowry","html_url":"https://github.com/zachlowry","followers_url":"https://api.github.com/users/zachlowry/followers","following_url":"https://api.github.com/users/zachlowry/following{/other_user}","gists_url":"https://api.github.com/users/zachlowry/gists{/gist_id}","starred_url":"https://api.github.com/users/zachlowry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachlowry/subscriptions","organizations_url":"https://api.github.com/users/zachlowry/orgs","repos_url":"https://api.github.com/users/zachlowry/repos","events_url":"https://api.github.com/users/zachlowry/events{/privacy}","received_events_url":"https://api.github.com/users/zachlowry/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-06-25T18:12:03Z","updated_at":"2015-09-11T04:53:55Z","closed_at":"2015-09-11T04:53:55Z","body":"I am trying to implement zero downtime deployment using the replace-environment mojo combined with the bind-domains mojo. The wrinkle here is that there is a Route53 alias record from the domain apex that is pointing to the ELB of the current instance. Therefore, we need to update the alias record immediately after deployment. This fails because beanstalk.environmentRef is using the first section of the hostname given to it ( (.*).elasticbeanstalk.com ) as the environmentName, rather than resolving the environment based on the current cname after the swap from replace-environment. Therefore, in the first execution, a new environment named ${beanstalk.cnamePrefix}-0 is created and the R53 alias record is swapped, but on the next invocation an environment named ${beanstalk.cnamePrefix} can not be found. "}}