Your configuration relies on an input variable. If you use an existing workspace, it must not have any existing states. Deleted the latest version which causes mismatch (as in my case it is for terraform version), it add delete marker file for that version. External to your configuration, drift occurs when resources have been terminated or have failed, and when changes have been made manually or via other automation tools. Please wait for a minute or two and try again. You can, however, use Terraform on the command line to push a state file into a workspace to become the current state. This guide exists for historical purposes, but a more up-to-date guide can be found on the HashiCorp Learn page: Manage Resource Drift. Encrypt the state file both in transit and at rest. Why do we kill some animals but not others? In my case, I now only see one null_resource again after rolling the state back to before creating a second one. - pet_name = "possibly-eminently-sadly-inspired-mongoose" -> null. Also, as Terraform is run from the cloud it automatically uses information from the current Azure subscription and you can securely save the Terraform state file in Azure Storage. In your Terraform project, add a terraform block to configure your backend: Your state is now being stored in Terraform Cloud. Terraform effects change, there really isn't a rollback. Another lifecycle flag is create_before_destroy. HashiCorp is a leading provider of Infrastructure as Code (IaC) automation for cloud computing. So what *is* the Latin word for chocolate? scenario with some basic code but it does prove out that it is possible to programmatically rollback "provider[\"registry.terraform.io/hashicorp/random\"]", "provider[\"registry.terraform.io/hashicorp/aws\"]", "arn:aws:ec2:us-east-2:561656980159:subnet/subnet-024b05c4fba9c9733", "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", "module.vpc.aws_vpc_ipv4_cidr_block_association.this", "arn:aws:ec2:us-east-2:561656980159:subnet/subnet-08924f16617e087b2", # Terraform 0.12 and later: use the "outputs.