mulesoft-anypoint / terraform-provider-anypoint

The Anypoint Platform Terraform Provider
https://registry.terraform.io/providers/mulesoft-anypoint/anypoint/latest
MIT License
12 stars 6 forks source link

Bug: anypoint_connected_app doesn't report differences if no scopes are defined #26

Closed drdamour closed 9 months ago

drdamour commented 9 months ago

small bug, because why would i have a connected app with no scopes? but a bug none the less. if thre are no scopes defined in my resource in hcl but they exist in the anypoint servers, no diff is reported.

eg if i first create it with

resource "anypoint_connected_app" "example" {
  name        = "example"
  grant_types = ["client_credentials"]
  audience    = "internal"

  scope {
    scope = "profile"
  }

}

appply, but then change to remove the scope

resource "anypoint_connected_app" "example" {
  name        = "example"
  grant_types = ["client_credentials"]
  audience    = "internal"

}

i'd expect a plan that shows a diff that would want to remove that one scope...but instead it shows there are no differences. it doesn't matter how many scopes are actually set for the connected app in anypoint

soufi commented 9 months ago

Hi @drdamour, Thank you for reporting this. I will look into this asap.

soufi commented 9 months ago

Hi @drdamour,

I just looked into this issue.There's nothing wrong with the resource. the profile scope cannot be delete. you can see this also on the UI.