Skip to content

Vendored artefacts are targeted relative to the vendor.yaml file, not the base_path specified in atmos.yaml #2409

@djmcgreal-cc

Description

@djmcgreal-cc

Describe the Bug

Hi. I have a use case where it's desirable to have Atmos.yaml and vendor.yaml tucked away out of the main repository root.

I find that when I atmos vendor pull I can only seem to target relative to vendor.yaml's location, i.e:

Running atmos vendor pull puts the components/terraform directory adjacent to the vendor.yaml.

Expected Behavior

I would have strongly thought it wants to be relative to the atmos.yaml's base_path, otherwise, I don't understand the intent.

Steps to Reproduce

path/to/atmos.yaml

base_path: !repo-root

vendor:
  base_path: path/to/vendor.yaml

components:
  terraform:
    base_path: components/terraform
    apply_auto_approve: false
    deploy_run_init: true
    init_run_reconfigure: true
    auto_generate_backend_file: true

stacks:
  base_path: stacks
  included_paths:
    - "**/*"
  excluded_paths:
    - "**/_defaults.yaml"
  name_pattern: "{stage}"

logs:
  file: /dev/stderr
  level: Info

settings:
  list_merge_strategy: replace

path/to/vendor.yaml

apiVersion: atmos/v1
kind: AtmosVendorConfig
metadata:
  name: vendored
  description: vendoring
spec:
  sources:
    - component: "github/stargazers"
      source: "github.com/cloudposse/atmos.git//examples/demo-library/{{ .Component }}?ref={{.Version}}"
      version: "main"
      targets:
        - "components/terraform/{{ .Component }}/{{.Version}}"
      included_paths:
        - "**/*.tf"
        - "**/*.tfvars"
        - "**/*.md"
      tags:
        - demo
        - github

ATMOS_CLI_CONFIG_PATH=path/to/ atmos vendor pull pulls the component to path/to/... not !repo_root

Screenshots

No response

Environment

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions