generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug(kms): Add support for all Boundary supported KMSes
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
- Loading branch information
Showing
28 changed files
with
2,429 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Boundary External Plugins Modules | ||
|
||
The Go modules under `plugins` are not intended to be used directly. They are | ||
here purely to allow compilation of the various plugins Boundary supports | ||
without pulling the dependencies (and any clashes, and any init behavior) | ||
directly into Boundary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package kms_plugin_assets | ||
|
||
import ( | ||
"embed" | ||
"io/fs" | ||
) | ||
|
||
const contentDir = "assets" | ||
|
||
// content is our static web server content. | ||
//go:embed assets | ||
var content embed.FS | ||
|
||
func FileSystem() fs.FS { | ||
// Remove the root | ||
f, err := fs.Sub(content, contentDir) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return f | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This directory contains assets for kms plugins. This file in particular exists | ||
so that the Go embed package does not throw errors when importing this module | ||
outside of the main tree. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package kms_plugin_assets | ||
|
||
import ( | ||
"github.com/hashicorp/go-kms-wrapping/v2/aead" | ||
"github.com/hashicorp/go-secure-stdlib/pluginutil/v2" | ||
) | ||
|
||
func BuiltinKmsPlugins() map[string]pluginutil.InmemCreationFunc { | ||
return map[string]pluginutil.InmemCreationFunc{ | ||
"aead": func() (interface{}, error) { | ||
return aead.NewWrapper(), nil | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package kms_plugin_assets | ||
|
||
const KmsPluginPrefix = "boundary-plugin-kms-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module github.com/hashicorp/boundary/plugins/kms/mains/alicloudkms | ||
|
||
go 1.17 | ||
|
||
require ( | ||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0 | ||
github.com/hashicorp/go-kms-wrapping/wrappers/alicloudkms/v2 v2.0.1 | ||
) | ||
|
||
require ( | ||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1499 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fatih/color v1.7.0 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/hashicorp/go-hclog v1.1.0 // indirect | ||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect | ||
github.com/hashicorp/go-plugin v1.4.3 // indirect | ||
github.com/hashicorp/go-uuid v1.0.2 // indirect | ||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect | ||
github.com/jmespath/go-jmespath v0.4.0 // indirect | ||
github.com/json-iterator/go v1.1.9 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/mattn/go-colorable v0.1.6 // indirect | ||
github.com/mattn/go-isatty v0.0.12 // indirect | ||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.1 // indirect | ||
github.com/oklog/run v1.0.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/rogpeppe/go-internal v1.8.1 // indirect | ||
github.com/stretchr/testify v1.7.0 // indirect | ||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect | ||
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
google.golang.org/genproto v0.0.0-20220114231437-d2e6a121cae0 // indirect | ||
google.golang.org/grpc v1.44.0 // indirect | ||
google.golang.org/protobuf v1.27.1 // indirect | ||
gopkg.in/ini.v1 v1.66.2 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
) |
Oops, something went wrong.