Updating a Stack's Terraform Configuration (Zip File or Folder)
Update the zip file or folder Terraform configuration used by a stack in Resource Manager. The updated configuration is used when you run jobs on the stack. A folder-based update is available using the Console only.
Before You Begin
Review prerequisites for updating the Terraform configuration used by a stack in Resource Manager.
If you're 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.
- Tip
As an alternative to these steps, edit the generated Terraform configuration file in Code Editor. For more information, see Editing a Configuration Using Code Editor.After completing all the prerequisites, follow these steps in the Console to update a stack's Terraform configuration from a zip file or folder.
The Stack details page opens.
If Run apply was selected, then Resource Manager runs the apply action on the updated stack.
Use the
oci resource-manager stack update
command and required parameters to update the Terraform configuration zip file used by a stack.oci resource-manager stack update --config-source <file-path> [...]
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 Terraform configuration zip file used by a stack.
For an example of the
configSource
part of the request, see UpdateZipUploadConfigSourceDetails.