Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit a6ac9eb

Browse files
vvelikodnyVitalii Velikodnyi
andauthored
add issue LE cert param for create resource request (#100)
Co-authored-by: Vitalii Velikodnyi <[email protected]>
1 parent 9c1833a commit a6ac9eb

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

gcore/resource_gcore_cdn_resource.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,12 @@ func resourceCDNResource() *schema.Resource {
446446
Optional: true,
447447
Description: "generate LE certificate automatically.",
448448
},
449+
"issue_le_cert": {
450+
Type: schema.TypeBool,
451+
Optional: true,
452+
Computed: true,
453+
Description: "Generate LE certificate.",
454+
},
449455
"active": {
450456
Type: schema.TypeBool,
451457
Optional: true,
@@ -481,6 +487,11 @@ func resourceCDNResourceCreate(ctx context.Context, d *schema.ResourceData, m in
481487
req.SSlEnabled = d.Get("ssl_enabled").(bool)
482488
req.SSLData = d.Get("ssl_data").(int)
483489
req.SSLAutomated = d.Get("ssl_automated").(bool)
490+
491+
if d.Get("issue_le_cert") != nil {
492+
req.IssueLECert = d.Get("issue_le_cert").(bool)
493+
}
494+
484495
req.Options = listToOptions(d.Get("options").([]interface{}))
485496

486497
for _, hostname := range d.Get("secondary_hostnames").(*schema.Set).List() {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/AlekSi/pointer v1.2.0
77
github.com/G-Core/gcore-dns-sdk-go v0.2.3
88
github.com/G-Core/gcore-storage-sdk-go v0.1.3
9-
github.com/G-Core/gcorelabscdn-go v0.1.22
9+
github.com/G-Core/gcorelabscdn-go v0.1.24
1010
github.com/G-Core/gcorelabscloud-go v0.5.2
1111
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
1212
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ github.com/G-Core/gcorelabscdn-go v0.1.21 h1:a6yzE29N72a29N1jcwWjvVDPdAdyQhNrqJQ
8989
github.com/G-Core/gcorelabscdn-go v0.1.21/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
9090
github.com/G-Core/gcorelabscdn-go v0.1.22 h1:UHHP8rwX168CcxrdZNTu2KMhPOEuZPfsaFIeKWjucV0=
9191
github.com/G-Core/gcorelabscdn-go v0.1.22/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
92+
github.com/G-Core/gcorelabscdn-go v0.1.23 h1:pX2MWKhNNhFw7v+JnxLh5/10rvltxWVK8PBdbomLsY8=
93+
github.com/G-Core/gcorelabscdn-go v0.1.23/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
94+
github.com/G-Core/gcorelabscdn-go v0.1.24 h1:3RZgU2rNxLum61FKQNND/XbFDj7vka2Q/BzG2Gg2oW4=
95+
github.com/G-Core/gcorelabscdn-go v0.1.24/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
9296
github.com/G-Core/gcorelabscloud-go v0.5.2 h1:KoBre603zAwh7yJPNVDgAwXwwyz6v5xL0UXqr8kRL78=
9397
github.com/G-Core/gcorelabscloud-go v0.5.2/go.mod h1:nuDFy76Eja1EXBrG+q+dqpC2KqrHfID3JS8833LDJG8=
9498
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=

0 commit comments

Comments
 (0)