Can't find terraform plan output artifacts

I’m working on creating a pipeline for terraform, init, fmt, validate, plan, apply … and I’m struggling a little bit at the plan phase of this.

We have a large terraform source tree that essentially has one openstack instance per directory…

What I’m stumbling on now is that I have a script that traverses our large terraform source tree… finds all of the files that were changed, processes each directory in which those files are found… does an init, fmt, validate and if that succeeds, it does a terraform plan -out ${instance_name} …

The problem is that when the plan stage goes to collect the artifacts that I’ve told it to upload… it says they dont existing the directory I’ve specified…

This is my .gitlab-ci.yml … redacted a bit.

  - validate
  - plan

image: hashicorp/terraform:1.3.7

  - apk update
  - apk --no-cache add bash ca-certificates curl jq
  - |-
    cat <<EOF >~/.terraformrc
    credentials "<gitlab-fqdn>" {
      token = "${CI_TF_TOKEN}"

  stage: validate
    - bash ci-scripts/
    - bash ci-scripts/

  stage: plan
    - bash ci-scripts/
    - validate
      - plan-*

I tried specifying various paths in the script, such as /tmp and /root … last attempt, I just dropped in whatever PWD was set to in the job… still no luck. Every time, it says something like this:

Uploading artifacts...
++ /usr/bin/gitlab-runner-helper artifacts-uploader --url https://<gitlab-fqdn>/ --token [MASKED] --id 30021 --path 'plan-*' --artifact-format zip --artifact-type archive
WARNING: plan-*: no matching files                 
ERROR: No files to upload        

Can someone clue me in as to what I’m missing?