CiscoISE / terraform-provider-ciscoise

Terraform Provider for Cisco ISE
https://registry.terraform.io/providers/CiscoISE/ciscoise/latest/docs
MIT License
9 stars 4 forks source link

Resource ciscoise_network_access_authorization_rules fails #55

Closed wiwa1978 closed 1 year ago

wiwa1978 commented 1 year ago

Prerequisites

Describe the bug When using ciscoise_network_access_authorization_rules resource, Terraform outputs that id and name are not expected.

resource "ciscoise_network_access_authorization_rules" "example" {
  provider = ciscoise
  parameters {
    profile   = ["authp_uc6"]
    rule {
      condition {
        condition_type = "ConditionReference"
        name           = "lc_uc6w"
        id             = "716b2dfd-a1e0-4d94-9802-eb4d3bc614d3"
        is_negate      = "false"
      }
      default    = "false"
      hit_counts = 1
      id         = "string"
      name       = "MyRule1"
      rank       = 1
      state      = "enabled"
    }
    security_group = "BYOD"
  }
}

Results in:

╷
│ Error: Missing required argument
│ 
│   on network_access_authorization_rules.tf line 3, in resource "ciscoise_network_access_authorization_rules" "example":
│    3:   parameters {
│ 
│ The argument "name" is required, but no definition was found.
╵
╷
│ Error: Missing required argument
│ 
│   on network_access_authorization_rules.tf line 3, in resource "ciscoise_network_access_authorization_rules" "example":
│    3:   parameters {
│ 
│ The argument "id" is required, but no definition was found.
╵
╷
│ Error: Unsupported argument
│ 
│   on network_access_authorization_rules.tf line 8, in resource "ciscoise_network_access_authorization_rules" "example":
│    8:     profile   = ["authp_uc6"]
│ 
│ An argument named "profile" is not expected here.
╵
╷
│ Error: Unsupported block type
│ 
│   on network_access_authorization_rules.tf line 9, in resource "ciscoise_network_access_authorization_rules" "example":
│    9:     rule {
│ 
│ Blocks of type "rule" are not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on network_access_authorization_rules.tf line 23, in resource "ciscoise_network_access_authorization_rules" "example":
│   23:     security_group = "BYOD"
│ 
│ An argument named "security_group" is not expected here.

Expected behavior As per documentation, the id and name are expected attributes, even though they are optional. They should be accepted if passed along. Also profile, rule and security group should be allowed.

Screenshots

Request (working through API)

image

Response (working through API):

image

Environment (please complete the following information):

fmunozmiranda commented 1 year ago

Hey @wiwa1978 there's a new version of provider (0.6.8-beta), test it again let us know if it works for you.

wiwa1978 commented 1 year ago

Fixed!