diff --git a/linode/firewall/framework_models.go b/linode/firewall/framework_models.go index ef0662f3f..04f301d3e 100644 --- a/linode/firewall/framework_models.go +++ b/linode/firewall/framework_models.go @@ -356,7 +356,7 @@ func (state *FirewallResourceModel) RulesAndPoliciesHaveChanges( func (state *FirewallResourceModel) LinodesOrNodeBalancersHaveChanges( ctx context.Context, plan FirewallResourceModel, ) bool { - return !state.Linodes.Equal(plan.Linodes) || state.NodeBalancers.Equal(plan.NodeBalancers) + return !state.Linodes.Equal(plan.Linodes) || !state.NodeBalancers.Equal(plan.NodeBalancers) } func FlattenFirewallRules( diff --git a/linode/firewall/framework_schema_resource.go b/linode/firewall/framework_schema_resource.go index d468ea1d8..4ccc5b397 100644 --- a/linode/firewall/framework_schema_resource.go +++ b/linode/firewall/framework_schema_resource.go @@ -9,6 +9,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" @@ -145,12 +146,18 @@ var frameworkResourceSchema = schema.Schema{ Optional: true, Computed: true, ElementType: types.Int64Type, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.UseStateForUnknown(), + }, }, "nodebalancers": schema.SetAttribute{ Description: "The IDs of NodeBalancers to apply this firewall to.", Optional: true, Computed: true, ElementType: types.Int64Type, + PlanModifiers: []planmodifier.Set{ + setplanmodifier.UseStateForUnknown(), + }, }, "devices": schema.ListAttribute{ Description: "The devices associated with this firewall.",