Skip to content

004 · Domain 1: Infrastructure as Code (IaC) with Terraform · 12% of the exam

Task 1.3: Explain how Terraform manages multi-cloud, hybrid cloud, and service-agnostic workflows

One workflow for any platform with an API: providers for clouds, on-premises systems and SaaS tools, one configuration that spans them, cross-provider references in one dependency graph, and the same plan and apply steps everywhere.

Study it

  • One workflow for many platforms: multi-cloud, hybrid and SaaS providers

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.

Question 1 · choose 1

A company runs workloads on two public clouds and wants its engineers to learn one way of provisioning instead of each cloud's own template service. What does Terraform give them?

  1. AOne write, plan and apply workflow, with a provider for each platform
  2. BA single cross-cloud resource type that deploys the same server definition to either cloud
  3. CA converter that turns each cloud's native templates into the other cloud's format
  4. DA service that keeps both clouds' resources identical by copying changes between them
Show the answer and why
  • AOne write, plan and apply workflow, with a provider for each platform

    Correct

    Terraform lets you use the same workflow to manage multiple providers, which simplifies multi-cloud management.

  • BA single cross-cloud resource type that deploys the same server definition to either cloud

    Incorrect

    Terraform does not provide one abstract server type; each provider has its own resource types with their own arguments.

  • CA converter that turns each cloud's native templates into the other cloud's format

    Incorrect

    Terraform does not translate between cloud template formats; it manages resources through providers.

  • DA service that keeps both clouds' resources identical by copying changes between them

    Incorrect

    Terraform changes what its configuration describes. It does not mirror one cloud's infrastructure into another.

The multi-cloud value of Terraform is a consistent workflow and language; the resources themselves stay provider-specific.

Question 2 · choose 2

An architect is drafting a multi-cloud standard and lists claims about Terraform. Which two claims are accurate? (Choose TWO.)

  1. AOne configuration can declare resources from several cloud providers and apply them in one run
  2. BMoving a workload to another cloud still means writing that cloud's own resource types and arguments
  3. CA resource written for one cloud's provider can be deployed to another cloud by changing only the provider block
  4. DTerraform requires all providers in one configuration to come from the same publisher
  5. EUsing more than one cloud forces each cloud's resources into a separate Terraform state file
Show the answer and why
  • AOne configuration can declare resources from several cloud providers and apply them in one run

    Correct

    A configuration may require and use many providers; Terraform plans and applies them together.

  • BMoving a workload to another cloud still means writing that cloud's own resource types and arguments

    Correct

    Resource types belong to a provider (an AWS instance and an Azure virtual machine are different types), so the configuration is rewritten for the new provider.

  • CA resource written for one cloud's provider can be deployed to another cloud by changing only the provider block

    Incorrect

    The provider block configures one provider; it cannot make that provider's resource types work on another platform.

  • DTerraform requires all providers in one configuration to come from the same publisher

    Incorrect

    A configuration can mix official, partner and community providers from different namespaces.

  • EUsing more than one cloud forces each cloud's resources into a separate Terraform state file

    Incorrect

    Nothing requires one state per provider; a single state can hold resources from several providers.

Terraform unifies the workflow, not the resources: one run can span clouds, but each resource is written for its own provider.

Question 3 · choose 1

An engineer wants to know whether Terraform can manage the team's CDN service, its incident paging tool and its cloud provider. Where should the engineer look first?

  1. AThe Terraform Registry, which lists public providers
  2. BThe output of terraform providers in an empty directory
  3. CThe .terraform directory of any existing project
  4. DThe terraform version output, which lists every supported provider
Show the answer and why
  • AThe Terraform Registry, which lists public providers

    Correct

    All publicly available providers are on the Terraform Registry, from cloud platforms to SaaS tools.

  • BThe output of terraform providers in an empty directory

    Incorrect

    terraform providers lists the providers a configuration requires; an empty directory requires none.

  • CThe .terraform directory of any existing project

    Incorrect

    That holds only the providers a particular project installed.

  • DThe terraform version output, which lists every supported provider

    Incorrect

    version shows the installed Terraform and the providers in the current working directory, not every provider that exists.

Service coverage is a question of providers, and the Registry is where they are published.

Question 4 · choose 1

One configuration manages resources in a public cloud and in a DNS service. How does Terraform authenticate to the two platforms?

  1. ATerraform signs in once with a single account and passes the token to every provider
  2. BThe DNS provider reuses the cloud provider's credentials because both are in one configuration
  3. CEach provider is configured and authenticated separately
  4. DAuthentication happens during terraform init and is stored in the dependency lock file
Show the answer and why
  • ATerraform signs in once with a single account and passes the token to every provider

    Incorrect

    There is no shared Terraform account for providers; each platform has its own credentials.

  • BThe DNS provider reuses the cloud provider's credentials because both are in one configuration

    Incorrect

    Providers do not share credentials; each reads its own settings.

  • CEach provider is configured and authenticated separately

    Correct

    Each provider has its own configuration, including how it authenticates; one provider's credentials do not apply to another.

  • DAuthentication happens during terraform init and is stored in the dependency lock file

    Incorrect

    The lock file records provider versions and checksums, never credentials.

A multi-provider configuration has one configuration, and one set of credentials, per provider.

Question 5 · choose 1

A company runs Terraform for three clouds and a SaaS monitoring tool from many laptops and scripts. It wants one place to see runs, keep state and control who may apply, whatever the target platform. What fits?

  1. AOne provider block that lists all four platforms
  2. BThe local backend on a shared network drive
  3. CA separate Terraform installation and state store for each cloud, one per team
  4. DHCP Terraform, with shared state, run history and access controls
Show the answer and why
  • AOne provider block that lists all four platforms

    Incorrect

    Each provider has its own block; no provider block covers several platforms.

  • BThe local backend on a shared network drive

    Incorrect

    A file share stores state but gives no run history or access control per action.

  • CA separate Terraform installation and state store for each cloud, one per team

    Incorrect

    That multiplies the places to look instead of centralizing them.

  • DHCP Terraform, with shared state, run history and access controls

    Correct

    HCP Terraform manages Terraform workflows across teams with shared state, role-based access controls and a consistent run environment, independent of the provider.

The workflow is provider-agnostic, and so is HCP Terraform: one place for runs, state and permissions across every platform.

Question 6 · choose 1

A network team still configures firewall ports by hand from developers' tickets whenever a service is added. Its software-defined network has a Terraform provider, and the services register in Consul. Which approach do the Terraform use cases describe?

  1. AA provisioner on every service host that edits the firewall over SSH
  2. BConsul-Terraform-Sync generating and applying network changes as services register
  3. CA data source that changes the firewall when Terraform reads it
  4. DA scheduled terraform destroy of the network each night so it is rebuilt with the new ports
Show the answer and why
  • AA provisioner on every service host that edits the firewall over SSH

    Incorrect

    Provisioners are a last resort and would bypass the SDN's provider.

  • BConsul-Terraform-Sync generating and applying network changes as services register

    Correct

    Consul-Terraform-Sync can generate Terraform configuration to adjust ports and settings on any SDN with a provider when a service registers.

  • CA data source that changes the firewall when Terraform reads it

    Incorrect

    Data sources only read; they never change infrastructure.

  • DA scheduled terraform destroy of the network each night so it is rebuilt with the new ports

    Incorrect

    Destroying the network nightly would cause outages and is not how service changes are handled.

Because SDNs have providers, network changes can follow service changes automatically instead of waiting for tickets.

Practise domain 1 →Practise all domains →