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

ciscoise_sgt does not permit valid "-1" value for auto-generated SGT #109

Closed grg1bbs closed 1 month ago

grg1bbs commented 9 months ago

Prerequisites

Environment:

Describe the bug When using the 'ciscoise_sgt' resource to create a new SGT using an auto-generated number, the following error is returned:

│ Error: "parameters.0.value" cannot be lower than 2: -1 │ │ with ciscoise_sgt.sgt_shared_services, │ on sgt.tf line 7, in resource "ciscoise_sgt" "sgt_shared_services": │ 7: value = -1

Expected behavior The "-1" value is a valid input for creating an auto-generated SGT number as per the API documentation, so the resource should allow this value. https://developer.cisco.com/docs/identity-services-engine/latest/#!sgt

"value | Integer | Yes | Value range: 2 ot 65519 or -1 to auto-generate"

Terraform code example

resource "ciscoise_sgt" "sgt_shared_services" {
  provider = ciscoise.ise31-3
  parameters {
    name  = "Shared_Services"
    value = -1
  }
}

Successful API call that returns a 201 response

{
    "Sgt": {
        "name": "Shared_Services",
        "value": -1
    }
}
grg1bbs commented 9 months ago

@jbogarin can you please have a look into this issue? It seems like it should be a relatively quick and easy fix. Thanks

fmunozmiranda commented 1 month ago

Tested in 0.8.1-beta and it´s working. Closing issue, please reopen if you get some new trouble.