Skip to content

Commit

Permalink
changed default timeout to 180s
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-mazurkiewicz committed Feb 27, 2025
1 parent 0fde79d commit bd6e4be
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.1.20 (unreleased)

- Change default timeout for asynchronous operations to 180 seconds
- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
Expand Down
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.20 (unreleased)

- Change default timeout for asynchronous operations to 180 seconds
- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ provider "catalystcenter" {
### Optional

- `insecure` (Boolean) Allow insecure HTTPS client. This can also be set as the CC_INSECURE environment variable. Defaults to `true`.
- `max_timeout` (Number) Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `60`.
- `max_timeout` (Number) Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `180`.
- `password` (String, Sensitive) Password for the Catalyst Center instance. This can also be set as the CC_PASSWORD environment variable.
- `retries` (Number) Number of retries for REST API calls. This can also be set as the CC_RETRIES environment variable. Defaults to `3`.
- `url` (String) URL of the Catalyst Center instance. This can also be set as the CC_URL environment variable.
Expand Down
4 changes: 2 additions & 2 deletions gen/templates/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (p *CcProvider) Schema(ctx context.Context, req provider.SchemaRequest, res
},
},
"max_timeout": schema.Int64Attribute{
MarkdownDescription: "Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `60`.",
MarkdownDescription: "Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `180`.",
Optional: true,
Validators: []validator.Int64{
int64validator.Between(0, 3600),
Expand Down Expand Up @@ -244,7 +244,7 @@ func (p *CcProvider) Configure(ctx context.Context, req provider.ConfigureReques
if config.MaxTimeout.IsNull() {
maxTimeoutStr := os.Getenv("CC_MAX_TIMEOUT")
if maxTimeoutStr == "" {
maxTimeout = 60
maxTimeout = 180
} else {
maxTimeout, _ = strconv.ParseInt(maxTimeoutStr, 0, 64)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *CcProvider) Schema(ctx context.Context, req provider.SchemaRequest, res
},
},
"max_timeout": schema.Int64Attribute{
MarkdownDescription: "Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `60`.",
MarkdownDescription: "Timeout in seconds for asynchronous tasks. This can also be set as the CC_MAX_TIMEOUT environment variable. Defaults to `180`.",
Optional: true,
Validators: []validator.Int64{
int64validator.Between(0, 3600),
Expand Down Expand Up @@ -242,7 +242,7 @@ func (p *CcProvider) Configure(ctx context.Context, req provider.ConfigureReques
if config.MaxTimeout.IsNull() {
maxTimeoutStr := os.Getenv("CC_MAX_TIMEOUT")
if maxTimeoutStr == "" {
maxTimeout = 60
maxTimeout = 180
} else {
maxTimeout, _ = strconv.ParseInt(maxTimeoutStr, 0, 64)
}
Expand Down
1 change: 1 addition & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.20 (unreleased)

- Change default timeout for asynchronous operations to 180 seconds
- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
Expand Down

0 comments on commit bd6e4be

Please sign in to comment.