liveBook · Manning

Domain-specific language

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

A domain-specific language is a computer language specialized for a particular application domain or purpose.

A domain-specific language (DSL) is a computer language specialized for a particular application domain or purpose. Its specialization can express complex domain tasks with less effort than a general-purpose language, but requires learning an additional language. section 25.2.2

Terraform uses HashiCorp Configuration Language (HCL), a DSL for defining and provisioning infrastructure. Terraform configuration files declare the desired end state; Terraform Core compares it with the state file and takes the required steps. section 25.2.2 section 25.3

Key distinctions include:

  • HCL is specialized for Terraform infrastructure provisioning, unlike general-purpose languages such as Python and Go. section 25.2.2
  • Puppet uses a declarative DSL to define infrastructure state, while Chef uses a procedural approach. section 25.3

Infrastructure provisioning

Terraform can use HCL configuration to provision and manage resources through providers, including Cisco Catalyst Center, ACI, and IOS XE integrations. section 25.2.2

Figure 25.6 Provisioning resources with Terraform. Configuration files are processed byTerraform Core to interact with various providers (i.e., public cloud providers) and manage infrastructure resources while maintaining state information in the state file.
A diagram of a software process Description automatically generated

Trace how Terraform configuration files pass through Terraform Core to providers while infrastructure state is maintained. section 25.2.2

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Explains specialization, benefits, limitation, and declarative infrastructure use without detailing HCL syntax.
Examples
Uses HCL configuration, Terraform providers, and Puppet DSL as examples of specialized infrastructure languages.
What you can do after
Apply specialized languages through Terraform to define desired infrastructure states with less effort.
How it connects
Connects HCL with Terraform, declarative configuration, infrastructure as code, providers, and general-purpose languages.

Also explained in

Compare how 10 books explain domain-specific language →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.