Copying a Stack
Duplicate a stack in Resource Manager.
You can copy a stack using the CLI only.
Use the oci resource-manager stack copy
command and required parameters to copy a stack.
oci resource-manager stack copy --stack-id <stack_OCID>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.
Example Requests
Create a copy of a stack in the current compartment and region
oci resource-manager stack copy --stack-id <stack_OCID>
Copy a stack to a different compartment
oci resource-manager stack copy --stack-id <stack_OCID> --destination-compartment-id <compartment_OCID>
Copy a stack that uses CI/CD to a different region
In this example, the stack uses a configuration source provider specifying GitHub, which helps achieve continuous integration and continuous delivery (CI/CD). The GitHub access token is required when copying a stack to another region.
oci resource-manager stack copy --stack-id <stack_OCID> --destination-region <region> --access-token <token>