-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance: ressource junos_applications quite slow #709
Comments
Hi 👋 This issue seems to be same as #498. It's a performance issue in terraform-plugin-framework on plan with block set (unordered block list) thats I already notify to hashicorp with this issue hashicorp/terraform-plugin-framework#775 When I created
Example of plan output when remove application: With this Terraform code : resource "junos_applications" "app" {
application {
name = "app_1"
protocol = "icmp"
}
application {
name = "app_2"
protocol = "tcp"
}
application {
name = "app_3"
protocol = "udp"
}
application {
name = "app_4"
protocol = "esp"
}
} Plan output with block set and removing Terraform will perform the following actions:
# junos_applications.app will be updated in-place
~ resource "junos_applications" "app" {
id = "applications"
- application {
- name = "app_3" -> null
- protocol = "udp" -> null
}
# (3 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy. Plan output with block list and removing Terraform will perform the following actions:
# junos_applications.app will be updated in-place
~ resource "junos_applications" "app" {
id = "applications"
~ application {
~ name = "app_3" -> "app_4"
~ protocol = "udp" -> "esp"
}
- application {
- name = "app_4" -> null
- protocol = "esp" -> null
}
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy. As the issue at Hashicorp looks like stuck and applications definitions in Junos device are ordered, I will take care of adding a second version of This will be a workaround and the new resource will be depreciated once Hashicorp fixes the issue. |
hello thanks for your clear answer, actually i think its better to preserve the actual code with block set than block list Edit: i just realize that you were no going to replace the actual ressource but to create a second one _ordered and its perfect, do you think you could do the same for the policies with _unordered ? ^^ |
For policies resources, For more visibility when unordered polices is not a problem, I can add _unordered version resources for policy resources. |
copy of junos_applications 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 #709
Hello
You just created this new ressource junos_applications in order to manage all applications object in a single ressource.
Its working very well but its a bit slow i think
There is 428 objects in this ressource.
380 have no terms, the others have just 2 for udp / tcp
If i have to compare with the address-book for exemple:
my junos_security_address_book ressource contains 1582 entries
Do you think there is a way to optimize this junos_applications ressource ?
The text was updated successfully, but these errors were encountered: