Skip to content

Fix: Option to add user defined YAML_SERVICES_DIRECTORY.#54

Open
rishangbhavsar wants to merge 2 commits into
oguzhan-yilmaz:mainfrom
rishangbhavsar:main
Open

Fix: Option to add user defined YAML_SERVICES_DIRECTORY.#54
rishangbhavsar wants to merge 2 commits into
oguzhan-yilmaz:mainfrom
rishangbhavsar:main

Conversation

@rishangbhavsar

@rishangbhavsar rishangbhavsar commented Jun 27, 2025

Copy link
Copy Markdown

Fix: Option to add user defined YAML_SERVICES_DIRECTORY via env variable BALCONY_YAML_SERVICES_DIR

Currently i don't find any way by which i can create my own custom file which are not present there like cognito and use it eg.

service_name: cognito-idp
resource_nodes:
  - resource_node_name: UserPool
    operations:
      - operation_name: ListUserPools
        pagination_token_mapping:
          output_key: NextToken
          parameter_name: NextToken

  - resource_node_name: UserPoolClient
    operations:
      - operation_name: ListUserPoolClients
        required_parameters: ["UserPoolId"]
        pagination_token_mapping:
          output_key: NextToken
          parameter_name: NextToken
        jmespath_selector: "[].UserPools[].{UserPoolId: Id}[]"
        explicit_relations:
          - service_name: cognito-idp
            resource_node_name: UserPool
            operation_name: ListUserPools
            required_shape_name: ---
            target_shape_name: ---
            target_shape_type: ---
            target_path: ---
      
      - operation_name: DescribeUserPoolClient
        required_parameters: ["UserPoolId", "ClientId"]
        jmespath_selector: "[].UserPoolClients[].{UserPoolId: UserPoolId, ClientId: ClientId}[]"
        explicit_relations:
          - service_name: cognito-idp
            resource_node_name: UserPoolClient
            operation_name: ListUserPoolClients
            required_shape_name: ---
            target_shape_name: ---
            target_shape_type: ---
            target_path: ---
            ```

@rishangbhavsar rishangbhavsar changed the title Update config.py Fix: Option to add user defined YAML_SERVICES_DIRECTORY. Jun 27, 2025
@oguzhan-yilmaz

Copy link
Copy Markdown
Owner

Thanks for your interest in this project. Can you tell me what for are you using it for?

Your changes would break loading the existing balcony/custom_yamls/*.yaml files, so I can't accept it in this state.

You could take example from the TerraformImport config in the same file

@rishangbhavsar

Copy link
Copy Markdown
Author

As mentioned above currently is am not able to load service like cognito-idp UserPoolClient which requires UserPool id as an argument so i need the BALCONY_YAML_SERVICES_DIR to load files from my defined path so that i can use it for resource which are not supported yet and also can contribute, meanwhile it will overwrite balcony/custom_yamls/*.yaml but i will copy the available services form your repo to my custom dir.

Problem is if i want to use it a service like cognito which is not supported right now, i have to wait for someone to merge in this repo and the new python release. Anyway BALCONY_YAML_SERVICES_DIR is an optional env variable it will get trigger only when defined so exising users will not have any impact due to this.

I am creating a Terraform Import app in StreamlitUI where i am using this project as a python library. I task is to import various aws resources to terraform where we are also using cognito and waf which is not supported by this project currently.

@oguzhan-yilmaz

Copy link
Copy Markdown
Owner

I've implemented what you've requested, please check new versions

@rishangbhavsar

Copy link
Copy Markdown
Author

@oguzhan-yilmaz Thanks for the update, any doc ref to know how to do it for my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants