philips-software / terraform-provider-hsdp

Terraform provider to orchestrate various HSDP resources like IAM, CDL, CDR, MDM, Container Host, Edge, etc
https://registry.terraform.io/providers/philips-software/hsdp/latest
MIT License
35 stars 14 forks source link

Request to modify the provider to ignore non terraform additions when drift detection is disabled. #410

Closed ragnaray closed 5 months ago

ragnaray commented 7 months ago

Create a group in IAM using terraform. Create users using HSDP apis outside of terraform and add the users to this group. Modify the terraform script to create any unrelated resource and run terraform apply. Observe that the script tries to update all users in place too. This inspite of setting drift_detection = false.

image

loafoe commented 6 months ago

@ragnaray drift_detection should be enabled during initial apply of the Group resource. If you retroactively enable it then the state might still contain entries which will be reconciled on the next plan/apply cycle. Once an apply has run with drift_detection = false, subsequent plans will ignore any entries outside of your Terraform declarations.