Giter Site home page Giter Site logo

Comments (1)

ulucinar avatar ulucinar commented on May 28, 2024 1

We have some alternatives for configuring mirroring:

  1. Define a HOME directory for the user who is running the provider process and put a ${HOME}/.terraformrc file there. Please note that we may also need to set the HOME env. variable properly if it's not available.
  2. Place.terraformrc to an arbitrary location and run the provider process with the TF_CLI_CONFIG_FILE env. variable pointing to the location of the file.

We can initially start with a .terraformrc client configuration file similar to the following:

  provider_installation {
    filesystem_mirror {
      path    = "/provider-mirror"
      include = ["*/*"]
    }
    direct {
      exclude = ["*/*"]
    }
  }

For this configuration to work, we must have configured the /provider-mirror directory as a mirror directory containing the expected versions of Terraform provider plugin binaries.

And here's an example layout for the mirror folder:

/provider-mirror
└── registry.terraform.io
    ├── hashicorp
        ├── aws
            └── 3.53.0
                └── darwin_arm64
                    └── terraform-provider-aws_v3.53.0_x5

Please note that for this example configuration, tfcli should have been configured with something similar to the following. The configured provider's source and version must match a local mirror:

  tfcli.NewClient(ctx, 
    tfcli.WithProviderSource("hashicorp/aws"),
    tfcli.WithProviderVersion("~> 3.0"),
...)

For the generated provider, we can use an exact Terraform provider version.

In the above layout, terraform-provider-aws_v3.53.0_x5 is the executable Terraform plugin binary. It should have execute permission for the user running the provider process.

The Terraform provider plugin binary's download location can be queried from registry.terraform.io.

Let's also add TF_FORK=0 env. variable (and its value) to prevent the initial TF CLI fork.

from provider-jet-aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.