constellation/terraform-provider-constellation/BUILD.bazel
Adrian Stobbe 37cff42bfe
ci: build Terraform binaries action (#2684)
Co-authored-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2023-12-07 16:32:03 +01:00

47 lines
1.3 KiB
Python

load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
# keep
go_binary(
name = "tf_provider",
out = "terraform-provider-constellation", # for complying with Terraform provider naming convention
embed = [":terraform-provider-constellation_lib"],
pure = "on",
visibility = ["//visibility:public"],
)
[
go_cross_binary(
name = "tf_provider_%s" % platform,
platform = "@io_bazel_rules_go//go/toolchain:" + platform,
target = ":tf_provider",
visibility = ["//visibility:public"],
)
for platform in [
"darwin_amd64",
"darwin_arm64",
"linux_amd64",
"linux_arm64",
"windows_amd64",
]
]
go_library(
name = "terraform-provider-constellation_lib",
srcs = ["main.go"],
importpath = "github.com/edgelesssys/constellation/v2/terraform-provider-constellation",
visibility = ["//visibility:private"],
deps = [
"//terraform-provider-constellation/internal/provider",
"@com_github_hashicorp_terraform_plugin_framework//providerserver",
],
)
copy_file(
name = "terraform_rc",
src = "config.tfrc.tpl",
out = "config.tfrc",
allow_symlink = True,
visibility = ["//visibility:public"],
)