Skip to content

[Bug]: Pipeline targetting OU path wildcards fail #800

Open
@bittrance

Description

@bittrance

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

It appears the support for using OU wildcard that was merged in #538 is broken or never worked fully?

Expected Behavior

As per example in docs: https://github.com/awslabs/aws-deployment-framework/blame/325ae13fb83aad600d81494b8694362aae8f7e13/docs/user-guide.md#L377

Current Behavior

This snippet:

pipelines:
  - name: testing
    ...
    targets:
      - path:
          - /workloads/**/*
        regions: [eu-north-1]
        properties:
          template_filename: template.json

results in step function error:

{
  "errorMessage": "Path /workloads/**/* failed to return a child OU at '**'",
  "errorType": "ValueError",
  "requestId": "95da7e76-048e-480a-b38f-c0dfc4249382",
  "stackTrace": [
    "  File \"/var/task/generate_pipeline_inputs.py\", line 223, in lambda_handler\n    pipeline_input_data = generate_pipeline_inputs(\n",
    "  File \"/var/task/generate_pipeline_inputs.py\", line 151, in generate_pipeline_inputs\n    pipeline_target.fetch_accounts_for_target()\n",
    "  File \"/opt/python/target.py\", line 319, in fetch_accounts_for_target\n    self._target_is_ou_path(\n",
    "  File \"/opt/python/target.py\", line 260, in _target_is_ou_path\n    responses = self.organizations.get_accounts_in_path(\n",
    "  File \"/opt/python/organizations.py\", line 384, in get_accounts_in_path\n    ou_id = self.ou_path_to_id(path) if not ou_id else ou_id\n",
    "  File \"/opt/python/organizations.py\", line 367, in ou_path_to_id\n    raise ValueError(\n"
  ]
}

Steps To Reproduce

See above.

Possible Solution

No response

Additional Information/Context

No response

ADF Version

v4.0.0

Contributing a fix?

  • Yes, I am working on a fix to resolve this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions