While Terraform is stateful, Ansible is stateless, so if you modify bucket
or dynamodb_table
variables and run destroy.yml
or deploy_infra.yml
playbooks, it will not alter the current S3/Dynamo resources names, but create new resources. Moreover, altering the bucket
variable will make Terraform forget about existing infrastructure and, as a consequence, redeploy it. If it is absolutely necessary for you to alter the S3 or DynamoDB names, perform this operation manually and then change the appropriate variable accordingly.