terraform-provider-okta
terraform-provider-okta copied to clipboard
Import hcl triggers forceNew - okta_group_memberships
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v1.7.4
on darwin_arm64
+ provider registry.terraform.io/okta/okta v4.8.0
Affected Resource(s)
-
okta_group_memberships
Terraform Configuration Files
locals {id = "00gg1234567890123"}
resource "okta_group_memberships" "_" {
group_id = local.id
users = []
}
import {
to = okta_group_memberships._
id = local.id
}
Expected Behavior
I can use a Import
block to import a okta_group_memberships
resulting in a No-Op (no change) output from Terraform Plan
Actual Behavior
- Terraform import can throw an error if
track_all_users
is set and you only provide the<group_id>
- importing a
okta_group_memberships
resource can trigger aforceNew
on thegroup_id
attribute
Steps to Reproduce
- Copy my example HCL
- replace the group ID in the local variable with a valid okta group ID
-
terraform plan
- Note that the plan output
Important Factoids
n/a
References
- #1897
OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-705816