Skip to content

Commit

Permalink
Add timeout to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
uzaxirr committed Aug 6, 2024
1 parent 949f75c commit 38b73da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions civo/firewall/resource_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func ResourceFirewall() *schema.Resource {
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(30 * time.Minute),
Update: schema.DefaultTimeout(30 * time.Minute),
Delete: schema.DefaultTimeout(30 * time.Minute),
},
}
}

Expand Down
2 changes: 2 additions & 0 deletions civo/instances/resource_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ func ResourceInstance() *schema.Resource {
},
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(30 * time.Minute),
Update: schema.DefaultTimeout(30 * time.Minute),
Delete: schema.DefaultTimeout(30 * time.Minute),
},
}
}
Expand Down
5 changes: 5 additions & 0 deletions civo/network/resource_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ func ResourceNetwork() *schema.Resource {
ReadContext: resourceNetworkRead,
UpdateContext: resourceNetworkUpdate,
DeleteContext: resourceNetworkDelete,
Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(30 * time.Minute),
Update: schema.DefaultTimeout(30 * time.Minute),
Delete: schema.DefaultTimeout(30 * time.Minute),
},
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Expand Down

0 comments on commit 38b73da

Please sign in to comment.