A team is evaluating Pulumi as an alternative to Terraform. What is the key differentiator of Pulumi compared to Terraform and CloudFormation?
Pulumi's core differentiator is using real programming languages rather than a domain-specific language like HCL or YAML.
Capability
HCL (Terraform)
Pulumi (TypeScript/Python)
Loops
for_each, count
Native for loops
Conditionals
Ternary expressions only
Full if/else, switch
Unit testing
Limited (Terratest in Go)
Standard language test frameworks (Jest, pytest)
Type safety
Limited HCL type system
Full language type system + IDE autocomplete
Trade-offs: Pulumi's ecosystem is smaller than Terraform's; the learning curve is higher for teams without strong programming backgrounds. Key vocabulary: SDK-based IaC, programmatic infrastructure, Pulumi state backend.
3 / 15
An engineer says: "We're using AWS CDK to define our infrastructure."
What does CDK stand for and how does it relate to CloudFormation?
AWS CDK = Cloud Development Kit. The CDK acts as a higher-level abstraction over CloudFormation:
Write infrastructure in a real programming language using CDK construct libraries
cdk synth — synthesises the code into a CloudFormation template (JSON/YAML)
cdk deploy — deploys the synthesised CloudFormation template to AWS
Construct level
Description
Example
L1 (low)
1:1 mapping to CloudFormation resource
CfnBucket
L2 (high)
Opinionated abstraction with sensible defaults
s3.Bucket with encryption by default
L3 / pattern
Multi-resource architecture pattern
ApplicationLoadBalancedFargateService
4 / 15
A team migrating from Ansible to Terraform for cloud provisioning is told: "Ansible is a configuration management tool, not a provisioning tool."
What is the functional distinction between provisioning and configuration management in an IaC context?
These are complementary tool categories, not competing ones — most mature infrastructure teams use both:
Review Comment: 'This Terraform configuration seems a bit verbose. Could we leverage modules to reduce duplication and improve maintainability?'
Which of the following best describes the developer's concern regarding this Terraform code? terraform {required_providers {aws = version '2.0'}}
The developer's comment highlights a common concern in IaC – code duplication. While the provider block is essential, the core issue is the lack of modularity, which leads to increased complexity and difficulty in managing changes across multiple environments. The incorrect options focus on syntax or versioning rather than the fundamental principle of reusable components.
7 / 15
Slack Message from Alex: 'Hey team, I'm trying to figure out how to deploy a new staging environment using Pulumi. The documentation is confusing about the difference between deploying infrastructure and managing application code.'
What is the primary distinction Alex is struggling with regarding IaC tools like Pulumi? pulumi up
Alex's question directly addresses a crucial distinction in IaC – the separation of concerns. Provisioning focuses on *creating* and *managing* the underlying infrastructure (VMs, networks, etc.), while application configuration deals with deploying and configuring the software running *on* that infrastructure. Misunderstanding this difference leads to incorrect tool selection and deployment strategies.
8 / 15
PR Description: 'This PR introduces a new Terragrunt configuration for our production environment. It utilizes remote state management to ensure consistency across multiple teams and environments.'
What is the *primary* benefit of using remote state management in this Terragrunt configuration? terragrunt plan
Remote state management addresses a significant challenge in multi-environment IaC – maintaining consistent state across teams. Without it, teams might independently modify their state files, leading to inconsistencies and deployment conflicts. Remote state ensures all environments operate with the same current infrastructure definition.
9 / 15
Standup Update from Ben: 'We're still wrestling with CloudFormation templates. We find it difficult to manage dependencies between resources and ensure they're deployed in the correct order.'
What is the main challenge Ben is experiencing with CloudFormation? aws cloudformation create_stack
Ben's statement highlights a core limitation of CloudFormation – its lack of built-in dependency management. While you *can* use output values and conditional statements to achieve some degree of ordering, it's inherently difficult and prone to errors. Other options represent features or limitations of CloudFormation that are not the direct cause of Ben's issue.
10 / 15
Scenario: Your team is using Terraform to manage a complex multi-cloud environment with multiple accounts. You want to ensure consistent configurations and avoid duplication across all environments.
Which of the following best describes a key benefit of using a tool like Terragrunt in this scenario? terragrunt init
Terragrunt excels at managing complex multi-environment IaC setups by providing a layer of abstraction on top of Terraform. This allows you to define common configurations and then tailor them to specific environments, eliminating duplication and ensuring consistency across your entire infrastructure.
11 / 15
Review Comment: 'This Terraform configuration seems a bit verbose. Could we leverage modules to reduce duplication and improve maintainability?'
Which of the following best describes the developer's concern regarding this Terraform code? terraform {required_providers {aws = version '2.0'}}
The developer's comment highlights a common concern in IaC – code duplication. While the provider block is essential, the core issue is the lack of modularity, which leads to increased complexity and difficulty in managing changes across multiple environments. The incorrect options focus on syntax or versioning rather than the fundamental principle of reusable components.
12 / 15
Slack Message from Alex: 'Hey team, I'm trying to figure out how to deploy a new staging environment using Pulumi. The documentation is confusing about the difference between deploying infrastructure and managing application code.'
What is the primary distinction Alex is struggling with regarding IaC tools like Pulumi? pulumi up
Alex's question directly addresses a crucial distinction in IaC – the separation of concerns. Provisioning focuses on *creating* and *managing* the underlying infrastructure (VMs, networks, etc.), while application configuration deals with deploying and configuring the software running *on* that infrastructure. Misunderstanding this difference leads to incorrect tool selection and deployment strategies.
13 / 15
PR Description: 'This PR introduces a new Terragrunt configuration for our production environment. It utilizes remote state management to ensure consistency across multiple teams and environments.'
What is the *primary* benefit of using remote state management in this Terragrunt configuration? terragrunt plan
Remote state management addresses a significant challenge in multi-environment IaC – maintaining consistent state across teams. Without it, teams might independently modify their state files, leading to inconsistencies and deployment conflicts. Remote state ensures all environments operate with the same current infrastructure definition.
14 / 15
Standup Update from Ben: 'We're still wrestling with CloudFormation templates. We find it difficult to manage dependencies between resources and ensure they're deployed in the correct order.'
What is the main challenge Ben is experiencing with CloudFormation? aws cloudformation create_stack
Ben's statement highlights a core limitation of CloudFormation – its lack of built-in dependency management. While you *can* use output values and conditional statements to achieve some degree of ordering, it's inherently difficult and prone to errors. Other options represent features or limitations of CloudFormation that are not the direct cause of Ben's issue.
15 / 15
Scenario: Your team is using Terraform to manage a complex multi-cloud environment with multiple accounts. You want to ensure consistent configurations and avoid duplication across all environments.
Which of the following best describes a key benefit of using a tool like Terragrunt in this scenario? terragrunt init
Terragrunt excels at managing complex multi-environment IaC setups by providing a layer of abstraction on top of Terraform. This allows you to define common configurations and then tailor them to specific environments, eliminating duplication and ensuring consistency across your entire infrastructure.
What will I practise in "Cloud Provider IaC Comparison Exercises"?
Practice English for comparing IaC tools: Terraform vs CloudFormation vs Pulumi vs CDK vs Terragrunt — vocabulary for discussing provisioning tool trade-offs for senior DevOps and platform engineers.
How many exercises are in this module?
This module has 15 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more Infrastructure as Code exercises?
Browse the full Infrastructure as Code hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.