Skip to content

Commit

Permalink
Merge pull request #293 from matprig/kube/feat/optional-update-policy…
Browse files Browse the repository at this point in the history
…-at-cluster-creation

Kube: optional update_policy parameter at cluster creation
  • Loading branch information
scraly authored Aug 30, 2022
2 parents 3a82e77 + ccf132e commit 1910509
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions ovh/resource_cloud_project_kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ func resourceCloudProjectKubeCreate(d *schema.ResourceData, meta interface{}) er
params := (&CloudProjectKubeCreateOpts{}).FromResource(d)
res := &CloudProjectKubeResponse{}

if params.UpdatePolicy != nil {
return fmt.Errorf("the attribute update_policy cannot be set at cluster creation time. Once the cluster is created this attribute can be set and/or updated. This is a temporary bug on our OVH APIV6 side")
}

log.Printf("[DEBUG] Will create kube: %+v", params)
err := config.OVHClient.Post(endpoint, params, res)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions ovh/resource_cloud_project_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ resource "ovh_cloud_project_kube" "cluster" {
service_name = "%s"
name = "%s"
region = "%s"
update_policy = "ALWAYS_UPDATE"
}
`

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cloud_project_kube.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The following arguments are supported:
* default_vrack_gateway - If defined, all egress traffic will be routed towards this IP address, which should belong to the private network. Empty string means disabled.
* private_network_routing_as_default - Defines whether routing should default to using the nodes' private interface, instead of their public interface. Default is false.

* `update_policy` - Cluster update policy. Choose between [ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE]'.
* `update_policy` - Cluster update policy. Choose between [ALWAYS_UPDATE, MINIMAL_DOWNTIME, NEVER_UPDATE].

## Attributes Reference

Expand Down

0 comments on commit 1910509

Please sign in to comment.