TA-002-P · Question #219
Which flag would be used within a Terraform configuration block to identify the specific version of a provider required?
The correct answer is C. required_providers. The required_providers block (using underscores) is used inside the terraform configuration block to declare provider sources and version constraints. For example: terraform { required_providers { aws = { source = 'hashicorp/aws', version = '~> 4.0' } } }. Options A and D use…
Question
Which flag would be used within a Terraform configuration block to identify the specific version of a provider required?
Options
- Arequired-provider
- Brequired-version
- Crequired_providers
- Drequired_versions
How the community answered
(24 responses)- A4% (1)
- C96% (23)
Explanation
The required_providers block (using underscores) is used inside the terraform configuration block to declare provider sources and version constraints. For example: terraform { required_providers { aws = { source = 'hashicorp/aws', version = '~> 4.0' } } }. Options A and D use incorrect syntax (hyphens instead of underscores). Option B (required_version) specifies the required Terraform CLI version, not the provider version.
Topics
Community Discussion
No community discussion yet for this question.