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.
31 lines
545 B
Terraform
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"
|
|
}
|