liveBook · Manning

Infrastructure resource

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

An infrastructure component is an independently identifiable element of an infrastructure system, such as a server, network, or load balancer.

An infrastructure resource is an independently identifiable element of an infrastructure system, such as a server, network, load balancer, database, queue, cache, or domain name. Resources can be combined into larger environments and managed individually through infrastructure as code. section 1.3.3 section 1.5.2

Treat infrastructure resources as operational building blocks:

  • Compose resources into systems while keeping their configurations modular and decoupled. Replacing a standard load balancer with a premium one should not disrupt the server or network. section 1.3.3
  • Provision resources through tools that target a public cloud, data center, or hosted monitoring provider. Preview dependencies and expected changes with a dry run before applying them. section 1.5.2
  • Test generated resource names, counts, IP ranges, attributes, operating systems, and safety limits before production changes; tests cannot fully predict runtime effects. section 6.2.3
  • Handle stateful resources such as databases, queues, caches, and stream-processing tools cautiously because replacement can corrupt or lose data. section 9.3.1
  • Before deleting a resource, verify usage, ownership, metrics, and dependencies; stopping an apparently unused resource temporarily can reduce accidental removal risk. section 12.2.1

Replacing a production component

A production environment contains a private network, public network, routing rules, servers, a load balancer, and a domain name. Swapping the standard load balancer for a premium one allows higher traffic capacity while the server and network continue running. Adding a database later should likewise leave existing components unaffected. section 1.3.3

Figure 1.9 You build your production environment with building blocks of infrastructure so you can add new resources, like the premium load balancer, easily.

Use the building-block figure to trace how networks, servers, and load balancers combine into a production environment and how one resource can be replaced independently. section 1.3.3

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains resource composition, provisioning, testing, stateful replacement, and deletion safeguards, but stops short of provider-specific implementation.
Examples
Uses servers, networks, routing rules, load balancers, databases, queues, caches, domains, and untagged cloud instances as examples.
What it assumes
Assumes an infrastructure-as-code context and provider terminology while defining resources through concrete operational scenarios.
What you can do after
Operate/configure resources with provisioning tools, preview dependencies, test generated configuration, and remove unused components cautiously.
How it connects
Connects infrastructure resources to infrastructure as code, composability, provisioning tools, unit testing, stateful infrastructure, and blue-green deployment.

Also explained in

Compare how 3 books explain infrastructure resource →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.