Download a Terraform Configuration File

Create a Oracle WebLogic Server for OKE stack, download the terraform configuration file, and update the provider.tf file.

Complete the following steps:
  1. Create a Stack. See Get Started with Oracle WebLogic Server for OKE.
  2. Click the navigation menu Navigation Menu icon, and select Developer Services. Under the Resource Manager group, click Stacks.
  3. Select the Compartment that contains your stack.
  4. Click the name of your stack.
  5. In the Stack Information tab, click Download against Terraform Configuration File (.zip).
  6. Unzip the terraform configuration files to a folder.
  7. The terraform configuration files includes the provider.tf file that you cannot use for the CLI option.

    Update the contents of the terraform file provider.tf, with the following content:

    # Copyright  2019, 2021 Oracle Corporation and/or affiliates.  All rights reserved.
    # Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
    # Identity and access parameters
    variable "api_private_key_path" {
      description = "path to oci api private key"
    }
    variable "api_fingerprint" {
      description = "fingerprint of oci api private key"
    }
    variable "user_id" {
      type        = string
      description = "user id"
    }
    # general oci parameters
    variable "disable_auto_retries" {
      default = true
    }
    provider "oci" {
      version              = ">=4.7.0"
      tenancy_ocid         = var.tenancy_ocid
      user_ocid            = var.user_id
      fingerprint          = var.api_fingerprint
      private_key_path     = var.api_private_key_path
      region               = var.region
      disable_auto_retries = var.disable_auto_retries
    }
    provider "oci" {
      version              = ">=4.7.0"
      alias                = "home"
      region               = local.home_region
      tenancy_ocid         = var.tenancy_ocid
      user_ocid            = var.user_id
      fingerprint          = var.api_fingerprint
      private_key_path     = var.api_private_key_path
      disable_auto_retries = var.disable_auto_retries
    }