Pages

Saturday, January 21, 2023

Terraform State Removal

 Incase if we want to remove the operation from state file please follow these steps.

# To Check the Docker Process running and if found then grab the process ID

docker ps 


#To Login to Docker container using bash shell

docker exec -it <Docker PS ID> /bin/bash


cd DIRECTORY

# To Initiate the Terraform
terraform init

# To list the workspaces
terraform workspace list

# To Connect to the Workspace
terraform workspace select <Workspace NAME>

# To List the state files / operations
terraform state list

# To Remove the step from the State file
terraform state rm aws_lb_listener.frontend_listener_https[0]

No comments:

Post a Comment