All Products
Search
Document Center

Resource Orchestration Service:Configure CORS for a template

Last Updated:Jul 29, 2024

If you want to create or update a stack by using a Resource Orchestration Service (ROS) template file that is stored in an Object Storage Service (OSS) bucket, you must configure cross-origin resource sharing (CORS) for the OSS bucket.

Step 1: Create a CORS rule

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets.

  3. On the Buckets page, click the name of the OSS bucket where the ROS template file is stored.

  4. In the left-side navigation tree, choose Content Security > CORS.

  5. On the CORS page, click Create Rule.

  6. In the Create Rule panel, configure the parameters and click OK.

    For more information about the parameters, see Configure CORS.

Step 2: Obtain the URL of the ROS template file

  1. In the left-side navigation pane of the OSS console, click Buckets.

  2. On the Buckets page, click the name of the OSS bucket where the ROS template file is stored.

  3. In the left-side navigation tree, choose Object Management > Objects.

  4. Click the name of the ROS template file.

  5. In the URL section of the View Details panel, obtain the URL of the ROS template file.

Step 3: Use the URL of the ROS template file to create or update a stack

  1. Log on to the ROS console.

  2. In the left-side navigation pane, choose Deployment > Stacks.

    Set the Template Import Method parameter to Use URL to create or update a stack. For more information, see Create a stack and Update a stack.