Skip to content

Commit

Permalink
Merge pull request #6322 from terraform-providers/jen20/subnet-delete…
Browse files Browse the repository at this point in the history
…-timeout

Bump timeout for subnet delete from 10 to 20 mins
  • Loading branch information
bflad authored Jun 4, 2019
2 parents a31e76a + dde1073 commit d81d5df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func resourceAwsSubnet() *schema.Resource {

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(10 * time.Minute),
Delete: schema.DefaultTimeout(10 * time.Minute),
Delete: schema.DefaultTimeout(20 * time.Minute),
},

SchemaVersion: 1,
Expand Down Expand Up @@ -129,7 +129,7 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error {
Pending: []string{"pending"},
Target: []string{"available"},
Refresh: SubnetStateRefreshFunc(conn, *subnet.SubnetId),
Timeout: 10 * time.Minute,
Timeout: d.Timeout(schema.TimeoutCreate),
}

_, err = stateConf.WaitForState()
Expand Down Expand Up @@ -330,7 +330,7 @@ func resourceAwsSubnetDelete(d *schema.ResourceData, meta interface{}) error {
wait := resource.StateChangeConf{
Pending: []string{"pending"},
Target: []string{"destroyed"},
Timeout: 10 * time.Minute,
Timeout: d.Timeout(schema.TimeoutDelete),
MinTimeout: 1 * time.Second,
Refresh: func() (interface{}, string, error) {
_, err := conn.DeleteSubnet(req)
Expand Down

0 comments on commit d81d5df

Please sign in to comment.