Skip to content

Commit

Permalink
CDI-918: add validate_root_ca param to CDN SSL certificate (#167)
Browse files Browse the repository at this point in the history
* CDI-918: add validate_root_ca param to CDN SSL certificate

* CDI-918: upd CDN SSL certificate docs

* CDI-918: upgrade gcorelabscdn-go to v1.0.25
  • Loading branch information
andrei-lukyanchyk authored Jan 9, 2025
1 parent deb03aa commit 14393f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/resources/cdn_sslcert.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ resource "gcore_cdn_sslcert" "lets_encrypt_cert" {
- `automated` (Boolean) The way SSL certificate was issued.
- `cert` (String, Sensitive) The public part of the SSL certificate. All chain of the SSL certificate should be added.
- `private_key` (String, Sensitive) The private key of the SSL certificate.
- `validate_root_ca` (Boolean) Defines whether to check the SSL certificate for a signature from a trusted certificate authority.

### Read-Only

Expand Down
7 changes: 7 additions & 0 deletions gcore/resource_gcore_cdn_sslcerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ func resourceCDNCert() *schema.Resource {
ForceNew: true,
Description: "The way SSL certificate was issued.",
},
"validate_root_ca": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Defines whether to check the SSL certificate for a signature from a trusted certificate authority.",
},
},
CreateContext: resourceCDNCertCreate,
ReadContext: resourceCDNCertRead,
Expand All @@ -65,6 +71,7 @@ func resourceCDNCertCreate(ctx context.Context, d *schema.ResourceData, m interf
req.Name = d.Get("name").(string)
req.Cert = d.Get("cert").(string)
req.PrivateKey = d.Get("private_key").(string)
req.ValidateRootCA = d.Get("validate_root_ca").(bool)

if d.Get("automated") != nil {
req.Automated = d.Get("automated").(bool)
Expand Down

0 comments on commit 14393f3

Please sign in to comment.