You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 modules in my terraform file and would like to invoke only one module from the terraform file via my Terratest suite. Unfortunately, there is no support in Terratest for this.
Ideally in my test suite, I would want to call the first module via -target and then call the second module via -target, thereby I can test upgrading to v1.4.6 does not cause any issues.
Terraform does not support using 'count' on modules yet and hence this feature to use -target in terraformOptions of Terratest will be of great help.
I have 2 modules in my terraform file and would like to invoke only one module from the terraform file via my Terratest suite. Unfortunately, there is no support in Terratest for this.
Ideally in my test suite, I would want to call the first module via -target and then call the second module via -target, thereby I can test upgrading to v1.4.6 does not cause any issues.
Terraform does not support using 'count' on modules yet and hence this feature to use -target in terraformOptions of Terratest will be of great help.
Terraform Module
provider "aws" {
region = "${var.region}"
}
module "aws_s3_previous" {
#Testing source from this module
//count = "${var.current == false ? 1: 0}"
source = "git::ssh://xxxx-xxxxxx-xxxxxxxx-xxxxxx-bucket.git?ref=v1.4.5"
region = "${var.region}"
app_name = "${var.app_name}"
owner = "${var.owner}"
allow_force_destroy = "${var.allow_force_destroy}"
}
module "aws_s3_current" {
#Testing source from this module
//count = "${var.current == true ? 1: 0}"
source = "git::ssh://xxxx-xxxxxx-xxxxxxxx-xxxxxx-bucket.git?ref=v1.4.6"
region = "${var.region}"
app_name = "${var.app_name}"
owner = "${var.owner}"
allow_force_destroy = "${var.allow_force_destroy}"
}
terraform {
backend "local" {
path = "../stateFiles/terraform.tfstate"
}
}
Use case
Ability to do "terraform apply -target=${module.aws_s3_previous}" in Terratest.
The text was updated successfully, but these errors were encountered: