For air gapped systems, we can bundle provider along with the Terraform binaries. These Bundle can be installed without internet on air gapped system.
NOTE: For downloading the bundle we need internet access, this can be done on a system which as internet access and later transfer to the air gapped system
Terraform CLI finds and installs providers when initializing a working directory. It can automatically download providers from a Terraform registry, or load them from a local mirror or cache. If you are using a persistent working directory, you must reinitialize whenever you change a configuration's providers.
Downloading a plugin directly from its origin registry is not always appropriate, though. For example, the system where you are running Terraform may not be able to access an origin registry due to firewall restrictions within your organization or your locality.
To allow using Terraform providers in these situations, there are some alternative options for making provider plugins available to Terraform which we'll describe in the following sections.
https://developer.hashicorp.com/terraform/language/providers/requirements#in-house-providers
https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation
Terraform providers are not always installed from the Internet. While Terraform does fetch providers from the HashiCorp Terraform Registry by default, it also allows for the usage of providers from other sources or even local sources.
Here's an example:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "2.70.0"
}
custom-provider = {
source = "/path/to/local/custom-provider"
}
}
}
provider "aws" {
region = "us-west-2"
}
provider "custom-provider" {
# Configuration for the custom provider
}
In this example, the AWS provider is fetched from the HashiCorp Terraform Registry, while the "custom-provider" is loaded from a local path. The local provider must be properly compiled and placed in the specified path.
A. Terraform Cloud and Terraform Enterprise install providers as part of every run. Terraform CLI finds and installs providers when initializing a working directory.
Answer is B.
Terraform CLI finds and installs providers when initializing a working directory. It can automatically download providers from a Terraform registry, or load them from a local mirror or cache. If you are using a persistent working directory, you must reinitialize whenever you change a configuration's providers.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
amrith501
Highly Voted 2 years, 5 months agobigboi23
Highly Voted 2 years, 6 months agoTyler2023
Most Recent 1 year, 1 month agodebabrata6983
1 year, 2 months agoBere
1 year, 3 months agoLunarPhobia
1 year, 4 months agoNi33
1 year, 6 months agovibzr2023
8 months agoPower123
1 year, 7 months agovikramvlr
1 year, 11 months agoAhmad_Terraform
2 years, 4 months agoEltooth
2 years, 4 months ago