Skip to content

Commit

Permalink
force to use "https://gos3.io/"
Browse files Browse the repository at this point in the history
Currently, only https://gos3.io/ is supported for ms sql server backup.
  • Loading branch information
nvthongswansea committed Jun 1, 2021
1 parent f41d415 commit 0404aa9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions gridscale/resource_gridscale_sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import (
"log"
)

const msSQLTemplateFlavourName = "mssql"
const (
msSQLTemplateFlavourName = "mssql"
defaultBackupServerURL = "https://gos3.io/"
)

func resourceGridscaleMSSQLServer() *schema.Resource {
return &schema.Resource{
Expand Down Expand Up @@ -145,8 +148,15 @@ func resourceGridscaleMSSQLServer() *schema.Resource {
Description: "Secret key used to authenticate against Object Storage server.",
},
"backup_server_url": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Optional: true,
Default: defaultBackupServerURL,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
if v.(string) != defaultBackupServerURL {
errors = append(errors, fmt.Errorf("Currently, only %s is supported", defaultBackupServerURL))
}
return
},
Description: "Object Storage server URL the bucket is located on.",
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/sqlserver.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The following arguments are supported:

* `backup_secret_key` - (Required) Secret key used to authenticate against Object Storage server.

* `backup_server_url` - (Required) Object Storage server URL the bucket is located on.
* `backup_server_url` - (Optional, Default: "https://gos3.io/") Object Storage server URL the bucket is located on. **Note**: Currently, only object storage host "https://gos3.io/" is supported.

## Timeouts

Expand Down

0 comments on commit 0404aa9

Please sign in to comment.