File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ var resourceSchema = map[string]*schema.Schema{
133133 Type : schema .TypeInt ,
134134 Description : "The ID of the Firewall to attach to nodes in this node pool." ,
135135 Optional : true ,
136+ Computed : true ,
136137 },
137138 "labels" : {
138139 Type : schema .TypeMap ,
Original file line number Diff line number Diff line change @@ -149,9 +149,11 @@ func (pool *NodePoolModel) SetNodePoolCreateOptions(
149149 )
150150 p .Type = pool .Type .ValueString ()
151151 p .Label = pool .Label .ValueStringPointer ()
152- if ! pool .FirewallID .IsUnknown () && ! pool .FirewallID .IsNull () {
153- id := pool .FirewallID .ValueInt64 ()
154- p .FirewallID = linodego .Pointer (int (id ))
152+ if ! pool .FirewallID .IsUnknown () {
153+ p .FirewallID = helper .FrameworkSafeInt64PointerToIntPointer (pool .FirewallID .ValueInt64Pointer (), diags )
154+ if diags .HasError () {
155+ return
156+ }
155157 }
156158
157159 if ! pool .Tags .IsNull () {
@@ -205,9 +207,11 @@ func (pool *NodePoolModel) SetNodePoolUpdateOptions(
205207 }
206208
207209 if ! state .FirewallID .Equal (pool .FirewallID ) {
208- if ! pool .FirewallID .IsUnknown () && ! pool .FirewallID .IsNull () {
209- id := pool .FirewallID .ValueInt64 ()
210- p .FirewallID = linodego .Pointer (int (id ))
210+ if ! pool .FirewallID .IsUnknown () {
211+ p .FirewallID = helper .FrameworkSafeInt64PointerToIntPointer (pool .FirewallID .ValueInt64Pointer (), diags )
212+ if diags .HasError () {
213+ return false
214+ }
211215 }
212216 // else: do NOT set p.FirewallID at all
213217 shouldUpdate = true
You can’t perform that action at this time.
0 commit comments