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

Commit 277436e

Browse files
committed
gcore_k8s external-dns added
1 parent 773c677 commit 277436e

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

gcore/data_source_gcore_k8s.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ func dataSourceK8s() *schema.Resource {
6868
Type: schema.TypeBool,
6969
Computed: true,
7070
},
71+
"external_dns_enabled": &schema.Schema{
72+
Type: schema.TypeBool,
73+
Computed: true,
74+
},
7175
"master_lb_floating_ip_enabled": &schema.Schema{
7276
Type: schema.TypeBool,
7377
Computed: true,
@@ -229,6 +233,7 @@ func dataSourceK8sRead(ctx context.Context, d *schema.ResourceData, m interface{
229233
d.Set("node_count", cluster.NodeCount)
230234
d.Set("status", cluster.Status)
231235
d.Set("status_reason", cluster.StatusReason)
236+
//d.Set("external_dns_enabled", cluster.ExternalDNSEnabled)
232237

233238
masterAddresses := make([]string, len(cluster.MasterAddresses))
234239
for i, addr := range cluster.MasterAddresses {

gcore/resource_gcore_k8s.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ func resourceK8s() *schema.Resource {
100100
Type: schema.TypeBool,
101101
Optional: true,
102102
},
103+
"external_dns_enabled": &schema.Schema{
104+
Type: schema.TypeBool,
105+
Optional: true,
106+
},
103107
"master_lb_floating_ip_enabled": &schema.Schema{
104108
Type: schema.TypeBool,
105109
Optional: true,
@@ -265,11 +269,12 @@ func resourceK8sCreate(ctx context.Context, d *schema.ResourceData, m interface{
265269
}
266270

267271
opts := clusters.CreateOpts{
268-
Name: d.Get("name").(string),
269-
FixedNetwork: d.Get("fixed_network").(string),
270-
FixedSubnet: d.Get("fixed_subnet").(string),
271-
KeyPair: d.Get("keypair").(string),
272-
AutoHealingEnabled: d.Get("auto_healing_enabled").(bool),
272+
Name: d.Get("name").(string),
273+
FixedNetwork: d.Get("fixed_network").(string),
274+
FixedSubnet: d.Get("fixed_subnet").(string),
275+
KeyPair: d.Get("keypair").(string),
276+
AutoHealingEnabled: d.Get("auto_healing_enabled").(bool),
277+
//ExternalDNSEnabled: d.Get("external_dns_enabled").(bool),
273278
MasterLBFloatingIPEnabled: d.Get("master_lb_floating_ip_enabled").(bool),
274279
}
275280

@@ -359,6 +364,7 @@ func resourceK8sRead(ctx context.Context, d *schema.ResourceData, m interface{})
359364
}
360365

361366
d.Set("name", cluster.Name)
367+
//d.Set("external_dns_enabled", cluster.ExternalDNSEnabled)
362368
d.Set("fixed_network", cluster.FixedNetwork)
363369
d.Set("fixed_subnet", cluster.FixedSubnet)
364370
d.Set("master_lb_floating_ip_enabled", cluster.FloatingIPEnabled)

0 commit comments

Comments
 (0)