An execution plan makes a system’s intended work visible before you rely on it. In a database, it describes how the engine will execute a query; for infrastructure, it previews changes before they are applied. section 6.8.3 section 9.7.1
For a Terraform infrastructure plan, read the change markers before approving a deployment:
- + means create, ~ means modify, and - means destroy. A planned deletion of a critical database is a reason to stop and investigate. section 9.7.1
Listing 9.4 Terraform Execution Plan
Terraform will perform the following actions:
# aws_instance.web_server will be created
+ resource "aws_instance" "web_server" {
+ ami = "ami-0c55b159cbfafe1f0"
+ instance_type = "t3.micro"
}
# aws_security_group.firewall will be updated in-place
~ resource "aws_security_group" "firewall" {
~ description = "Allow web traffic" -> "Allow web and API traffic"
}
# aws_db_instance.primary_db will be destroyed
- resource "aws_db_instance" "primary_db" {
- engine = "postgres"
}
Plan: 1 to add, 1 to change, 1 to destroy.See a sample Terraform plan that marks a server for creation, a firewall for modification, and a database for destruction. section 9.7.1




