providers/aws: wait for LC to exist [GH-302]
This commit is contained in:
parent
129771df17
commit
bd0cf94e89
|
@ -70,6 +70,8 @@ BUG FIXES:
|
|||
count of instances.
|
||||
* providers/aws: Terraform can handle ELBs deleted manually. [GH-304]
|
||||
* providers/aws: Report errors properly if RDS fails to delete. [GH-310]
|
||||
* providers/aws: Wait for launch configuration to exist after creation
|
||||
(AWS eventual consistency) [GH-302]
|
||||
|
||||
## 0.2.2 (September 9, 2014)
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/hashcode"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
"github.com/mitchellh/goamz/autoscaling"
|
||||
)
|
||||
|
@ -103,7 +105,11 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface
|
|||
d.SetId(d.Get("name").(string))
|
||||
log.Printf("[INFO] launch configuration ID: %s", d.Id())
|
||||
|
||||
// We put a Retry here since sometimes eventual consistency bites
|
||||
// us and we need to retry a few times to get the LC to load properly
|
||||
return resource.Retry(30 * time.Second, func() error {
|
||||
return resourceAwsLaunchConfigurationRead(d, meta)
|
||||
})
|
||||
}
|
||||
|
||||
func resourceAwsLaunchConfigurationDelete(d *schema.ResourceData, meta interface{}) error {
|
||||
|
|
Loading…
Reference in New Issue