-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d.GetOk("delete_when_absent") in resource_okta_profile_mapping.go breaks the old checking. #2031
Comments
#2032 |
What is the tf script you're using? |
this is my tf file: data "okta_user_profile_mapping_source" "user" {}
resource "okta_profile_mapping" "custom-mappings" {
for_each = toset( [
var.app_one,
var.app_two,
] )
source_id = data.okta_user_profile_mapping_source.user.id
target_id = each.key
delete_when_absent = false // Warning: do not remove! some mappings are inherited from "okta" user profile and are not declared here
always_apply = true
mappings {
id = "birthdate"
expression = "user.${okta_user_schema_property.date_of_birth.index}"
push_status = "PUSH"
}
} we have some mappings set outside of terraform, after using the latest one, although setting |
+1 |
OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-746997 |
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Community Note
Terraform Version
~> 1.0.0
terraform-provider-okta Version
~> 4.9.0
Affected Resource(s)
-> resource_okta_profile_mapping
Terraform Configuration Files
Debug Output
DELETEWHENABSENT:false type: bool, ok: false
Panic Output
Expected Behavior
if "delete_when_absent" set to false, it should not delete existing mappings on the server.
Can this be done in the Admin UI?
Can this be done in the actual API call?
Actual Behavior
it plans to delete the change outside of Terraform.
Steps to Reproduce
terraform apply
Important Factoids
References
https://github.com/okta/terraform-provider-okta/pull/2004/files
Analysis
v, ok := d.GetOK() return the value and ok , but ok means if the value is ZeorValue,
However boolean's ZeorValue is false, so when the field was set to
false
,ok
is falseThe text was updated successfully, but these errors were encountered: