Removing Deny Policies
Perform the following steps to remove deny policies using Terraform destroy command from the policy deployment directory.
1. Go to the Policy Terraform directory example.
cd terraform/deployment-profiles/policy-templates
2. Initialize Terraform if not initialized. If a remote backend is used, ensure the backend configuration is available in backend.conf.
terraform init -backend-config=backend.conf
3. Review the planned action before destroying the resources.
terraform plan -destroy -var-file="policy.tfvars"
4. Execute the destroy operation.
terraform destroy -var-file="policy.tfvars"
This makes sure that the policy dependencies are handled correctly during deletion. Terraform shows a plan similar to Plan: 0 to add, 0 to change, 30 to destroy..
Confirm the operation by entering yes.
5. Verify removal of Policy Definitions, Set, Assignments, Exemption.
Destroy complete! Resources: 30 destroyed.