Skip to content

install created manifests file, instead of directory #173

@p-v-a

Description

@p-v-a

Not sure if this is specific to my attempt, but I can see module failing with error below

module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): + set -e
module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): + ls -lah /home/terraform/rke2_artifacts/manifests
module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): -rw-r----- 1 terraform terraform 64 Apr  4 05:33 /home/terraform/rke2_artifacts/manifests
module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): + sudo install -d /var/lib/rancher/rke2/server/manifests
module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): + sudo cp /home/terraform/rke2_artifacts/manifests/* /var/lib/rancher/rke2/server/manifests
module.bootstrap_server["k8sa1"].terraform_data.copy_manifests[0] (remote-exec): cp: cannot stat '/home/terraform/rke2_artifacts/manifests/*': Not a directory

corresponding lines of code are:

provisioner "file" {
source = local.local_manifests_path
destination = "${local.remote_path}/manifests"
}

Fix is simple, destination must end with /. so it should read: destination = "${local.remote_path}/manifests/"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions