Closed grg1bbs closed 1 year ago
Hey @grg1bbs could you please send me provider's Debug please?
Hi @fmunozmiranda. Here is the TF apply with the debugs enabled.
[grgibbs@fedora1 authz-default]$ tf apply --auto-approve
2023-01-18T08:39:17.018+1100 [INFO] Terraform version: 1.3.2
2023-01-18T08:39:17.018+1100 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2023-01-18T08:39:17.018+1100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2023-01-18T08:39:17.018+1100 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-01-18T08:39:17.018+1100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2023-01-18T08:39:17.018+1100 [DEBUG] using github.com/zclconf/go-cty v1.11.0
2023-01-18T08:39:17.018+1100 [INFO] Go runtime version: go1.19.1
2023-01-18T08:39:17.018+1100 [INFO] CLI args: []string{"terraform", "apply", "--auto-approve"}
2023-01-18T08:39:17.018+1100 [DEBUG] Attempting to open CLI config file: /home/grgibbs/.terraformrc
2023-01-18T08:39:17.018+1100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /home/grgibbs/.terraform.d/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /home/grgibbs/.local/share/terraform/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /home/grgibbs/.local/share/flatpak/exports/share/terraform/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /var/lib/flatpak/exports/share/terraform/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2023-01-18T08:39:17.019+1100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2023-01-18T08:39:17.019+1100 [INFO] CLI command args: []string{"apply", "--auto-approve"}
2023-01-18T08:39:17.021+1100 [DEBUG] New state was assigned lineage "2a414fe0-1931-7119-125c-2dabf6b0be21"
2023-01-18T08:39:17.153+1100 [DEBUG] checking for provisioner in "."
2023-01-18T08:39:17.159+1100 [DEBUG] checking for provisioner in "/usr/bin"
2023-01-18T08:39:17.160+1100 [INFO] backend/local: starting Apply operation
2023-01-18T08:39:17.161+1100 [DEBUG] created provider logger: level=debug
2023-01-18T08:39:17.162+1100 [INFO] provider: configuring client automatic mTLS
2023-01-18T08:39:17.190+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta args=[.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta]
2023-01-18T08:39:17.190+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2868
2023-01-18T08:39:17.190+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta
2023-01-18T08:39:17.197+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: configuring server automatic mTLS: timestamp=2023-01-18T08:39:17.196+1100
2023-01-18T08:39:17.218+1100 [DEBUG] provider.terraform-provider-ciscoise_v0.6.11-beta: plugin address: network=unix address=/tmp/plugin4163329098 timestamp=2023-01-18T08:39:17.218+1100
2023-01-18T08:39:17.219+1100 [DEBUG] provider: using plugin: version=5
2023-01-18T08:39:17.328+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-01-18T08:39:17.330+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2868
2023-01-18T08:39:17.331+1100 [DEBUG] provider: plugin exited
2023-01-18T08:39:17.331+1100 [DEBUG] Building and walking validate graph
2023-01-18T08:39:17.331+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.332+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"]
2023-01-18T08:39:17.332+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-1
2023-01-18T08:39:17.332+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-2
2023-01-18T08:39:17.332+1100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ciscoise/ciscoise\"].ise31-3" references: []
2023-01-18T08:39:17.332+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" references: []
2023-01-18T08:39:17.333+1100 [DEBUG] Starting graph walk: walkValidate
2023-01-18T08:39:17.333+1100 [DEBUG] created provider logger: level=debug
2023-01-18T08:39:17.333+1100 [INFO] provider: configuring client automatic mTLS
2023-01-18T08:39:17.344+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta args=[.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta]
2023-01-18T08:39:17.344+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2876
2023-01-18T08:39:17.345+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta
2023-01-18T08:39:17.351+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: configuring server automatic mTLS: timestamp=2023-01-18T08:39:17.351+1100
2023-01-18T08:39:17.372+1100 [DEBUG] provider.terraform-provider-ciscoise_v0.6.11-beta: plugin address: address=/tmp/plugin2548593861 network=unix timestamp=2023-01-18T08:39:17.372+1100
2023-01-18T08:39:17.372+1100 [DEBUG] provider: using plugin: version=5
2023-01-18T08:39:17.563+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-01-18T08:39:17.564+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2876
2023-01-18T08:39:17.564+1100 [DEBUG] provider: plugin exited
2023-01-18T08:39:17.565+1100 [INFO] backend/local: apply calling Plan
2023-01-18T08:39:17.565+1100 [DEBUG] Building and walking plan graph for NormalMode
2023-01-18T08:39:17.565+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.565+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"]
2023-01-18T08:39:17.565+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-1
2023-01-18T08:39:17.565+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-2
2023-01-18T08:39:17.565+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" references: []
2023-01-18T08:39:17.565+1100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ciscoise/ciscoise\"].ise31-3" references: []
2023-01-18T08:39:17.565+1100 [DEBUG] Starting graph walk: walkPlan
2023-01-18T08:39:17.565+1100 [DEBUG] created provider logger: level=debug
2023-01-18T08:39:17.565+1100 [INFO] provider: configuring client automatic mTLS
2023-01-18T08:39:17.576+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta args=[.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta]
2023-01-18T08:39:17.576+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2883
2023-01-18T08:39:17.576+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta
2023-01-18T08:39:17.581+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: configuring server automatic mTLS: timestamp=2023-01-18T08:39:17.581+1100
2023-01-18T08:39:17.601+1100 [DEBUG] provider.terraform-provider-ciscoise_v0.6.11-beta: plugin address: address=/tmp/plugin3890856388 network=unix timestamp=2023-01-18T08:39:17.601+1100
2023-01-18T08:39:17.601+1100 [DEBUG] provider: using plugin: version=5
2023-01-18T08:39:17.774+1100 [DEBUG] Resource instance state not found for node "ciscoise_network_access_authorization_rules.mm_authz_default", instance ciscoise_network_access_authorization_rules.mm_authz_default
2023-01-18T08:39:17.774+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" references: []
2023-01-18T08:39:17.774+1100 [DEBUG] refresh: ciscoise_network_access_authorization_rules.mm_authz_default: no state, so not refreshing
2023-01-18T08:39:17.779+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-01-18T08:39:17.782+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2883
2023-01-18T08:39:17.782+1100 [DEBUG] provider: plugin exited
2023-01-18T08:39:17.782+1100 [DEBUG] building apply graph to check for errors
2023-01-18T08:39:17.782+1100 [DEBUG] Resource state not found for node "ciscoise_network_access_authorization_rules.mm_authz_default", instance ciscoise_network_access_authorization_rules.mm_authz_default
2023-01-18T08:39:17.782+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.782+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.782+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"]
2023-01-18T08:39:17.782+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-1
2023-01-18T08:39:17.782+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-2
2023-01-18T08:39:17.782+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" references: []
2023-01-18T08:39:17.783+1100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ciscoise/ciscoise\"].ise31-3" references: []
2023-01-18T08:39:17.783+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" references: []
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
+ create
Terraform will perform the following actions:
# ciscoise_network_access_authorization_rules.mm_authz_default will be created
+ resource "ciscoise_network_access_authorization_rules" "mm_authz_default" {
+ id = (known after apply)
+ item = (known after apply)
+ last_updated = (known after apply)
+ parameters {
+ link = (known after apply)
+ policy_id = "f68a571d-3614-47b9-8b50-02b9d57671ce"
+ profile = [
+ "MM-AuthZ-Default",
]
+ security_group = (known after apply)
+ rule {
+ default = "true"
+ hit_counts = (known after apply)
+ id = "df848e26-94f9-445d-a887-3e003889540c"
+ name = "Default"
+ rank = 11
+ state = "enabled"
}
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
2023-01-18T08:39:17.785+1100 [INFO] backend/local: apply calling Apply
2023-01-18T08:39:17.785+1100 [DEBUG] Building and walking apply graph for NormalMode plan
2023-01-18T08:39:17.785+1100 [DEBUG] Resource state not found for node "ciscoise_network_access_authorization_rules.mm_authz_default", instance ciscoise_network_access_authorization_rules.mm_authz_default
2023-01-18T08:39:17.785+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.785+1100 [DEBUG] ProviderTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/ciscoise/ciscoise"].ise31-3
2023-01-18T08:39:17.786+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-1
2023-01-18T08:39:17.786+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"].ise31-2
2023-01-18T08:39:17.786+1100 [DEBUG] pruning unused provider["registry.terraform.io/ciscoise/ciscoise"]
2023-01-18T08:39:17.786+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default (expand)" references: []
2023-01-18T08:39:17.786+1100 [DEBUG] ReferenceTransformer: "ciscoise_network_access_authorization_rules.mm_authz_default" references: []
2023-01-18T08:39:17.786+1100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ciscoise/ciscoise\"].ise31-3" references: []
2023-01-18T08:39:17.786+1100 [DEBUG] Starting graph walk: walkApply
2023-01-18T08:39:17.787+1100 [DEBUG] created provider logger: level=debug
2023-01-18T08:39:17.787+1100 [INFO] provider: configuring client automatic mTLS
2023-01-18T08:39:17.799+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta args=[.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta]
2023-01-18T08:39:17.799+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2890
2023-01-18T08:39:17.799+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta
2023-01-18T08:39:17.804+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: configuring server automatic mTLS: timestamp=2023-01-18T08:39:17.804+1100
2023-01-18T08:39:17.825+1100 [DEBUG] provider.terraform-provider-ciscoise_v0.6.11-beta: plugin address: address=/tmp/plugin51845418 network=unix timestamp=2023-01-18T08:39:17.825+1100
2023-01-18T08:39:17.826+1100 [DEBUG] provider: using plugin: version=5
ciscoise_network_access_authorization_rules.mm_authz_default: Creating...
2023-01-18T08:39:17.993+1100 [INFO] Starting apply for ciscoise_network_access_authorization_rules.mm_authz_default
2023-01-18T08:39:17.994+1100 [DEBUG] ciscoise_network_access_authorization_rules.mm_authz_default: applying the planned Create change
2023-01-18T08:39:17.995+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: 2023/01/18 08:39:17 [DEBUG] setting computed for "item" from ComputedKeys: timestamp=2023-01-18T08:39:17.995+1100
2023-01-18T08:39:17.995+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: 2023/01/18 08:39:17 [DEBUG] setting computed for "parameters.0.link" from ComputedKeys: timestamp=2023-01-18T08:39:17.995+1100
2023-01-18T08:39:17.996+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: 2023/01/18 08:39:17 [DEBUG] setting computed for "parameters.0.link" from ComputedKeys: timestamp=2023-01-18T08:39:17.996+1100
2023-01-18T08:39:17.996+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: 2023/01/18 08:39:17 [DEBUG] Beginning NetworkAccessAuthorizationRules create: timestamp=2023-01-18T08:39:17.996+1100
2023-01-18T08:39:17.996+1100 [INFO] provider.terraform-provider-ciscoise_v0.6.11-beta: 2023/01/18 08:39:17 [DEBUG] request sent => {"profile":["MM-AuthZ-Default"],"rule":{"default":true,"id":"df848e26-94f9-445d-a887-3e003889540c","name":"Default","rank":11,"state":"enabled"}}: timestamp=2023-01-18T08:39:17.996+1100
2023-01-18T08:39:18.141+1100 [ERROR] vertex "ciscoise_network_access_authorization_rules.mm_authz_default" error: Failure when executing CreateNetworkAccessAuthorizationRule
â•·
│ Error: Failure when executing CreateNetworkAccessAuthorizationRule
│
│ with ciscoise_network_access_authorization_rules.mm_authz_default,
│ on policy.tf line 2, in resource "ciscoise_network_access_authorization_rules" "mm_authz_default":
│ 2: resource "ciscoise_network_access_authorization_rules" "mm_authz_default" {
│
│ error with operation CreateNetworkAccessAuthorizationRule
│ {
│ "code" : "400",
│ "message" : "Failed to handle API request - Network Access Authorization Rule : Default rule setting cannot be modified"
│ }
╵
2023-01-18T08:39:18.164+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-01-18T08:39:18.166+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ciscoise/ciscoise/0.6.11-beta/linux_amd64/terraform-provider-ciscoise_v0.6.11-beta pid=2890
2023-01-18T08:39:18.166+1100 [DEBUG] provider: plugin exited
Hey @grg1bbs , there's a new version (0.6.12-beta) of provider, please try it again and let us know if it works now.
Addition of the 'ciscoise_network_access_authorization_rules_update' resolves this issue. Closing issue.
Environment ISE version and patch: ISE 3.1 patch 5 Terraform version: 1.3.5 ISE provider version: 0.6.11-beta OS version: MacOS 13.1
Describe the bug When using the 'ciscoise_network_access_authorization_rules' resource to make changes to the Default AuthZ Policy, the following error is returned.
Both the GUI and OpenAPI support making changes to the Default AuthZ Policy. With the OpenAPI, this change is performed using the PUT operation as per the Swagger documentation here: https://developer.cisco.com/docs/identity-services-engine/v1/#!policy-openapi
Terraform code block example
Example Postman PUT call and body that results in 200 OK
200 OK output from Postman
Expected behavior TF resource uses the PUT method to allow update of the Default AuthZ Policy