2023-11-24 09:58:21 -05:00
|
|
|
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
|
2023-12-07 10:32:03 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_cross_binary", "go_library")
|
2023-11-24 09:58:21 -05:00
|
|
|
|
|
|
|
# keep
|
|
|
|
go_binary(
|
|
|
|
name = "tf_provider",
|
2023-11-27 03:00:08 -05:00
|
|
|
out = "terraform-provider-constellation", # for complying with Terraform provider naming convention
|
2023-11-24 09:58:21 -05:00
|
|
|
embed = [":terraform-provider-constellation_lib"],
|
|
|
|
pure = "on",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2023-12-07 10:32:03 -05:00
|
|
|
[
|
|
|
|
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",
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2023-11-24 09:58:21 -05:00
|
|
|
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"],
|
|
|
|
)
|