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

0.6.6-beta breaks custom_attributes in the "endpoint" resource #108

Open rfc1149 opened 10 months ago

rfc1149 commented 10 months ago

Upon upgrading my provider version to v0.6.6-beta or later, I'm receiving an error that looks like this:

   resource "ciscoise_endpoint" "test_laptop" {
parameters.0.custom_attributes.0.custom_attributes: '' expected type
'string', got unconvertible type
'isegosdk.ResponseEndpointGetEndpointByNameERSEndPointCustomAttributesCustomAttributes',
value: 'map[Owner:]'

my terraform code works just fine on v0.6.5-beta or earlier, it's a very straightforward resource definition:

resource "ciscoise_endpoint" "test_laptop" {

  parameters {
    description             = "Set with TF"
    group_id                = "<group_id>"
    mac                     = "<mac>"
    name                    = "test_laptop"
    static_group_assignment = "true"
  }
}

I believe that the root cause here is that 0.6.6-beta changed this line to be a TypeString instead of a map: https://github.com/CiscoISE/terraform-provider-ciscoise/blob/adf2efe2f8d46e104a2906b3501366a1888a1118/ciscoise/resource_endpoint.go#L209

Indeed, if we look at the data source for this same thing, we see that it's listed as a TypeMap: https://github.com/CiscoISE/terraform-provider-ciscoise/blob/48388aa91f150cce60c6d375537b1e055392be35/ciscoise/data_source_endpoint.go#L142

We can see that it was changed in the 0.6.6-beta commit based on the git blame, and it shows here: https://github.com/CiscoISE/terraform-provider-ciscoise/commit/48388aa91f150cce60c6d375537b1e055392be35#diff-6b7a14e67c9c08afade28f67ddd6a9c6efe8dac58b19e70ba61e2f326010129f

Could we get this reverted back to a map?

fmunozmiranda commented 1 month ago

Hi @rfc1149 could you please retry it with last version of ISE provider and update us if bug still there?

fmunozmiranda commented 3 weeks ago

If we don´t get answer, this issue will be closed in next 24 hours.

rfc1149 commented 3 weeks ago

Hi sorry I am on holiday and hadn't been checking this issue super closely since it has been so long since I opened it. I will give it a try next week!

fmunozmiranda commented 3 weeks ago

Thank you for your answer, we will wait your tests.

rfc1149 commented 2 weeks ago

I'm still seeing the same issue on v0.8.1-beta

fmunozmiranda commented 5 days ago

@rfc1149 could you please pass us debug of provider?