Skip to content

Commit

Permalink
Merge pull request #1612 from linode/main
Browse files Browse the repository at this point in the history
Merge `main` back to `dev`
  • Loading branch information
zliang-akamai authored Oct 7, 2024
2 parents 1603370 + 97ca025 commit 7459ea7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion linode/firewall/framework_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
7 changes: 7 additions & 0 deletions linode/firewall/framework_schema_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.",
Expand Down

0 comments on commit 7459ea7

Please sign in to comment.