nerdexam
HashiCorp

TA-002-P · Question #432

Which of the following locations can Terraform use as a private source for modules? (Choose two.)

The correct answer is A. Internally hosted SCM (Source Control Manager) platform C. Private repository on GitHub. Terraform can source private modules from internal SCM platforms or private repositories on platforms like GitHub by using specific URL formats and appropriate authentication.

Interact with Terraform modules

Question

Which of the following locations can Terraform use as a private source for modules? (Choose two.)

Options

  • AInternally hosted SCM (Source Control Manager) platform
  • BPublic Terraform Module Registry
  • CPrivate repository on GitHub
  • DPublic repository on GitHub

How the community answered

(20 responses)
  • A
    85% (17)
  • B
    5% (1)
  • D
    10% (2)

Why each option

Terraform can source private modules from internal SCM platforms or private repositories on platforms like GitHub by using specific URL formats and appropriate authentication.

AInternally hosted SCM (Source Control Manager) platformCorrect

Terraform can fetch modules from internally hosted SCM systems (like GitLab or Bitbucket Server) by providing the appropriate repository URL, making it a private source.

BPublic Terraform Module Registry

The Public Terraform Module Registry is, by definition, public and not a source for private modules, although it can host public modules.

CPrivate repository on GitHubCorrect

A private repository on GitHub (or other Git-based services) can serve as a private module source if Terraform is configured with credentials to access it.

DPublic repository on GitHub

A public repository on GitHub can host modules, but they are publicly accessible, thus not considered a 'private source' in the context of securing the module code.

Concept tested: Terraform private module sources

Source: https://developer.hashicorp.com/terraform/language/modules/sources#git

Topics

#Terraform modules#Module sources#Private repositories#SCM integration

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice