Once the apply has finished, you should see the message Apply complete! Resources: 1 added, 0 changed, 0 destroyed.. This is Terraform telling you that it successfully created the S3 bucket for you. Now, let’s work through the following steps:
Log onto the aws console (website). If you go to the S3 section, you will see the bucket that Terraform created.
Delete the bucket from the AWS console. Now go back to the terminal and run terraform apply again.
You will notice that Terraform has worked out that the S3 bucket is not there anymore, so it needs to create it again. At no point did you tell Terraform the bucket was gone, Terraform worked it out on its own.
Confirm the apply (by typing yes), so the S3 bucket exists again.
Now run terraform apply again when the bucket is there. You will see Terraform output Apply complete! Resources: 0 added, 0 changed, 0 destroyed..
Terraform realises that the state of the world is exactly how you want it to be, so Terraform is saying “nothing to do here!”