oracle / oracle/oci-cli

Cannot update resource manager stack working-director

Open
#765 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
669
Forks
236
Avg merge
1m
Merged PRs (30d)
4

Description

Hello I have a Stack in Resource Manager, and I can't set working directory for terraform in the UI (there is no option) neither by cli. I have created this using integration with Bitbucket Cloud

oci resource-manager stack list --all --compartment-id ocid1.compartment.oc1..axxxxxx                                                                                                      
{
  "data": [
    {
      "compartment-id": "ocid1.compartment.oc1..axxxxxx   ",
      "defined-tags": {
        "Oracle-Tags": {
          "CreatedBy": "oracleidentitycloudservice/user@tech",
          "CreatedOn": "2024-04-16T18:12:46.800Z"
        }
      },
      "description": "Common Virtual Cloud Network resources for OKE cluster installations.",
      "display-name": "Stack-oke-stg",
      "freeform-tags": {
        "env": "stg"
      },
      "id": "ocid1.ormstack.oc1.sa-saopaulo-1.amaaaaxxxxx",
      "lifecycle-state": "ACTIVE",
      "terraform-version": "1.2.x",
      "time-created": "2024-04-16T18:12:46.883000+00:00"
    }
  ]
}

oci resource-manager stack update --stack-id "ocid1.ormstack.oc1.sa-saopaulo-1.amaaaaaaw2h46uaa46faostvp5p7crknhgzck2ufuqfapsn5kpf7kgx4kwba" --working-directory "terraform"

WARNING: Updates to config-source and custom-terraform-provider and variables and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue? [y/N]: y
ServiceError:
{
    "client_version": "Oracle-PythonSDK/2.121.1, Oracle-PythonCLI/3.37.9",
    "code": "InvalidParameter",
    "logging_tips": "Please run the OCI CLI command using --debug flag to find more debug information.",
    "message": "Parameter 'configSource' is not valid. The origin (type) of configuration source cannot be changed. Select the original configuration source type and try again.",
    "opc-request-id": "0418EED54F754B0D9A8DF62A7C97DA9D/3F11D6ABD9249EF1850BCB58E1FC2799/75FF318AEE01F68B8E0960736D0958A4",
    "operation_name": "update_stack",
    "request_endpoint": "PUT https://resourcemanager.sa-saopaulo-1.oraclecloud.com/20180917/stacks/ocid1.ormstack.oc1.sa-saopaulo-1.amaaaaaawxxxxx",
    "status": 400,
    "target_service": "resource_manager",
    "timestamp": "2024-04-17T19:32:18.444712+00:00",
    "troubleshooting_tips": "See [https://docs.oracle.com/iaas/Content/API/References/apierrors.htm] for more information about resolving this error. If you are unable to resolve this issue, run this CLI command with --debug option and contact Oracle support and provide them the full error message."
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown oci resource-manager stack update command for a Bitbucket Cloud-backed stack and inspect the returned InvalidParameter error. Trace how the CLI builds the stack update request, especially working-directory and configSource; done means the working directory can be updated without incorrectly changing the configuration source type.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, terraform
Domain
cli, cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.