We're working with BitBucket and we decide to move our modules to a different repository. Now i would like to use PAT for cloning the repo.
Example:
module "vpc" {
source = "git::ssh://git@<URL>/<Project>/<Repo>.git//bla/bla2"
module_enabled = var.create_vpc
region = var.region
deploy_name = var.deploy_name
vpc_cidr = var.vpc_cidr
subnet_prefixes = var.subnet_prefixes
ssh_source_ranges = var.ssh_source_ranges
environment = var.environment
subnet_names = var.subnet_names
// app_names = "${var.app_names}"
// natgw_private_ip = "${module.natgw.private_ip}"
// nat_subnets = "${var.nat_subnets}"
}
I need to use a env variable to add the PAT to the git URL
I tried to do something like:
"git::ssh://${blabla}@<URL>/<Project>/<Repo>.git//bla/bla2"
And got this error: "Interpolations are not allowed in module source"
Update #1 : Just to clarify - The URL without the PAT variable is working fine
More info: TF version : 0.12.20
Thanks, Amit