Closed cvs-sigrejas closed 2 years ago
Hi, @cvs-sigrejas! Thanks for submitting this issue! Technically, you can not delete an authenticator. However, you can deactivate it first and then remove it from terraform. From a UI perspective, it might look like the authenticator is being removed, but in reality, it is just being deactivated.
Shouldn't the provider deactivate on removal of the resource. You're saying don't remove the resource and instead deactivate it?
I think I'll add deactivation call when the resource is being removed
I'd be careful with that. Ideally after destroying, it should go back to what it was before anything was applied. So if some authenticators default to ACTIVE while others default to INACTIVE, then destroy should reset it back to original.
Authenticators can only be activated / deactivated by the Okta API management endpoints for authenticators. Authenticators can not be deleted by the API.
Community Note
Terraform Version
1.0.6
Affected Resource(s)
okta_authenticator
Terraform Configuration Files
Debug Output
Panic Output
None
Expected Behavior
The authenticator should have been removed.
Actual Behavior
The authenticate was left alone but remove from the statefile. I don't see any calls to authenticator API to delete in the logs. I only see the GET call during the refresh state.
Steps to Reproduce
terraform apply
terraform apply
Important Factoids
None
References
None