constellation/terraform-provider-constellation/BUILD.bazel

50 lines
1.4 KiB
Python
Raw Normal View History

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",
terraform-provider: add image datasource (#2642) * terraform-provider: init Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform-provider: add basic docgen Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform-provider: fix build steps Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform-provider: extend build process and docgen Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * dev-docs: document provider usage Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * bazel: upload aspect lib mirror Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform-provider: don't try to create lockfiles Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * bazel: fix shellcheck issues * bazel: separate paths to check * terraform-provider: clean up old files * terraform-provider: update provider resource * terraform-provider: add image data source * dev-docs: remove unnecessary init * bazel: adhere to Terraform naming expectations * terraform-provider: fix expected data type * terraform-provider: generate docs * terraform-provider: improve errors * terraform-provider: add acceptance tests for data source * terraform-provider: fix dependencies * bazel: quote var reference * terraform-provider: make region optional * terraform-provider: bind imagefetcher to data source * bazel: tidy * terraform-provider: remove unused parameter * terraform-provider: remove unused parameter * terraform-provider: extend acceptance tests * terraform-provider: allow tests to be ran without Bazel * dev-docs: document testing * terraform-provider: set binary path accordingly * dev-docs: document docgen process for the provider * bazel: run acceptance test in writable environment * bazel: try to write to `$TMPDIR` * terraform-provider: style nits * terraform-provider: leave TODO * bazel: tidy * terraform-provider: regenerate docs * terraform-provider: fix comment --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2023-11-27 03:00:08 -05:00
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"],
x_defs = {
"version": "{STABLE_STAMP_VERSION}",
},
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"],
)