liveBook · Manning

Dry run

As explained in Grokking Software Architecture

A dry run previews the effects of an operation without applying its changes.

A dry run previews what an infrastructure change will do before it is applied. Its execution plan marks resources to create (+), modify (~), or destroy (-), giving reviewers a chance to catch dangerous changes before deployment. section 9.7.1

Spot the red flag

If a plan marks a production database for destruction, stop the deployment and investigate before applying the change. 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.

Compare the planned creation, update, and destruction in a sample Terraform execution plan. section 9.7.1

How Grokking Software Architecture covers it

How deep it goes
Explains execution-plan symbols and a destructive-change warning, without detailing how to generate the plan.
Examples
Uses a Terraform plan showing a server creation, firewall update, and database destruction.
What you can do after
Diagnose risky infrastructure changes by reading plan symbols and stopping destructive deployments.
How it connects
Connects dry runs to infrastructure as code, Terraform, and deployment pipelines.

Also explained in

Compare how 4 books explain dry run →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.