Creating a Stack from Bitbucket Server

Create a stack in Resource Manager from a Terraform configuration stored in Bitbucket Server. Select a configuration source provider that specifies the Bitbucket Server information needed to access the configurations.

Ensure that your Terraform configuration is valid. See Terraform Configurations for Resource Manager and Authoring Configurations.

For information about configuration source providers, see Managing Configuration Source Providers.

    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 Create stack.
    4. In the Create stack page, under Choose the origin of the Terraform configuration, select Source code control system.
    5. For Source code management type (under Stack configuration),select Bitbucket Server.
    6. Select the Bitbucket Server configuration source provider location for your Terraform configuration:
      Configuration source provider Select a Configuration source provider. If you need to create one, see Creating a Configuration Source Provider.
      Project Select the Bitbucket Server project.
      Repository Select a Repository. Example:
      Branch Select a Branch. The list returned is limited to 100 branches.
      The dialog box is populated with information contained in the Terraform configuration.
    7. Fill in the remaining fields.
      Use custom providers Select this option to use custom providers, and then select the bucket that contains the custom providers.
      Name Stack name. You can accept the default name provided. Avoid entering confidential information.
      Description Stack description (optional).
      Create in compartment Compartment where you want to create the stack. A compartment from the list scope is set by default.
      Terraform version Version that you want for the Terraform configuration.
      Tags Optionally apply tags to the stack.
    8. Click Next.
      The Configure variables panel lists variables from the Terraform configuration.
    9. Review the variables and change as needed.

      Don't add your private key or other confidential information to configuration variables.
    10. Click Next.
    11. In the Review panel, verify your stack configuration.
    12. To automatically provision resources on creation of the stack, select Run apply.

      Run apply is selected by default for stacks created from the Deploy to Oracle Cloud button or from Marketplace.
    13. Click Create to create your stack.

    The stack is created and its Stack details page opens.

    If you selected Run apply, then Resource Manager runs the apply action on the new stack.

  • Use the oci resource-manager stack create-from-bitbucket-server command and required parameters to create a stack from Bitbucket Server.

    oci resource-manager stack create-from-bitbucket-server [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the CreateStack operation to create a stack from Bitbucket Server.

    For an example of the configSource part of the request, see CreateBitbucketServerConfigSourceDetails.