Increase subnet & security group deletion timeout (2 -> 5 mins)
- this should prevent DependencyViolation errors while waiting for larger ASGs to shut down
This commit is contained in:
parent
d08ba05d2c
commit
754bcd8307
|
@ -295,7 +295,7 @@ func resourceAwsSecurityGroupDelete(d *schema.ResourceData, meta interface{}) er
|
||||||
|
|
||||||
log.Printf("[DEBUG] Security Group destroy: %v", d.Id())
|
log.Printf("[DEBUG] Security Group destroy: %v", d.Id())
|
||||||
|
|
||||||
return resource.Retry(2*time.Minute, func() error {
|
return resource.Retry(5*time.Minute, func() error {
|
||||||
_, err := conn.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{
|
_, err := conn.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{
|
||||||
GroupID: aws.String(d.Id()),
|
GroupID: aws.String(d.Id()),
|
||||||
})
|
})
|
||||||
|
|
|
@ -166,7 +166,7 @@ func resourceAwsSubnetDelete(d *schema.ResourceData, meta interface{}) error {
|
||||||
wait := resource.StateChangeConf{
|
wait := resource.StateChangeConf{
|
||||||
Pending: []string{"pending"},
|
Pending: []string{"pending"},
|
||||||
Target: "destroyed",
|
Target: "destroyed",
|
||||||
Timeout: 2 * time.Minute,
|
Timeout: 5 * time.Minute,
|
||||||
MinTimeout: 1 * time.Second,
|
MinTimeout: 1 * time.Second,
|
||||||
Refresh: func() (interface{}, string, error) {
|
Refresh: func() (interface{}, string, error) {
|
||||||
_, err := conn.DeleteSubnet(req)
|
_, err := conn.DeleteSubnet(req)
|
||||||
|
|
Loading…
Reference in New Issue