:question: Can you JIT a local directory? Say thi...
# atmos
z
❓ Can you JIT a local directory? Say this is for a local example directory of a module. I'd like to include an atmos example.
equivalent tofu-ism
Copy code
module "kms" {
  source = "../.."
or, I guess I can just path it probably. going to try a few things
πŸ˜‚
Copy code
β„Ή Provisioning workdir for component '.'

   Error 

   Error: provisioner execution failed: provisioner failed: failed to sync files to working directory: open .workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./examples/atmos/.workdir/terraform/kms-dev-./.git/logs/refs/heads/zack/feat/stop-flapping-key-policy-and-add-ability-to-add-another-arn: file name too long
Gave up on this, but I was essentially trying to JIT the top level module from my atmos example directory so I could show how to use it.
Copy code
.
β”œβ”€β”€ README.md
β”œβ”€β”€ examples
β”‚   β”œβ”€β”€ atmos
β”‚   β”‚   β”œβ”€β”€ README.md
β”‚   β”‚   β”œβ”€β”€ atmos.yaml
β”‚   β”‚   β”œβ”€β”€ stacks
β”‚   β”‚   β”‚   └── kms.yaml
β”‚   β”‚   └── vendor.yaml
β”‚   └── tofu
β”‚       β”œβ”€β”€ README.md
β”‚       β”œβ”€β”€ <http://main.tf|main.tf>
β”‚       β”œβ”€β”€ <http://providers.tf|providers.tf>
β”‚       └── <http://versions.tf|versions.tf>
β”œβ”€β”€ kms-dev-kms.terraform.tfvars.json
β”œβ”€β”€ <http://kms.tf|kms.tf>
β”œβ”€β”€ <http://output.tf|output.tf>
β”œβ”€β”€ <http://providers.tf|providers.tf>
β”œβ”€β”€ tasks.yaml
β”œβ”€β”€ <http://variables.tf|variables.tf>
└── version.yaml

5 directories, 16 files
getting the atmos.yaml correct was too difficult along with the JIT stuff on the component. It looked like this almost worked
Copy code
components:
  terraform:
    kms:
      source:
        uri: !repo-root
      provision:
        workdir:
          enabled: true
e
This is recursive though
Since repo root contains the workdir
By design we put workdir along side the code so that relative paths are identical
z
can I somehow use local modules with JIT? Or do I need to rely on vendor.yaml for that ?
I tried using
file://
and
git::file://
and
../../
and
!repo-root
and didn't have much luck
In the vendor yaml we have access to
version*:*
*"*local*"*
e
Yes definitely. So here's what’s essentially happening;
Copy code
cp -a ../../.. ../components
So you just need to make sure you are not specifying a source folder that contains the destination folder
Atmos workdir is created inside your Atmos component base dir
(So relative links work)
z
ah alright. excluded_paths maybe what I want
or legit, just include *.tf