constellation/terraform-provider-constellation/internal/provider/BUILD.bazel
Moritz Sanft af791bd221
terraform-provider: add usage examples (#2713)
* terraform-provider: add usage example for Azure

* terraform-provider: add usage example for AWS

* terraform-provider: add usage example for GCP

* terraform-provider: update usage example for Azure

* terraform-provider: update generated documentation

* docs: adjust creation on Azure and link to examples

* terraform-provider: unify image in-/output (#2725)

* terraform-provider: check for returned error when converting microservices

* terraform-provider: use state values for outputs after creation

* terraform-provider: ignore invalid upgrades (#2728)

---------

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
Co-authored-by: Thomas Tendyck <51411342+thomasten@users.noreply.github.com>
2023-12-18 10:15:54 +01:00

104 lines
3.9 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")
go_library(
name = "provider",
srcs = [
"attestation_data_source.go",
"cluster_resource.go",
"convert.go",
"image_data_source.go",
"provider.go",
"shared_attributes.go",
],
importpath = "github.com/edgelesssys/constellation/v2/terraform-provider-constellation/internal/provider",
visibility = ["//terraform-provider-constellation:__subpackages__"],
deps = [
"//internal/api/attestationconfigapi",
"//internal/api/versionsapi",
"//internal/atls",
"//internal/attestation/choose",
"//internal/attestation/idkeydigest",
"//internal/attestation/measurements",
"//internal/attestation/variant",
"//internal/cloud/azureshared",
"//internal/cloud/cloudprovider",
"//internal/compatibility",
"//internal/config",
"//internal/constants",
"//internal/constellation",
"//internal/constellation/helm",
"//internal/constellation/kubecmd",
"//internal/constellation/state",
"//internal/grpc/dialer",
"//internal/imagefetcher",
"//internal/kms/uri",
"//internal/semver",
"//internal/sigstore",
"//internal/versions",
"//terraform-provider-constellation/internal/data",
"@com_github_hashicorp_terraform_plugin_framework//datasource",
"@com_github_hashicorp_terraform_plugin_framework//datasource/schema",
"@com_github_hashicorp_terraform_plugin_framework//diag",
"@com_github_hashicorp_terraform_plugin_framework//path",
"@com_github_hashicorp_terraform_plugin_framework//provider",
"@com_github_hashicorp_terraform_plugin_framework//provider/schema",
"@com_github_hashicorp_terraform_plugin_framework//resource",
"@com_github_hashicorp_terraform_plugin_framework//resource/schema",
"@com_github_hashicorp_terraform_plugin_framework//resource/schema/planmodifier",
"@com_github_hashicorp_terraform_plugin_framework//resource/schema/stringplanmodifier",
"@com_github_hashicorp_terraform_plugin_framework//schema/validator",
"@com_github_hashicorp_terraform_plugin_framework//types",
"@com_github_hashicorp_terraform_plugin_framework//types/basetypes",
"@com_github_hashicorp_terraform_plugin_framework_validators//stringvalidator",
"@com_github_hashicorp_terraform_plugin_log//tflog",
],
)
go_test(
name = "provider_test",
srcs = [
"attestation_data_source_test.go",
"cluster_resource_test.go",
"convert_test.go",
"image_data_source_test.go",
"provider_test.go",
],
# keep
count = 1,
# keep
data = [
"//bazel/ci:com_github_hashicorp_terraform",
],
embed = [":provider"],
# keep
env = {
"TF_ACC": "1",
"TF_ACC_TEMP_DIR": "", # TODO(msanft): find a writable path on remote runners.
"TF_ACC_TERRAFORM_PATH": "$(rlocationpath //bazel/ci:com_github_hashicorp_terraform)",
},
# keep
tags = [
"integration",
"requires-network",
],
# keep
x_defs = {
"runsUnder": "bazel",
},
deps = [
"//internal/attestation/idkeydigest",
"//internal/attestation/measurements",
"//internal/attestation/variant",
"//internal/config",
"//internal/constants",
"@com_github_hashicorp_terraform_plugin_framework//providerserver",
"@com_github_hashicorp_terraform_plugin_go//tfprotov6",
"@com_github_hashicorp_terraform_plugin_testing//helper/resource",
"@com_github_hashicorp_terraform_plugin_testing//terraform",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
"@io_bazel_rules_go//go/runfiles:go_default_library",
],
)