You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should created next configuration on device:
set policy-options policy-statement BGP-in term BGP from protocol bgp
set policy-options policy-statement BGP-in term BGP from route-filter 10.1.0.0/16 orlonger
set policy-options policy-statement BGP-in term BGP from route-filter 10.11.0.0/16 orlonger
set policy-options policy-statement BGP-in term BGP from route-filter 10.150.0.0/16 orlonger
set policy-options policy-statement BGP-in term BGP from route-filter 10.199.0.0/16 orlonger
set policy-options policy-statement BGP-in term BGP then metric add 0
set policy-options policy-statement BGP-in term BGP then local-preference add 0
set policy-options policy-statement BGP-in term BGP then community add NC-all
set policy-options policy-statement BGP-in term BGP then accept
set policy-options policy-statement BGP-in term last then reject
Actual Behavior
Plan:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.device_config.junos_policyoptions_policy_statement.policy_statement_routing_filter["BGP-in"] will be updated in-place
~ resource "junos_policyoptions_policy_statement" "policy_statement_routing_filter" {
id = "BGP-in"
name = "BGP-in"
~ term {
name = "BGP"
~ from {
# (1 unchanged attribute hidden)
+ route_filter {
+ option = "orlonger"
+ route = "10.199.0.0/16"
}
# (3 unchanged blocks hidden)
}
# (1 unchanged block hidden)
}
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Apply:
[2023-08-21T11:27:12.127Z] module.device_config.junos_policyoptions_policy_statement.policy_statement_routing_filter["BGP-in"]: Modifying... [id=BGP-in]
[2023-08-21T11:27:12.127Z] ╷
[2023-08-21T11:27:12.127Z] │ Error: Plugin did not respond
[2023-08-21T11:27:12.127Z] │
[2023-08-21T11:27:12.127Z] │ with module.device_config.junos_policyoptions_policy_statement.policy_statement_routing_filter["BGP-in"],
[2023-08-21T11:27:12.127Z] │ on modules/device_config/main.tf line 500, in resource "junos_policyoptions_policy_statement" "policy_statement_routing_filter":
[2023-08-21T11:27:12.127Z] │ 500: resource "junos_policyoptions_policy_statement" "policy_statement_routing_filter" {
[2023-08-21T11:27:12.127Z] │
[2023-08-21T11:27:12.127Z] │ The plugin encountered an error, and failed to respond to the
[2023-08-21T11:27:12.127Z] │ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
[2023-08-21T11:27:12.128Z] │ contain more details.
[2023-08-21T11:27:12.128Z] ╵
[2023-08-21T11:27:12.128Z]
[2023-08-21T11:27:12.128Z] Stack trace from the terraform-provider-junos_v2.1.0 plugin:
[2023-08-21T11:27:12.128Z]
[2023-08-21T11:27:12.128Z] panic: runtime error: invalid memory address or nil pointer dereference
[2023-08-21T11:27:12.128Z] [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x89c69d]
[2023-08-21T11:27:12.128Z]
[2023-08-21T11:27:12.128Z] goroutine 16 [running]:
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk.(*policyoptionsPolicyStatementBlockFrom).isEmpty(0x0)
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk/resource_policyoptions_policy_statement.go:995 +0x1d
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk.(*policyoptionsPolicyStatementData).set(0xc0002b4310, {0x15d2a00?, 0xc0002b4380?}, 0xc0002b4380?)
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk/resource_policyoptions_policy_statement.go:2158 +0xd9c
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk.defaultResourceUpdate({0x15d9b60, 0xc0006df800}, {0x15d5eb8, 0xc000012678}, {0x15d2a00?, 0xc0002b4380?}, {0x15d2a40?, 0xc0002b4310}, 0xc0005f32c0)
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk/default_resource_op.go:262 +0x8a5
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk.(*policyoptionsPolicyStatement).Update(0xc0004f01e8?, {0x15d9b60, 0xc0006df800}, {{{{0x15df168, 0xc000819680}, {0x121c800, 0xc000967590}}, {0x15e0f40, 0xc0006fcbe0}}, {{{0x15df168, ...}, ...}, ...}, ...}, ...)
[2023-08-21T11:27:12.128Z] github.com/jeremmfr/terraform-provider-junos/internal/providerfwk/resource_policyoptions_policy_statement.go:2033 +0x205
[2023-08-21T11:27:12.128Z] github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).UpdateResource(0xc0000e54a0, {0x15d9b60, 0xc0006df800}, 0xc0009332c8, 0xc0009331d8)
[2023-08-21T11:27:12.128Z] github.com/hashicorp/terraform-plugin-framework@v1.3.3/internal/fwserver/server_updateresource.go:122 +0x731
[2023-08-21T11:27:12.128Z] github.com/hashicorp/terraform-plugin-framework/internal/fwserver.(*Server).ApplyResourceChange(0xc0009333e0?, {0x15d9b60, 0xc0006df800}, 0xc000676410, 0xc0009333e0)
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-framework@v1.3.3/internal/fwserver/server_applyresourcechange.go:102 +0x1a5
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-framework/internal/proto5server.(*Server).ApplyResourceChange(0xc0000e54a0, {0x15d9b60?, 0xc0006df6b0?}, 0xc000676370)
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-framework@v1.3.3/internal/proto5server/server_applyresourcechange.go:55 +0x41a
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ApplyResourceChange({0xc00043cae0, 0xc000404fc0, 0xc00043cb10, 0xc00043cb40, {0xc00034bbc0, 0x2, 0x2}}, {0x15d9b60?, 0xc0006df380?}, 0xc000676370)
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-mux@v0.11.2/tf5muxserver/mux_server_ApplyResourceChange.go:30 +0x139
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0005440a0, {0x15d9b60?, 0xc0006de990?}, 0xc0002b4380)
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-go@v0.18.0/tfprotov5/tf5server/server.go:821 +0x574
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x12f3b40?, 0xc0005440a0}, {0x15d9b60, 0xc0006de990}, 0xc0002b4310, 0x0)
[2023-08-21T11:27:12.129Z] github.com/hashicorp/terraform-plugin-go@v0.18.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:422 +0x170
[2023-08-21T11:27:12.129Z] google.golang.org/grpc.(*Server).processUnaryRPC(0xc0004d6000, {0x15df4b8, 0xc0000e61a0}, 0xc0006a4120, 0xc00052f9b0, 0x1c8f000, 0x0)
[2023-08-21T11:27:12.129Z] google.golang.org/grpc@v1.56.1/server.go:1337 +0xdf3
[2023-08-21T11:27:12.129Z] google.golang.org/grpc.(*Server).handleStream(0xc0004d6000, {0x15df4b8, 0xc0000e61a0}, 0xc0006a4120, 0x0)
[2023-08-21T11:27:12.129Z] google.golang.org/grpc@v1.56.1/server.go:1714 +0xa36
[2023-08-21T11:27:12.129Z] google.golang.org/grpc.(*Server).serveStreams.func1.1()
[2023-08-21T11:27:12.129Z] google.golang.org/grpc@v1.56.1/server.go:959 +0x98
[2023-08-21T11:27:12.129Z] created by google.golang.org/grpc.(*Server).serveStreams.func1
[2023-08-21T11:27:12.129Z] google.golang.org/grpc@v1.56.1/server.go:957 +0x18c
[2023-08-21T11:27:12.129Z]
[2023-08-21T11:27:12.129Z] Error: The terraform-provider-junos_v2.1.0 plugin crashed!
[2023-08-21T11:27:12.129Z]
[2023-08-21T11:27:12.129Z] This is always indicative of a bug within the plugin. It would be immensely
[2023-08-21T11:27:12.129Z] helpful if you could report the crash with the plugin's maintainers so that it
[2023-08-21T11:27:12.130Z] can be fixed. The output above should help diagnose the issue.
[2023-08-21T11:27:12.130Z]
[2023-08-21T11:27:12.130Z]
command returned exit code 1
Steps to Reproduce
terraform apply
Additional Context
Everything works as expected till version 2.1.0
References
The text was updated successfully, but these errors were encountered:
@jeremmfr thank you for your work on this. I was working more the the provider and found the state was never migrated and I still needed to do a state remove and import. for it to work. I at first attributed it to perhaps the state thinking I already upgraded to version 2 of this provider (Since I could not rollback to 1.33). When I got to look closer, I wonder if we would need to version the schema as mentioned here to trigger the migration: https://developer.hashicorp.com/terraform/plugin/framework/resources/state-upgrade#stateupgrader-with-priorschema
This is a new aspect of Terraform shema to me that I havent gotten to consider in my work with programming go Terraform. Do you think that may be what I am hitting?
@jeremmfr thank you for your work on this. I was working more the the provider and found the state was never migrated and I still needed to do a state remove and import. for it to work. I at first attributed it to perhaps the state thinking I already upgraded to version 2 of this provider (Since I could not rollback to 1.33). When I got to look closer, I wonder if we would need to version the schema as mentioned here to trigger the migration: https://developer.hashicorp.com/terraform/plugin/framework/resources/state-upgrade#stateupgrader-with-priorschema
This is a new aspect of Terraform shema to me that I havent gotten to consider in my work with programming go Terraform. Do you think that may be what I am hitting?
@computeracer I think your comment concerns issue #536 and not this one.
If you have already updated the provider, the resource state has already upgraded to new version 1 (instead of 0). In this case, you need to launch the command terraform plan or terraform apply without -refresh=false or command terraform apply -refresh-only to update the value of routing_instance to the default default.
Hi,
After upgrade terraform provider to version 2.1.0 resource junos_policyoptions_policy_statement starts to work incorrect.
Terraform and Provider Versions
Terraform Configuration Files
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Additional Context
References
The text was updated successfully, but these errors were encountered: