Using Terraform CLI, how do you remove locally-stored credentials for specified hostname of Terraform Enterprise?
Experience Level: Junior
Tags: Terraform
Answer
Run the following command:
terraform logout your-hostname
The API token is only removed from local storage, not destroyed on the remote server, so it will remain valid until manually revoked.
Related Terraform job interview questions
Using Terraform CLI, how do you display list of Terraform workspaces?
Terraform JuniorUsing Terraform CLI, how do you update the state file of your infrastructure with metadata that matches the physical resources they are tracking?
Terraform JuniorUsing Terraform CLI, how do you retrieve authentication token for the given hostname to Terraform Enterprise?
Terraform JuniorUsing Terraform CLI, how do you check what files need to be reformatted to standard formatting without rewriting the files?
Terraform JuniorWhat does command 'terraform fmt -check' do?
Terraform Junior