Updating a Stack Terraform Configuration

Update the Terraform configuration used by a stack in Resource Manager. The updated configuration is used when you run jobs on the stack.

Prerequisites

Review prerequisites for updating the Terraform configuration used by a stack in Resource Manager.

Important

If uploading a different Terraform configuration, ensure that the configuration file is valid. See Authoring Configurations and Terraform Configurations for Resource Manager.

Ensure that you have your revised Terraform configuration (.zip file or folder) ready for upload. No configuration file is available for download until a job is successfully run on the stack. To edit a Terraform configuration that was generated from a template or existing compartment using resource discovery, first download the configuration. Then use the edited configuration .zip file for the update.

If the stack's configuration is stored in Git or a bucket, then upload the configuration there.

Using the Console

Note

As an alternative to these steps, edit the generated Terraform configuration file in Code Editor. For more information, see Editing Configurations Using Code Editor.
  1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
  2. Choose a compartment that you have permission to work in (on the left side of the page).
  3. Click the name of the stack that you want.
    The Stack details page opens.
  4. In the Stack information tab, next to Terraform configuration, click Upload.
    The Edit stack dialog box is displayed, with the Stack information panel selected.
  5. Click Folder or .Zip file and add your revised Terraform configuration.
    You can either drag and drop it onto the dialog's control or click Browse and navigate to the location of the file or folder.
  6. Click Next.
    The Configure variables panel lists variables from the Terraform configuration. For property details, see Creating a Stack.
  7. Update variable values as needed.
  8. Click Next.
  9. In the Review panel, verify your stack configuration.
  10. To automatically provision resources when the stack is created, select Run apply.
    Note

    Run apply is selected by default for stacks created from the Deploy to Oracle Cloud button or from Marketplace.
  11. Click Save changes.

The Stack details page opens.

If Run apply was selected, then Resource Manager runs the apply action on the updated stack.

Using the API

Use the UpdateStack operation to update the Terraform configuration used by a stack.