Skip to content

Commit 4dce014

Browse files
authored
Merge pull request #728 from rawmind0/nodetemplate
Fix rancher2_node_template resource to proper update cloud_credential_id and use_internal_ip_address
2 parents 2577441 + eaf3f78 commit 4dce014

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.17.1 (Unreleased)
1+
## 1.17.1 (August 18, 2021)
22

33
FEATURES:
44

@@ -11,6 +11,7 @@ ENHANCEMENTS:
1111
BUG FIXES:
1212

1313
* Fix `rancher2_cluster` resource update to not reset fleet workspace name
14+
* Fix `rancher2_node_template` resource to proper update `cloud_credential_id` and `use_internal_ip_address` arguments
1415

1516
## 1.17.0 (August 12, 2021)
1617

rancher2/resource_rancher2_node_template.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ func resourceRancher2NodeTemplateUpdate(d *schema.ResourceData, meta interface{}
111111
return err
112112
}
113113

114+
useInternalIPAddress := d.Get("use_internal_ip_address").(bool)
114115
update := map[string]interface{}{
115116
"name": d.Get("name").(string),
116117
"authCertificateAuthority": d.Get("auth_certificate_authority").(string),
117118
"authKey": d.Get("auth_key").(string),
119+
"cloudCredentialId": d.Get("cloud_credential_id").(string),
118120
"description": d.Get("description").(string),
119121
"engineEnv": toMapString(d.Get("engine_env").(map[string]interface{})),
120122
"engineInsecureRegistry": toArrayString(d.Get("engine_insecure_registry").([]interface{})),
@@ -124,6 +126,7 @@ func resourceRancher2NodeTemplateUpdate(d *schema.ResourceData, meta interface{}
124126
"engineRegistryMirror": toArrayString(d.Get("engine_registry_mirror").([]interface{})),
125127
"engineStorageDriver": d.Get("engine_storage_driver").(string),
126128
"nodeTaints": expandTaints(d.Get("node_taints").([]interface{})),
129+
"useInternalIpAddress": &useInternalIPAddress,
127130
"annotations": toMapString(d.Get("annotations").(map[string]interface{})),
128131
"labels": toMapString(d.Get("labels").(map[string]interface{})),
129132
}

0 commit comments

Comments
 (0)