A bridge design company is using Terraform to manage containers for programs that compute bridge integrity. The following is a snippet from their file:

resource "docker_image" "bridge_integrity" {
  name = "bridge_integrity:latest"

resource "docker_container" "bridge_integrity_container" {
  count = length(var.container_names)
  image = docker_image.bridge_integrity.latest
  name  = var.container_names[count.index]
  ports {
    internal = 80 
    external = 80

variable "container_names" {
  type = list(string)
  default = ["first", "second"]

What can be concluded from it?

(Select all acceptable answers.)

Running terraform plan will require inputting the container_names variable.
One "docker_container" resource will be created for each string in container_names.
Running terraform apply will create two "docker_container" resources.
Running terraform apply -var="container_names=[\"first\"]" will create one "docker_container" resource.
Running terraform apply will create two "docker_container" resources with the same name.

Terraform Configuration Variable New Public


Would you like to see our other questions?

We have 1000+ premium hand-crafted questions for 160+ job skills and 20+ coding languages. We prefer questions with small samples of actual work over academic problems or brain teasers.

Visit our question library
Private Concierge

Send us an email with an explanation of your testing needs and a list of candidates. We will create an appropriate test, invite your candidates, review their results, and send you a detailed report.

Contact Private Concierge

Would you like to see our tests? The following tests contain Terraform related questions:
On the TestDome Blog

Screening Applicants: The Good, the Bad and the Ugly

Since we’re all biased and we use incorrect proxies, why not just outsource hiring to experts or recruitment agencies? After all, they’ve been screening people for many years, so they must know how to do it right?

Not really. I was surprised to discover that many experts disagree with each other. Everybody praises their pet method and criticizes the others. Many of these methods look legitimate, but are based on...

Dashboard Start Trial Sign In Home Tour Tests Questions Pricing For Jobseekers