bug(kms): Add support for all Boundary supported KMSes (#213)
After moving to go-kms-wrapping V2, the Boundary Terraform Provider
did not load all KMS plugins resulting in an error when trying to
create a wrapper for any type other than aead:
Error: error reading wrappers from "recovery_kms_hcl":
Error configuring kms: plugin is nil
This commit is contained in:
1 parent
9acb1b6f7f
commit
d8ab0733e8
29 files changed
+2430
-1
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script builds the required plugins.
|
||||
set -e
|
||||
|
||||
BINARY_SUFFIX=""
|
||||
if [ "${GOOS}x" = "windowsx" ]; then
|
||||
BINARY_SUFFIX=".exe"
|
||||
fi
|
||||
|
||||
# Get the parent directory of where this script is.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
export DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
||||
|
||||
echo "==> Building kms plugins..."
|
||||
rm -f $DIR/plugins/kms/assets/boundary-plugin-kms*
|
||||
for CURR_PLUGIN in $(ls $DIR/plugins/kms/mains); do
|
||||
echo "==> Building $CURR_PLUGIN plugin..."
|
||||
cd $DIR/plugins/kms/mains/$CURR_PLUGIN;
|
||||
go build -v -o $DIR/plugins/kms/assets/boundary-plugin-kms-${CURR_PLUGIN}${BINARY_SUFFIX} .;
|
||||
cd $DIR;
|
||||
done;
|
||||
cd $DIR/plugins/kms/assets;
|
||||
for CURR_PLUGIN in $(ls boundary-plugin*); do
|
||||
echo "==> gzip $CURR_PLUGIN plugin..."
|
||||
gzip -f -9 $CURR_PLUGIN;
|
||||
done;
|
||||
cd $DIR;
|
||||
Reference in new issue
Block a user