Skip to content

Commit

Permalink
add junos_security_address_book_ordered resource
Browse files Browse the repository at this point in the history
copy of junos_security_address_book resource
but with Block List instead of Block Set
to have a workaround for the performance issue on
Terraform plan with many Block Sets
workaround for #498
  • Loading branch information
jeremmfr committed Sep 30, 2024
1 parent 2274ddb commit 51b707c
Show file tree
Hide file tree
Showing 8 changed files with 818 additions and 217 deletions.
2 changes: 2 additions & 0 deletions .changes/issue-709.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FEATURES:

* add `junos_applications_ordered` resource, copy of `junos_applications` resource but with Block List instead of Block Set to have a workaround for the performance issue on Block Sets (workaround for [#709](https://github.com/jeremmfr/terraform-provider-junos/issues/709))

* add `junos_security_address_book_ordered` resource, copy of `junos_security_address_book` resource but with Block List instead of Block Set to have a workaround for the performance issue on Block Sets (workaround for [#498](https://github.com/jeremmfr/terraform-provider-junos/issues/498))

ENHANCEMENTS:

BUG FIXES:
19 changes: 19 additions & 0 deletions docs/resources/security_address_book_ordered.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
page_title: "Junos: junos_security_address_book_ordered"
---

# junos_security_address_book_ordered

It has the same functionality as the `junos_security_address_book` resource
but with `network_address`, `dns_name`, `range_address`, `wildcard_address` and `address_set`
arguments as Block List instead of Block Set.

This provides a workaround for the performance issue on Terraform plan with many Block Sets
(details in GitHub issue [#775](https://github.com/hashicorp/terraform-plugin-framework/issues/775))
but Block List involves:

- a change in the order of the blocks triggers a resource change.
- Terraform plan output can be complex when the number of blocks on the resource changes.

See the [junos_security_address_book](security_address_book) resource
for more details on arguments or attributes.
1 change: 1 addition & 0 deletions internal/providerfwk/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (p *junosProvider) Resources(_ context.Context) []func() resource.Resource
newRstpInterfaceResource,
newSecurityResource,
newSecurityAddressBookResource,
newSecurityAddressBookOrderedResource,
newSecurityAuthenticationKeyChainResource,
newSecurityGlobalPolicyResource,
newSecurityIkeGatewayResource,
Expand Down
Loading

0 comments on commit 51b707c

Please sign in to comment.