diff --git a/cmd/secret-generic-connector/backend/hashicorp/BUILD.bazel b/cmd/secret-generic-connector/backend/hashicorp/BUILD.bazel index b63efe4f5356..4492521155e7 100644 --- a/cmd/secret-generic-connector/backend/hashicorp/BUILD.bazel +++ b/cmd/secret-generic-connector/backend/hashicorp/BUILD.bazel @@ -24,13 +24,142 @@ dd_agent_go_test( name = "hashicorp_test", srcs = ["vault_test.go"], embed = [":hashicorp"], - deps = [ - "//cmd/secret-generic-connector/secret", - "@com_github_hashicorp_vault//http", - "@com_github_hashicorp_vault//vault", - "@com_github_hashicorp_vault_api//:api", - "@com_github_hashicorp_vault_api_auth_aws//:aws", - "@com_github_stretchr_testify//assert", - "@com_github_stretchr_testify//require", - ], + deps = select({ + "@rules_go//go/platform:android": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:darwin": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:dragonfly": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:freebsd": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:illumos": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:ios": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:js": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:linux": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:netbsd": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:openbsd": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:osx": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:plan9": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:qnx": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:solaris": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "@rules_go//go/platform:windows": [ + "//cmd/secret-generic-connector/secret", + "@com_github_hashicorp_vault//http", + "@com_github_hashicorp_vault//vault", + "@com_github_hashicorp_vault_api//:api", + "@com_github_hashicorp_vault_api_auth_aws//:aws", + "@com_github_stretchr_testify//assert", + "@com_github_stretchr_testify//require", + ], + "//conditions:default": [], + }), ) diff --git a/cmd/secret-generic-connector/backend/hashicorp/vault_test.go b/cmd/secret-generic-connector/backend/hashicorp/vault_test.go index 61c235d3d037..7c2782b60f15 100644 --- a/cmd/secret-generic-connector/backend/hashicorp/vault_test.go +++ b/cmd/secret-generic-connector/backend/hashicorp/vault_test.go @@ -4,6 +4,12 @@ // Copyright 2024-present Datadog, Inc. // Copyright (c) 2021, RapDev.IO +// AIX is excluded because github.com/hashicorp/go-secure-stdlib/mlock does not +// support AIX (its lockMemory is only defined for linux and darwin). This +// transitively breaks compilation of github.com/hashicorp/vault/http on AIX. +// Track https://github.com/hashicorp/go-secure-stdlib/pull/187 for the upstream fix. +//go:build !aix + package hashicorp import (