I am new to test kitchen and i am trying to use the existing vpc modules i have created earlier using terraform. I am having problems on loading the modules to test kitchen.
My folder structure looks like
tf_aws_cluster
├── .kitchen.yml
├── Gemfile
├── Gemfile.lock
├── README.md
│ ├── modules
| |── vpc
│ ├── main.tf
│ └── variables.tf
├── main.tf
|── variables.tf
the ~/tf_aws_cluster/.kitchen.yml file
---
driver:
name: terraform
provisioner:
name: terraform
directory: ~/tf_aws_cluster/modules/vpc
variable_files:
- variables.tf
my ~/tf_aws_cluster/main.tf file looks like
module "vpc" {
source = "../modules/vpc"
env = "prod"
aws_account_id = "************"
}
when i try to run
bundle exec kitchen verify
i am getting an error in loading modules.
-----> Creating <default-ubuntu>...
Copying configuration from "/home/ubuntu/tf_aws_cluster"...
Upgrading modules...
Error downloading modules: Error loading modules: module vpc: failed to get download URL for "../module/vpc": 200 OK resp:<!DOCTYPE html>
what is the values i should pass under provisioner for the module ?
I have tried by giving the full path for the source parameter ~/tf_aws_cluster/main.tf
source = "~/tf_aws_cluster/modules/vpc/"
this gives me an error as
Error downloading modules: Error loading modules: module vpc: invalid source string: ~/tf_aws_cluster/modules/vpc/