Terraform Vault -> "vault_token"

Hi Folks,

Is there a way, how to deny Terraform to recreate vault_token after token expires?

After the token expires, it wants to create a new one, and I want to deny this behavior. I want to create token only once.

I’ve tried to use “lifecycle” block to “ignore_changes”, but this is not supported.

Thank you

If the token expires the resource no longer exists. As you have code which says the resource should exist Terraform will try to create it. This is what Terraform is designed to do, so it isn’t possible to disable other than by removing the code that asks the token to exist.

Perhaps you can use the “lifecycle” control in your terraform HCL

That won’t help ignore the destruction of the resource, it only has options to ignore changes to individual attributes.