okta / terraform-provider-okta

A Terraform provider to manage Okta resources, enabling infrastructure-as-code provisioning and management of users, groups, applications, and other Okta objects.
https://registry.terraform.io/providers/okta/okta
Mozilla Public License 2.0
252 stars 204 forks source link

okta_app_bookmark import missing image #1963

Open jeremysells-canv opened 5 months ago

jeremysells-canv commented 5 months ago

Community Note

Terraform Version

% terraform -v
Terraform v1.7.5
on darwin_arm64

Affected Resource(s)

Terraform Configuration Files

curl https://ok12static.oktacdn.com/fs/bco/4/existing-resource-path --output example.png
terraform {
  backend "local" {
    path = "terraform.tfstate"
  }
  required_providers {
    okta = {
      source = "okta/okta"
      version = "4.8.0"
    }
  }
}

provider "okta" {}

resource "okta_app_bookmark" "example" {
  label  = "Terraform Test"
  url    = "https://example.com"
  logo   = "example.png"
}

Debug Output

terraform init
terraform plan
# Shows it is going to add the app which is correct (as it has not been imported yet)
terraform import okta_app_bookmark.example abcde
terraform plan
# Now shows it is going to set the image which is identical to whats in the Admin

Plan Output

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
  ~ update in-place

Terraform will perform the following actions:

  # okta_app_bookmark.example will be updated in-place
  ~ resource "okta_app_bookmark" "example" {
        id                         = "0oagd1u30uOJAiSPq5d7"
      + logo                       = "f8bfcf27a91280382d4f20bbfc1917b67889105c4d9ac389a324b4f9e2465df2"
        name                       = "bookmark"
        # (11 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Panic Output

n.a.

Expected Behavior

Terraform app was imported and the reference image is identical to Okta's so it should not be making any changes to the image.

Can this be done in the Admin UI?

n.a.

Can this be done in the actual API call?

n.a.

Actual Behavior

(see above)

Steps to Reproduce

(see above)

Important Factoids

n.a.

References

n.a.

Notes

duytiennguyen-okta commented 5 months ago

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-720094