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
253 stars 206 forks source link

Difference in inline hook secret value and script - resource "okta_inline_hook". #2098

Open venkatakanupuru opened 2 weeks ago

venkatakanupuru commented 2 weeks ago

Hi Team,

To configure a inline hook manually steps are: Okta Dashboard > workflow > Inline Hooks > Add inline hook > token

Configure the same using Terraform resource using: resource "okta_inline_hook"

For importing : terraform import okta_inline_hook.example

When inline hook was configured manually configured and is imported to Terraform script it does not show the encrypted value which is fine however after the import and assigning the same value in script which is the actual value used and when you run the terraform plan it would show that the value is being updated. Is there a way where the script will validate the value is correct and update the state file without updating anything else.

module.authorization-servers.okta_inline_hook.inline-token-hook will be updated in-place

~ resource "okta_inline_hook" "inline-token-hook" { ~ auth = { ~ "value" = "" -> "Basic xxxxxxxyyyyyyyyyzzzzzz"

(2 unchanged elements hidden)

         id      = "1213131313121312343252"
         name    = "inline hook name"
         # (4 unchanged attributes hidden)
    # (2 unchanged blocks hidden)
    }

Thank you, Venkata

arvindkrishnakumar-okta commented 1 week ago

Created https://oktainc.atlassian.net/browse/OKTA-817126 for internal reference.