Skip to content

Commit d13808c

Browse files
authored
Merge pull request #80 from StatusCakeDev/remove-validation-from-uptime-address-field
Allow the uptime check address field to be more permissive
2 parents 665c5fe + a600ab8 commit d13808c

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

docs/resources/uptime_check.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ output "example_com_uptime_check_id" {
104104

105105
Required:
106106

107-
- **address** (String) URL or IP address of the server under test
107+
- **address** (String) URL, FQDN, or IP address of the server under test
108108

109109
Optional:
110110

@@ -120,12 +120,16 @@ Required:
120120

121121
Optional:
122122

123-
- **dns_server** (String) Hostname or IP address of the nameserver to query
123+
- **dns_server** (String) FQDN or IP address of the nameserver to query
124124

125125

126126
<a id="nestedblock--http_check"></a>
127127
### Nested Schema for `http_check`
128128

129+
Required:
130+
131+
- **status_codes** (Set of String) List of status codes that trigger an alert
132+
129133
Optional:
130134

131135
- **basic_authentication** (Block List, Max: 1) Basic Authentication (RFC7235) configuration block (see [below for nested schema](#nestedblock--http_check--basic_authentication))
@@ -137,8 +141,7 @@ Optional:
137141
- **request_method** (String) Type of HTTP check. Either HTTP, or HEAD
138142
- **request_payload** (Map of String) Payload submitted with the request. Setting this updates the check to use the HTTP POST verb. Only one of `request_payload` or `request_payload_raw` may be specified
139143
- **request_payload_raw** (String) Raw payload submitted with the request. Setting this updates the check to use the HTTP POST verb. Only one of `request_payload` or `request_payload_raw` may be specified
140-
- **status_codes** (Set of String) List of status codes that trigger an alert
141-
- **timeout** (Number) Time to wait to receive the first byte
144+
- **timeout** (Number) The number of seconds to wait to receive the first byte
142145
- **user_agent** (String) Custom user agent string set when testing
143146
- **validate_ssl** (Boolean) Whether to send an alert if the SSL certificate is soon to expire
144147

internal/provider/resource_ssl_check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ func resourceStatusCakeSSLCheck() *schema.Resource {
125125
"user_agent": &schema.Schema{
126126
Type: schema.TypeString,
127127
Optional: true,
128-
ValidateFunc: validation.StringIsNotEmpty,
129128
Description: "Custom user agent string set when testing",
129+
ValidateFunc: validation.StringIsNotEmpty,
130130
},
131131
},
132132
}

internal/provider/resource_uptime_check.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ func resourceStatusCakeUptimeCheck() *schema.Resource {
9393
"dns_server": &schema.Schema{
9494
Type: schema.TypeString,
9595
Optional: true,
96-
Description: "Hostname or IP address of the nameserver to query",
97-
ValidateFunc: validation.IsIPAddress,
96+
Description: "FQDN or IP address of the nameserver to query",
97+
ValidateFunc: validation.StringIsNotEmpty,
9898
},
9999
},
100100
},
@@ -216,8 +216,8 @@ func resourceStatusCakeUptimeCheck() *schema.Resource {
216216
"user_agent": &schema.Schema{
217217
Type: schema.TypeString,
218218
Optional: true,
219-
ValidateFunc: validation.StringIsNotEmpty,
220219
Description: "Custom user agent string set when testing",
220+
ValidateFunc: validation.StringIsNotEmpty,
221221
},
222222
"validate_ssl": &schema.Schema{
223223
Type: schema.TypeBool,
@@ -268,8 +268,8 @@ func resourceStatusCakeUptimeCheck() *schema.Resource {
268268
Type: schema.TypeString,
269269
Required: true,
270270
ForceNew: true,
271-
Description: "URL or IP address of the server under test",
272-
ValidateFunc: validation.Any(validation.IsURLWithHTTPorHTTPS, validation.IsIPAddress),
271+
Description: "URL, FQDN, or IP address of the server under test",
272+
ValidateFunc: validation.StringIsNotEmpty,
273273
},
274274
"host": &schema.Schema{
275275
Type: schema.TypeString,

0 commit comments

Comments
 (0)