Using Custom Providers with a Stack

Update a stack to fetch custom providers from Object Storage buckets.

  • Limit the bucket to files that are intended for use with Terraform.
  • If the stack was created before custom providers were available, then first update the stack to use Terraform Registry. This update enables the stack to use custom providers.

Before You Begin

Follow these steps to add a custom provider to a bucket.
  1. Set up the bucket for the custom provider. See Putting Data into Object Storage.
    • To store amd/x86 binaries, create a directory under the root of the bucket with the following name:

      linux_amd64

    • To store Arm binaries, create a directory under the root of the bucket with the following name:

      linux_arm64

  2. Confirm that the name of each custom provider binary file aligns with the following convention:

    terraform-provider-<TYPE>_v<MAJOR.MINOR.PATCH>

    With optional suffix (example: x5 or x4):

    terraform-provider-<TYPE>_v<MAJOR.MINOR.PATCH>_<OPTIONAL-SUFFIX>

  3. Upload the custom provider binary files to the bucket. See Putting Data into Object Storage.
    Limit the bucket to files that are intended for use with Terraform.
    1. On the Stacks list page, find the stack that you want to work with. If you need help finding the list page or the stack, see Listing Stacks.
    2. From the Actions menu (Actions Menu) for the stack, select Edit.
    3. On the Edit stack page, select Use custom providers.
    4. Select the bucket that contains the custom providers.
      Limit the bucket to files that are intended for use with Terraform.
    5. Select Next twice.
    6. Select Save changes.
  • Use the oci resource-manager stack update command and required parameters to use custom providers with stacks.

    oci resource-manager stack update --custom-terraform-provider <json_input> [...]

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the UpdateStack operation to update the custom providers used by a stack.

    For an example of the CustomTerraformProvider part of the request, see CustomTerraformProvider.