A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/cloud-docs/run/install-software below:

Install software in the HCP Terrafrom run environment | Terraform

Install software in the run environment

Terraform relies on provider plugins to manage resources. In most cases, Terraform can automatically download the required plugins, but there are cases where plugins must be managed explicitly.

In rare cases, it might also be necessary to install extra software on the Terraform worker, such as a configuration management tool or cloud CLI.

The mechanics of provider installation changed in Terraform 0.13, thanks to the introduction of the Terraform Registry for providers which allows custom and community providers to be installed via terraform init. Prior to Terraform 0.13, Terraform could only automatically install providers distributed by HashiCorp.

Terraform 0.13 and later Providers From the Terraform Registry

The Terraform Registry allows anyone to publish and distribute providers which can be automatically downloaded and installed via terraform init.

Terraform Enterprise instances must be able to access registry.terraform.io to use providers from the public registry; otherwise, you can install providers using the terraform-bundle tool.

In-House Providers

If you have a custom provider that you'd rather not publish in the public Terraform Registry, you have a few options:

Note: Using a network mirror to host custom providers for installation is not currently supported in HCP Terraform, since the network mirror cannot be activated without a provider_installation block in the CLI configuration file.

Terraform 0.12 and earlier Providers Distributed by HashiCorp

HCP Terraform can automatically install providers distributed by HashiCorp. Terraform Enterprise instances can do this as well as long as they can access releases.hashicorp.com.

If that isn't feasible due to security requirements, you can manually install providers. Use the terraform-bundle tool to build a custom version of Terraform that includes the necessary providers, and configure your workspaces to use that bundled version.

Custom and Community Providers

To use community providers or your own custom providers with Terraform versions prior to 0.13, you must install them yourself.

There are two ways to accomplish this:

Avoid Installing Extra Software

Whenever possible, don't install software on the worker. There are a number of reasons for this:

Only Install Standalone Binaries

HCP Terraform does not allow you to elevate a command's permissions with sudo during Terraform runs. This means you cannot install packages using the worker OS's normal package management tools. However, you can install and execute standalone binaries in Terraform's working directory.

You have two options for getting extra software into the configuration directory:

When downloading software with local-exec, try to associate the provisioner block with the resource(s) that the software will interact with. If you use a null resource with a local-exec provisioner, you must ensure it can be properly configured with triggers. Otherwise, a null resource with the local-exec provisioner will only install software on the initial run where the null_resource is created. The null_resource will not be automatically recreated in subsequent runs and the related software won't be installed, which may cause runs to encounter errors.

Note: Terraform Enterprise instances can be configured to allow sudo commands during Terraform runs. However, even when sudo is allowed, using the worker OS's package tools during runs is still usually a bad idea. You will have a much better experience if you can move your provisioner actions into a custom provider or an immutable machine image.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4