Download a Terraform Configuration File

Create a Oracle WebLogic Server for OCI stack and download the Terraform configuration file.

Complete the following steps:
  1. Create a Stack. See Get Started with Oracle WebLogic Server for Oracle Cloud Infrastructure.
  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.
    The terraform configuration file includes the following files:
    • provider.tf
    • provider.tf.cli
    • provider.tf.cloudshell
  7. If you are using CLI, replace the contents of the provider.tf file with the contents from the provider.tf.cli file.

    If you are using Cloud Shell, replace the contents of the provider.tf file with the contents from the provider.tf.cloudshell file.

Following is a copy of the contents of the terraform configuration files:
  • provider.tf file:
    variable "user_id" {
    }
    variable "fingerprint" {
    }
    variable "private_key_path" {
    }
    variable "disable_auto_retries" {
      default = true
    }
    provider "oci" {
      version          = "=4.30.0"
      tenancy_ocid     = var.tenancy_ocid
      user_ocid        = var.user_id
      fingerprint      = var.fingerprint
      private_key_path = var.private_key_path
      region           = var.region
    }
    provider "oci" {
      version              = "=4.30.0"
      alias                = "home"
      region               = local.home_region
      tenancy_ocid         = var.tenancy_ocid
      user_ocid            = var.user_id
      fingerprint          = var.fingerprint
      private_key_path     = var.private_key_path
      disable_auto_retries = var.disable_auto_retries
    }
    
  • provider.tf.cli file:
    /*
     * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
     */
    
    /* Variables and provider plugin defined here are required for CLI */
    
    variable "user_id" {
    }
    
    variable "fingerprint" {
    }
    
    variable "private_key_path" {
    }
    
    provider "oci" {
      version          = "=4.65.0"
      tenancy_ocid     = var.tenancy_ocid
      user_ocid        = var.user_id
      fingerprint      = var.fingerprint
      private_key_path = var.private_key_path
      region           = var.region
    }
    provider "oci" {
      version              = "=4.65.0"
      alias                = "home"
      region               = local.home_region
      tenancy_ocid         = var.tenancy_ocid
      user_ocid            = var.user_id
      fingerprint          = var.fingerprint
      private_key_path     = var.private_key_path
    }
  • provider.tf.cloudshell file:
    /*
     * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
     */
    
    /* Variables and provider plugin defined here are required for cloud shell */
    
    variable "user_id" {
    }
    
    variable "fingerprint" {
    }
    
    variable "private_key_path" {
    }
    
    provider "oci" {
      version = "=4.65.0"
      tenancy_ocid = var.tenancy_ocid
      region = var.region
    }
    provider "oci" {
      version = "=4.65.0"
      alias = "home"
      region = local.home_region
      tenancy_ocid = var.tenancy_ocid
    }