Files
threshold/enos/modules/build_local/main.tf
T
Ryan Cragun 23f1cdea27 enos: make the local build target configurable (#2313)
This makes the `make` build target that is used for local builder
variant configurable. This will allow us to utilize the local builder
variant in downstreams that might use different targets for their build.

* Make the local build target configurable
* Allow cross compiling `linux/amd64` on different platforms.
2022-12-19 14:35:10 -05:00

31 lines
545 B
Terraform

terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
}
}
variable "path" {
default = "/tmp"
}
variable "build_target" {
default = "build-ui build"
}
resource "enos_local_exec" "build" {
environment = {
"GOOS" = "linux",
"GOARCH" = "amd64",
"CGO_ENABLED" = 0,
"ARTIFACT_PATH" = var.path
"BUILD_TARGET" = var.build_target
}
scripts = ["${path.module}/templates/build.sh"]
}
output "artifact_path" {
value = "${var.path}/boundary.zip"
}