Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e20d1005e | ||
|
|
cfc57d5e25 | ||
|
|
79951499ec | ||
|
|
f95954c83d | ||
|
|
1882beff3c | ||
|
|
807db1bef1 | ||
|
|
24bd9521f4 | ||
|
|
ef38f78c46 | ||
|
|
6255122fba | ||
|
|
622fca1c0e | ||
|
|
8aa93ccb69 | ||
|
|
1b96f89728 | ||
|
|
e90db9895c | ||
|
|
7ae01cc6e0 | ||
|
|
a134747539 | ||
|
|
893b150ec9 | ||
|
|
a61a13193c | ||
|
|
292204caf0 | ||
|
|
a2e04949be | ||
|
|
8fad44cc94 | ||
|
|
e0fb0a44e0 | ||
|
|
767a9ce1e6 | ||
|
|
f1d8cbf6e6 | ||
|
|
072c046b67 | ||
|
|
82ae1e3cd7 | ||
|
|
14bc6a4453 | ||
|
|
dc3aa09688 |
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
1.18.4
|
||||
1.19.1
|
||||
@@ -2,6 +2,67 @@
|
||||
|
||||
Canonical reference for changes, improvements, and bugfixes for the Boundary Terraform provider.
|
||||
|
||||
## 1.1.3 (November 29, 2022)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Add support for a workers as a resource
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/293)).
|
||||
|
||||
## 1.1.2 (October 18, 2022)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Add support for setting mapping overrides for vault credential libraries
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/287)).
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Improve error message when authenticating to boundary
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/290)).
|
||||
* Set state before returning an error when creating a resource
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/289))
|
||||
|
||||
## 1.1.1 (October 12, 2022)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* The plugin cleanup function is being called before the entire Terraform workflow is complete.
|
||||
([Issue](https://github.com/hashicorp/terraform-provider-boundary/issues/282)),
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/285)).
|
||||
|
||||
## 1.1.0 (October 4, 2022)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Add support for JSON credentials
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/271)).
|
||||
* Add support for setting the plugin execution directory from the config
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/280)).
|
||||
|
||||
### Deprecations/Changes
|
||||
|
||||
* Fix panic resulting from expired Vault credential store tokens
|
||||
([Issue](https://github.com/hashicorp/terraform-provider-boundary/issues/279),
|
||||
[PR](https://github.com/hashicorp/terraform-provider-boundary/pull/277)).
|
||||
* Remove `application_credential_source_ids` of the `target` resource which was deprecated
|
||||
in 1.0.12 ([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/273)).
|
||||
* Remove `default_role` from the `role` resource, this schema was never supported and was
|
||||
included mistakenly ([Issue](https://github.com/hashicorp/terraform-provider-boundary/issues/130),
|
||||
[PR](https://github.com/hashicorp/terraform-provider-boundary/pull/269)).
|
||||
|
||||
## 1.0.12 (September 13, 2022)
|
||||
|
||||
### New and Improved
|
||||
|
||||
* Add support for SSH targets
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/264)).
|
||||
|
||||
### Deprecations/Changes
|
||||
|
||||
* Deprecate `application_credential_source_ids` of the `target` resource
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/260)).
|
||||
|
||||
## 1.0.11 (August 26, 2022)
|
||||
|
||||
### New and Improved
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.18
|
||||
FROM golang:1.19
|
||||
|
||||
WORKDIR /go/src/terraform-provider-boundary
|
||||
COPY . .
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Copyright (c) 2020 HashiCorp, Inc.
|
||||
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Requirements
|
||||
------------
|
||||
|
||||
- [Terraform](https://www.terraform.io/downloads.html) >= 0.12.x
|
||||
- [Go](https://golang.org/doc/install) >= 1.18
|
||||
- [Go](https://golang.org/doc/install) >= 1.19
|
||||
|
||||
Building The Provider
|
||||
---------------------
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
VERSION="1.18.4"
|
||||
VERSION="1.19.1"
|
||||
|
||||
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
|
||||
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
|
||||
|
||||
@@ -34,6 +34,7 @@ provider "boundary" {
|
||||
- `auth_method_id` (String) The auth method ID e.g. ampw_1234567890
|
||||
- `password_auth_method_login_name` (String) The auth method login name for password-style auth methods
|
||||
- `password_auth_method_password` (String) The auth method password for password-style auth methods
|
||||
- `plugin_execution_dir` (String) Specifies a directory that the Boundary provider can use to write and execute its built-in plugins.
|
||||
- `recovery_kms_hcl` (String) Can be a heredoc string or a path on disk. If set, the string/file will be parsed as HCL and used with the recovery KMS mechanism. While this is set, it will override any other authentication information; the KMS mechanism will always be used. See Boundary's KMS docs for examples: https://boundaryproject.io/docs/configuration/kms
|
||||
- `tls_insecure` (Boolean) When set to true, does not validate the Boundary API endpoint certificate
|
||||
- `token` (String) The Boundary token to use, as a string or path on disk containing just the string. If set, the token read here will be used in place of authenticating with the auth method specified in "auth_method_id", although the recovery KMS mechanism will still override this. Can also be set with the BOUNDARY_TOKEN environment variable.
|
||||
@@ -25,7 +25,7 @@ Deprecated: use `boundary_account_password` instead.
|
||||
- `description` (String) The account description.
|
||||
- `login_name` (String) The login name for this account.
|
||||
- `name` (String) The account name. Defaults to the resource name.
|
||||
- `password` (String) The account password. Only set on create, changes will not be reflected when updating account.
|
||||
- `password` (String, Sensitive) The account password. Only set on create, changes will not be reflected when updating account.
|
||||
|
||||
### Read-Only
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ resource "boundary_account_password" "jeff" {
|
||||
- `description` (String) The account description.
|
||||
- `login_name` (String) The login name for this account.
|
||||
- `name` (String) The account name. Defaults to the resource name.
|
||||
- `password` (String) The account password. Only set on create, changes will not be reflected when updating account.
|
||||
- `password` (String, Sensitive) The account password. Only set on create, changes will not be reflected when updating account.
|
||||
|
||||
### Read-Only
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ The OIDC auth method resource allows you to configure a Boundary auth_method_oid
|
||||
- `callback_url` (String) The URL that should be provided to the IdP for callbacks.
|
||||
- `claims_scopes` (List of String) Claims scopes.
|
||||
- `client_id` (String) The client ID assigned to this auth method from the provider.
|
||||
- `client_secret` (String) The secret key assigned to this auth method from the provider. Once set, only the hash will be kept and the original value can be removed from configuration.
|
||||
- `client_secret` (String, Sensitive) The secret key assigned to this auth method from the provider. Once set, only the hash will be kept and the original value can be removed from configuration.
|
||||
- `client_secret_hmac` (String) The HMAC of the client secret returned by the Boundary controller, which is used for comparison after initial setting of the value.
|
||||
- `description` (String) The auth method description.
|
||||
- `disable_discovered_config_validation` (Boolean) Disables validation logic ensuring that the OIDC provider's information from its discovery endpoint matches the information here. The validation is only performed at create or update time.
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_credential_json Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The json credential resource allows you to congiure a credential using a json object.
|
||||
---
|
||||
|
||||
# boundary_credential_json (Resource)
|
||||
|
||||
The json credential resource allows you to congiure a credential using a json object.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "global scope"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_json" "example" {
|
||||
name = "example_json"
|
||||
description = "My first json credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
object = file("~/object.json") # change to valid json file
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) The credential store in which to save this json credential.
|
||||
- `object` (String, Sensitive) The object for the this json credential. Either values encoded with the "jsonencode" function, pre-escaped JSON string, or a file
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The description of this json credential.
|
||||
- `name` (String) The name of this json credential. Defaults to the resource name.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this json credential.
|
||||
- `object_hmac` (String) The object hmac.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_credential_json.example_json <my-id>
|
||||
```
|
||||
@@ -56,6 +56,33 @@ resource "boundary_credential_library_vault" "bar" {
|
||||
}
|
||||
EOT
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault" "baz" {
|
||||
name = "baz"
|
||||
description = "vault username password credential with mapping overrides"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/baz" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "username_password"
|
||||
credential_mapping_overrides = {
|
||||
password_attribute = "alternative_password_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault" "quz" {
|
||||
name = "quz"
|
||||
description = "vault ssh private key credential with mapping overrides"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/quz" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "ssh_private_key"
|
||||
credential_mapping_overrides = {
|
||||
private_key_attribute = "alternative_key_label"
|
||||
private_key_passphrase_attribute = "alternative_passphrase_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
@@ -68,6 +95,7 @@ EOT
|
||||
|
||||
### Optional
|
||||
|
||||
- `credential_mapping_overrides` (Map of String) The credential mapping override.
|
||||
- `credential_type` (String) The type of credential the library generates.
|
||||
- `description` (String) The Vault credential library description.
|
||||
- `http_method` (String) The HTTP method the library uses when requesting credentials from Vault. Defaults to 'GET'
|
||||
|
||||
@@ -50,14 +50,14 @@ resource "boundary_credential_ssh_private_key" "example" {
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) ID of the credential store this credential belongs to.
|
||||
- `private_key` (String) The private key associated with the credential.
|
||||
- `private_key` (String, Sensitive) The private key associated with the credential.
|
||||
- `username` (String) The username associated with the credential.
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The description of the credential.
|
||||
- `name` (String) The name of the credential. Defaults to the resource name.
|
||||
- `private_key_passphrase` (String) The passphrase of the private key associated with the credential.
|
||||
- `private_key_passphrase` (String, Sensitive) The passphrase of the private key associated with the credential.
|
||||
|
||||
### Read-Only
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ resource "boundary_credential_username_password" "example" {
|
||||
### Required
|
||||
|
||||
- `credential_store_id` (String) The credential store in which to save this username/password credential.
|
||||
- `password` (String) The password of this username/password credential.
|
||||
- `password` (String, Sensitive) The password of this username/password credential.
|
||||
- `username` (String) The username of this username/password credential.
|
||||
|
||||
### Optional
|
||||
|
||||
@@ -10,7 +10,70 @@ description: |-
|
||||
|
||||
The host catalog resource allows you to configure a Boundary plugin-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.global.id
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
# For more information about the aws plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-aws
|
||||
#
|
||||
# For more information about aws users, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/aws-host-catalogs?in=boundary/oss-access-management#configure-terraform-and-iam-user-privileges
|
||||
resource "boundary_host_catalog_plugin" "aws_example" {
|
||||
name = "My aws catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "aws"
|
||||
attributes_json = jsonencode({ "region" = "us-east-1" })
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in aws by creating a aws iam user with programmatic access
|
||||
secrets_json = jsonencode({
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
}
|
||||
|
||||
# For more information about the azure plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-azure
|
||||
#
|
||||
# For more information about azure ad applications, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/azure-host-catalogs#register-a-new-azure-ad-application-1
|
||||
resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
name = "My azure catalog"
|
||||
description = "My second host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "azure"
|
||||
|
||||
# the attributes below must be generated in azure by creating an ad application
|
||||
attributes_json = jsonencode({
|
||||
"disable_credential_rotation" = "true",
|
||||
"tenant_id" = "ARM_TENANT_ID",
|
||||
"subscription_id" = "ARM_SUBSCRIPTION_ID",
|
||||
"client_id" = "ARM_CLIENT_ID"
|
||||
})
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in azure by creating an ad application
|
||||
secrets_json = jsonencode({
|
||||
"secret_value" = "ARM_CLIENT_SECRET"
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -36,4 +99,10 @@ The host catalog resource allows you to configure a Boundary plugin-type host ca
|
||||
|
||||
- `id` (String) The ID of the host catalog.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_catalog_plugin.foo <my-id>
|
||||
```
|
||||
@@ -10,7 +10,30 @@ description: |-
|
||||
|
||||
The static host catalog resource allows you to configure a Boundary static-type host catalog. Host catalogs are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host catalog.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.global.id
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
name = "My catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -28,4 +51,10 @@ The static host catalog resource allows you to configure a Boundary static-type
|
||||
|
||||
- `id` (String) The ID of the host catalog.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_catalog_static.foo <my-id>
|
||||
```
|
||||
@@ -10,7 +10,113 @@ description: |-
|
||||
|
||||
The host_set_plugin resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
# For more information about the aws plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-aws
|
||||
#
|
||||
# For more information about aws users, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/aws-host-catalogs?in=boundary/oss-access-management#configure-terraform-and-iam-user-privileges
|
||||
resource "boundary_host_catalog_plugin" "aws_example" {
|
||||
name = "My aws catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "aws"
|
||||
attributes_json = jsonencode({ "region" = "us-east-1" })
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in aws by creating a aws iam user with programmatic access
|
||||
secrets_json = jsonencode({
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "web" {
|
||||
name = "My web host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
attributes_json = jsonencode({ "filters" = "tag:service-type=web" })
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "foobar" {
|
||||
name = "My foobar host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
preferred_endpoints = ["cidr:54.0.0.0/8"]
|
||||
attributes_json = jsonencode({
|
||||
"filters" = "tag-key=foo",
|
||||
"filters" = "tag-key=bar"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "launch" {
|
||||
name = "My launch host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
sync_interval_seconds = 60
|
||||
attributes_json = jsonencode({
|
||||
"filters" = "tag:development=prod,dev",
|
||||
"filters" = "launch-time=2022-01-04T*"
|
||||
})
|
||||
}
|
||||
|
||||
# For more information about the azure plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-azure
|
||||
#
|
||||
# For more information about azure ad applications, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/azure-host-catalogs#register-a-new-azure-ad-application-1
|
||||
resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
name = "My azure catalog"
|
||||
description = "My second host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "azure"
|
||||
|
||||
# the attributes below must be generated in azure by creating an ad application
|
||||
attributes_json = jsonencode({
|
||||
"disable_credential_rotation" = "true",
|
||||
"tenant_id" = "ARM_TENANT_ID",
|
||||
"subscription_id" = "ARM_SUBSCRIPTION_ID",
|
||||
"client_id" = "ARM_CLIENT_ID"
|
||||
})
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in azure by creating an ad application
|
||||
secrets_json = jsonencode({
|
||||
"secret_value" = "ARM_CLIENT_SECRET"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "database" {
|
||||
name = "My database host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.azure_exmaple.id
|
||||
attributes_json = jsonencode({ "filter" = "tagName eq 'service-type' and tagValue eq 'database'" })
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "foodev" {
|
||||
name = "My foodev host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.azure_exmaple.id
|
||||
preferred_endpoints = ["cidr:54.0.0.0/8"]
|
||||
sync_interval_seconds = 60
|
||||
attributes_json = jsonencode({
|
||||
"filter" = "tagName eq 'tag-key' and tagValue eq 'foo'",
|
||||
"filter" = "tagName eq 'application' and tagValue eq 'dev'",
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -32,4 +138,10 @@ The host_set_plugin resource allows you to configure a Boundary host set. Host s
|
||||
|
||||
- `id` (String) The ID of the host set.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_set_plugin.foo <my-id>
|
||||
```
|
||||
@@ -10,7 +10,50 @@ description: |-
|
||||
|
||||
The host_set_static resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "first" {
|
||||
name = "host_1"
|
||||
description = "My first host!"
|
||||
address = "10.0.0.1"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "second" {
|
||||
name = "host_2"
|
||||
description = "My second host!"
|
||||
address = "10.0.0.2"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
|
||||
resource "boundary_host_set_static" "web" {
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
host_ids = [
|
||||
boundary_host_static.first.id,
|
||||
boundary_host_static.second.id,
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -30,4 +73,10 @@ The host_set_static resource allows you to configure a Boundary host set. Host s
|
||||
|
||||
- `id` (String) The ID of the host set.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_set_static.foo <my-id>
|
||||
```
|
||||
@@ -10,7 +10,37 @@ description: |-
|
||||
|
||||
The static host resource allows you to configure a Boundary static host. Hosts are always part of a project, so a project resource should be used inline or you should have the project ID in hand to successfully configure a host.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```terraform
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
name = "My catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "example" {
|
||||
name = "example_host"
|
||||
description = "My first host!"
|
||||
address = "10.0.0.1"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
```
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
@@ -30,4 +60,10 @@ The static host resource allows you to configure a Boundary static host. Hosts a
|
||||
|
||||
- `id` (String) The ID of the host.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_host_static.foo <my-id>
|
||||
```
|
||||
@@ -126,7 +126,6 @@ resource "boundary_role" "readonly" {
|
||||
|
||||
### Optional
|
||||
|
||||
- `default_role` (Boolean) Indicates that the role containing this value is the default role (that is, has the id 'r_default'), which triggers some specialized behavior to allow it to be imported and managed.
|
||||
- `description` (String) The role description.
|
||||
- `grant_scope_id` (String)
|
||||
- `grant_strings` (Set of String) A list of stringified grants for the role.
|
||||
|
||||
@@ -47,6 +47,7 @@ resource "boundary_credential_library_vault" "foo" {
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/foo" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "username_password"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog" "foo" {
|
||||
@@ -92,7 +93,21 @@ resource "boundary_target" "foo" {
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
]
|
||||
application_credential_source_ids = [
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
}
|
||||
|
||||
resource "boundary_target" "ssh_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
}
|
||||
@@ -108,10 +123,11 @@ resource "boundary_target" "foo" {
|
||||
|
||||
### Optional
|
||||
|
||||
- `application_credential_source_ids` (Set of String) A list of application credential source ID's.
|
||||
- `brokered_credential_source_ids` (Set of String) A list of brokered credential source ID's.
|
||||
- `default_port` (Number) The default port for this target.
|
||||
- `description` (String) The target description.
|
||||
- `host_source_ids` (Set of String) A list of host source ID's.
|
||||
- `injected_application_credential_source_ids` (Set of String) A list of injected application credential source ID's.
|
||||
- `name` (String) The target name. Defaults to the resource name.
|
||||
- `session_connection_limit` (Number)
|
||||
- `session_max_seconds` (Number)
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "boundary_worker Resource - terraform-provider-boundary"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
The resource allows you to create a self-managed worker object.
|
||||
---
|
||||
|
||||
# boundary_worker (Resource)
|
||||
|
||||
The resource allows you to create a self-managed worker object.
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `scope_id` (String) The scope for the worker.
|
||||
|
||||
### Optional
|
||||
|
||||
- `description` (String) The description for the worker.
|
||||
- `name` (String) The name for the worker.
|
||||
- `worker_generated_auth_token` (String) The worker authentication token required to register the worker for the worker-led authentication flow. Leaving this blank will result in a controller generated token.
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `address` (String) The accessible address of the self managed worker.
|
||||
- `authorized_actions` (List of String) A list of actions that the worker is entitled to perform.
|
||||
- `controller_generated_activation_token` (String) A single use token generated by the controller to be passed to the self-managed worker.
|
||||
- `id` (String) The ID of the worker.
|
||||
- `release_version` (Number) The version of the Boundary binary running on the self managed worker.
|
||||
|
||||
## Import
|
||||
|
||||
Import is supported using the following syntax:
|
||||
|
||||
```shell
|
||||
terraform import boundary_worker.foo <my-id>
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_credential_json.example_json <my-id>
|
||||
@@ -0,0 +1,27 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "global scope"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_credential_store_static" "example" {
|
||||
name = "example_static_credential_store"
|
||||
description = "My first static credential store!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_credential_json" "example" {
|
||||
name = "example_json"
|
||||
description = "My first json credential!"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
object = file("~/object.json") # change to valid json file
|
||||
}
|
||||
@@ -41,3 +41,30 @@ resource "boundary_credential_library_vault" "bar" {
|
||||
}
|
||||
EOT
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault" "baz" {
|
||||
name = "baz"
|
||||
description = "vault username password credential with mapping overrides"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/baz" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "username_password"
|
||||
credential_mapping_overrides = {
|
||||
password_attribute = "alternative_password_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}
|
||||
|
||||
resource "boundary_credential_library_vault" "quz" {
|
||||
name = "quz"
|
||||
description = "vault ssh private key credential with mapping overrides"
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/quz" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "ssh_private_key"
|
||||
credential_mapping_overrides = {
|
||||
private_key_attribute = "alternative_key_label"
|
||||
private_key_passphrase_attribute = "alternative_passphrase_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_host_catalog_plugin.foo <my-id>
|
||||
@@ -0,0 +1,60 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.global.id
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
# For more information about the aws plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-aws
|
||||
#
|
||||
# For more information about aws users, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/aws-host-catalogs?in=boundary/oss-access-management#configure-terraform-and-iam-user-privileges
|
||||
resource "boundary_host_catalog_plugin" "aws_example" {
|
||||
name = "My aws catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "aws"
|
||||
attributes_json = jsonencode({ "region" = "us-east-1" })
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in aws by creating a aws iam user with programmatic access
|
||||
secrets_json = jsonencode({
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
}
|
||||
|
||||
# For more information about the azure plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-azure
|
||||
#
|
||||
# For more information about azure ad applications, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/azure-host-catalogs#register-a-new-azure-ad-application-1
|
||||
resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
name = "My azure catalog"
|
||||
description = "My second host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "azure"
|
||||
|
||||
# the attributes below must be generated in azure by creating an ad application
|
||||
attributes_json = jsonencode({
|
||||
"disable_credential_rotation" = "true",
|
||||
"tenant_id" = "ARM_TENANT_ID",
|
||||
"subscription_id" = "ARM_SUBSCRIPTION_ID",
|
||||
"client_id" = "ARM_CLIENT_ID"
|
||||
})
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in azure by creating an ad application
|
||||
secrets_json = jsonencode({
|
||||
"secret_value" = "ARM_CLIENT_SECRET"
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_host_catalog_static.foo <my-id>
|
||||
@@ -0,0 +1,20 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.global.id
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
name = "My catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_host_set_plugin.foo <my-id>
|
||||
@@ -0,0 +1,103 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
# For more information about the aws plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-aws
|
||||
#
|
||||
# For more information about aws users, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/aws-host-catalogs?in=boundary/oss-access-management#configure-terraform-and-iam-user-privileges
|
||||
resource "boundary_host_catalog_plugin" "aws_example" {
|
||||
name = "My aws catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "aws"
|
||||
attributes_json = jsonencode({ "region" = "us-east-1" })
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in aws by creating a aws iam user with programmatic access
|
||||
secrets_json = jsonencode({
|
||||
"access_key_id" = "aws_access_key_id_value",
|
||||
"secret_access_key" = "aws_secret_access_key_value"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "web" {
|
||||
name = "My web host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
attributes_json = jsonencode({ "filters" = "tag:service-type=web" })
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "foobar" {
|
||||
name = "My foobar host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
preferred_endpoints = ["cidr:54.0.0.0/8"]
|
||||
attributes_json = jsonencode({
|
||||
"filters" = "tag-key=foo",
|
||||
"filters" = "tag-key=bar"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "launch" {
|
||||
name = "My launch host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.aws_exmaple.id
|
||||
sync_interval_seconds = 60
|
||||
attributes_json = jsonencode({
|
||||
"filters" = "tag:development=prod,dev",
|
||||
"filters" = "launch-time=2022-01-04T*"
|
||||
})
|
||||
}
|
||||
|
||||
# For more information about the azure plugin, please visit here:
|
||||
# https://github.com/hashicorp/boundary-plugin-host-azure
|
||||
#
|
||||
# For more information about azure ad applications, please visit here:
|
||||
# https://learn.hashicorp.com/tutorials/boundary/azure-host-catalogs#register-a-new-azure-ad-application-1
|
||||
resource "boundary_host_catalog_plugin" "azure_example" {
|
||||
name = "My azure catalog"
|
||||
description = "My second host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
plugin_name = "azure"
|
||||
|
||||
# the attributes below must be generated in azure by creating an ad application
|
||||
attributes_json = jsonencode({
|
||||
"disable_credential_rotation" = "true",
|
||||
"tenant_id" = "ARM_TENANT_ID",
|
||||
"subscription_id" = "ARM_SUBSCRIPTION_ID",
|
||||
"client_id" = "ARM_CLIENT_ID"
|
||||
})
|
||||
|
||||
# recommended to pass in aws secrets using a file() or using environment variables
|
||||
# the secrets below must be generated in azure by creating an ad application
|
||||
secrets_json = jsonencode({
|
||||
"secret_value" = "ARM_CLIENT_SECRET"
|
||||
})
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "database" {
|
||||
name = "My database host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.azure_exmaple.id
|
||||
attributes_json = jsonencode({ "filter" = "tagName eq 'service-type' and tagValue eq 'database'" })
|
||||
}
|
||||
|
||||
resource "boundary_host_set_plugin" "foodev" {
|
||||
name = "My foodev host set plugin"
|
||||
host_catalog_id = boundary_host_catalog_plugin.azure_exmaple.id
|
||||
preferred_endpoints = ["cidr:54.0.0.0/8"]
|
||||
sync_interval_seconds = 60
|
||||
attributes_json = jsonencode({
|
||||
"filter" = "tagName eq 'tag-key' and tagValue eq 'foo'",
|
||||
"filter" = "tagName eq 'application' and tagValue eq 'dev'",
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_host_set_static.foo <my-id>
|
||||
@@ -0,0 +1,40 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "first" {
|
||||
name = "host_1"
|
||||
description = "My first host!"
|
||||
address = "10.0.0.1"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "second" {
|
||||
name = "host_2"
|
||||
description = "My second host!"
|
||||
address = "10.0.0.2"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
|
||||
resource "boundary_host_set_static" "web" {
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
host_ids = [
|
||||
boundary_host_static.first.id,
|
||||
boundary_host_static.second.id,
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_host_static.foo <my-id>
|
||||
@@ -0,0 +1,27 @@
|
||||
resource "boundary_scope" "org" {
|
||||
name = "organization_one"
|
||||
description = "My first scope!"
|
||||
scope_id = "global"
|
||||
auto_create_admin_role = true
|
||||
auto_create_default_role = true
|
||||
}
|
||||
|
||||
resource "boundary_scope" "project" {
|
||||
name = "project_one"
|
||||
description = "My first scope!"
|
||||
scope_id = boundary_scope.org.id
|
||||
auto_create_admin_role = true
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog_static" "example" {
|
||||
name = "My catalog"
|
||||
description = "My first host catalog!"
|
||||
scope_id = boundary_scope.project.id
|
||||
}
|
||||
|
||||
resource "boundary_host_static" "example" {
|
||||
name = "example_host"
|
||||
description = "My first host!"
|
||||
address = "10.0.0.1"
|
||||
host_catalog_id = boundary_host_catalog_static.example.id
|
||||
}
|
||||
@@ -32,6 +32,7 @@ resource "boundary_credential_library_vault" "foo" {
|
||||
credential_store_id = boundary_credential_store_vault.foo.id
|
||||
path = "my/secret/foo" # change to Vault backend path
|
||||
http_method = "GET"
|
||||
credential_type = "username_password"
|
||||
}
|
||||
|
||||
resource "boundary_host_catalog" "foo" {
|
||||
@@ -77,7 +78,21 @@ resource "boundary_target" "foo" {
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
]
|
||||
application_credential_source_ids = [
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
}
|
||||
|
||||
resource "boundary_target" "ssh_foo" {
|
||||
name = "ssh_foo"
|
||||
description = "Ssh target"
|
||||
type = "ssh"
|
||||
default_port = "22"
|
||||
scope_id = boundary_scope.project.id
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
]
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
terraform import boundary_worker.foo <my-id>
|
||||
@@ -0,0 +1,13 @@
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 1"
|
||||
description = "self managed worker with controlled led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
|
||||
resource "boundary_self_managed_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "worker 2"
|
||||
description = "self managed worker with controlled led auth"
|
||||
worker_generated_auth_token = var.worker_generated_auth_token
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
module github.com/hashicorp/terraform-provider-boundary
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/hashicorp/boundary v0.10.2
|
||||
github.com/hashicorp/boundary/api v0.0.28
|
||||
github.com/hashicorp/boundary/sdk v0.0.20
|
||||
github.com/hashicorp/boundary v0.11.1
|
||||
github.com/hashicorp/boundary/api v0.0.32
|
||||
github.com/hashicorp/boundary/sdk v0.0.26
|
||||
github.com/hashicorp/cap v0.2.0
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20220722192355-a843f53fa48d
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20221122211539-47c893099f13
|
||||
github.com/hashicorp/go-secure-stdlib/configutil/v2 v2.0.5
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.2
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.3
|
||||
github.com/hashicorp/terraform-plugin-docs v0.13.0
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0
|
||||
github.com/kr/pretty v0.3.0
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
|
||||
github.com/kr/pretty v0.3.1
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/stretchr/testify v1.8.0
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
|
||||
github.com/stretchr/testify v1.8.1
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -55,11 +55,11 @@ require (
|
||||
github.com/golang-migrate/migrate/v4 v4.15.1 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect
|
||||
github.com/hashicorp/dbassert v0.0.0-20210708202608-ecf920cf1ed8 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/eventlogger v0.1.1-0.20211106154408-4ff8da3a890c // indirect
|
||||
@@ -67,13 +67,13 @@ require (
|
||||
github.com/hashicorp/go-bexpr v0.1.10 // indirect
|
||||
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220412153211-c470aec9369f // indirect
|
||||
github.com/hashicorp/go-hclog v1.2.1 // indirect
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220910135738-ed4505749995 // indirect
|
||||
github.com/hashicorp/go-hclog v1.2.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20220711120347-32232bae6803 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20221122211539-47c893099f13 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.4.4 // indirect
|
||||
github.com/hashicorp/go-plugin v1.4.6 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
|
||||
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/base62 v0.1.2 // indirect
|
||||
@@ -90,12 +90,12 @@ require (
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hc-install v0.4.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.15.0 // indirect
|
||||
github.com/hashicorp/logutils v1.0.0 // indirect
|
||||
github.com/hashicorp/nodeenrollment v0.1.13 // indirect
|
||||
github.com/hashicorp/terraform-exec v0.17.2 // indirect
|
||||
github.com/hashicorp/nodeenrollment v0.1.17 // indirect
|
||||
github.com/hashicorp/terraform-exec v0.17.3 // indirect
|
||||
github.com/hashicorp/terraform-json v0.14.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.1 // indirect
|
||||
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
|
||||
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
|
||||
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
|
||||
@@ -105,24 +105,24 @@ require (
|
||||
github.com/huandu/xstrings v1.3.2 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
|
||||
github.com/jackc/pgconn v1.10.1 // indirect
|
||||
github.com/jackc/pgconn v1.12.1 // indirect
|
||||
github.com/jackc/pgio v1.0.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
|
||||
github.com/jackc/pgproto3/v2 v2.3.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
|
||||
github.com/jackc/pgtype v1.9.0 // indirect
|
||||
github.com/jackc/pgx/v4 v4.14.0 // indirect
|
||||
github.com/jackc/pgtype v1.11.0 // indirect
|
||||
github.com/jackc/pgx/v4 v4.16.1 // indirect
|
||||
github.com/jefferai/go-libsecret v0.0.0-20210525195240-b53481abef97 // indirect
|
||||
github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f // indirect
|
||||
github.com/jefferai/keyring v1.1.7-0.20220316160357-58a74bb55891 // indirect
|
||||
github.com/jinzhu/gorm v1.9.12 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.3 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/lib/pq v1.10.2 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mitchellh/cli v1.1.4 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
@@ -148,7 +148,7 @@ require (
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/russross/blackfriday v1.6.0 // indirect
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/sethvargo/go-diceware v0.3.0 // indirect
|
||||
@@ -161,24 +161,25 @@ require (
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
github.com/xo/dburl v0.9.0 // indirect
|
||||
github.com/xo/dburl v0.11.0 // indirect
|
||||
github.com/zalando/go-keyring v0.2.1 // indirect
|
||||
github.com/zclconf/go-cty v1.10.0 // indirect
|
||||
github.com/zclconf/go-cty v1.12.1 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
|
||||
golang.org/x/exp v0.0.0-20220921164117-439092de6870 // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
|
||||
google.golang.org/grpc v1.48.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 // indirect
|
||||
google.golang.org/grpc v1.50.1 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gorm.io/driver/postgres v1.2.2 // indirect
|
||||
gorm.io/driver/sqlite v1.2.4 // indirect
|
||||
gorm.io/gorm v1.22.3 // indirect
|
||||
gorm.io/driver/postgres v1.3.8 // indirect
|
||||
gorm.io/driver/sqlite v1.3.6 // indirect
|
||||
gorm.io/gorm v1.23.8 // indirect
|
||||
)
|
||||
@@ -216,12 +216,8 @@ github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/cockroachdb/cockroach-go/v2 v2.1.1/go.mod h1:7NtUnP6eK+l6k483WSYNrq3Kb23bWV10IRV1TyeSpwM=
|
||||
@@ -396,7 +392,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
|
||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
|
||||
@@ -576,8 +571,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-github/v35 v35.2.0/go.mod h1:s0515YVTI+IMrDoy9Y4pHt9ShGpzHvHO8rZ7L7acgvs=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
@@ -632,15 +628,15 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0 h1:ESEyqQqXXFIcImj/BE8oKEX37Zsuceb2cZI+EL/zNCY=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0/go.mod h1:XnLCLFp3tjoZJszVKjfpyAK6J8sYIcQXWQxmqLWF21I=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg=
|
||||
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
|
||||
github.com/hashicorp/boundary v0.10.2 h1:H7LZfrFhbpeSCVbBYm12kdxZROmsMAQiei3h394vKSE=
|
||||
github.com/hashicorp/boundary v0.10.2/go.mod h1:tbGVtMp1BTrTlVRgSuhbpneLcVocKI4o1tr+iSHxxD4=
|
||||
github.com/hashicorp/boundary/api v0.0.28 h1:IiDUI7od2+uWovKpZbmWTLzH9XSL+s4MVip5CdRNw5k=
|
||||
github.com/hashicorp/boundary/api v0.0.28/go.mod h1:Z9AFpuJ3ZojUDD542CWxD28tYCYypBT4jsa+ANSLMLY=
|
||||
github.com/hashicorp/boundary/sdk v0.0.20 h1:coETbBGtWLNqqkqabwgVGbC8g4ajXFSFzFC2ng8OF6o=
|
||||
github.com/hashicorp/boundary/sdk v0.0.20/go.mod h1:LQJL4dxljJc1rhsc8j0IC+P5vh8Ttr7onfqGGDFzd2w=
|
||||
github.com/hashicorp/boundary v0.11.1 h1:uv6tJDeO3/tLSs/KusCBtpaN5788HaAgLWSQkdJWgVw=
|
||||
github.com/hashicorp/boundary v0.11.1/go.mod h1:P/dLuatZTHoXDVABg4kqIreX+sspe3ww+QdTgpYRuwo=
|
||||
github.com/hashicorp/boundary/api v0.0.32 h1:vgz8rCkqCgXYX65646WXf+Mu+jiXOw766woOwUGY2Bs=
|
||||
github.com/hashicorp/boundary/api v0.0.32/go.mod h1:yroNrsyCVCSEKnrbyDeyS2iO0aMq7BTYtAptZWgIb60=
|
||||
github.com/hashicorp/boundary/sdk v0.0.26 h1:8L1sZnpVcWB2b8IrSAVuDTP+WEOt63pYlBvRi2Q8pWA=
|
||||
github.com/hashicorp/boundary/sdk v0.0.26/go.mod h1:rriE6QxdGmK8zDenGdeKDcZewVl8tzUdXOYTBf8uj+Y=
|
||||
github.com/hashicorp/cap v0.2.0 h1:Cgr1iDczX17y0PNF5VG+bWTtDiimYL8F18izMPbWNy4=
|
||||
github.com/hashicorp/cap v0.2.0/go.mod h1:zb3VvIFA0lM2lbmO69NjowV9dJzJnZS89TaM9blXPJA=
|
||||
github.com/hashicorp/dbassert v0.0.0-20210708202608-ecf920cf1ed8 h1:/3iubtqEdLgdXB6ue+WAKvbcpn313jjL5mQvU5ByymE=
|
||||
@@ -663,26 +659,26 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637 h1:Ud/6/AdmJ1R7ibdS0Wo5MWPj0T1R0fkpaD087bBaW8I=
|
||||
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220412153211-c470aec9369f h1:W9IOXASfpDhDY/msdD15bc92IhRVehphYcbVyxYxUUk=
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220412153211-c470aec9369f/go.mod h1:w9gD0GS/RPaf1BQ//LmdWfQpW8SFwamwL1hmtzQ58p0=
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220910135738-ed4505749995 h1:+cSg/gVZ1RMFeZbZoQTbNu8pnb30bDQ6jysmKBKDSvg=
|
||||
github.com/hashicorp/go-dbw v0.0.0-20220910135738-ed4505749995/go.mod h1:+GVM0D4y16TzXQWrVZKv3cjNHF2M7cHEBPaDAON3V6I=
|
||||
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
|
||||
github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw=
|
||||
github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M=
|
||||
github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g=
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20220711120347-32232bae6803 h1:PdSXkY+aAn/19A+lorRNXkfu5zQ9eZTBMNyLdHpeW0c=
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20220711120347-32232bae6803/go.mod h1:tTUGkZXcXW2y6A2Z8o2CVxHKSPNgDfUHLBhHCJb0Lts=
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20221122211539-47c893099f13 h1:486QccSsJAKonkWSZmBn5GWzZCW3UV3OwMoOGUXJBO4=
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20221122211539-47c893099f13/go.mod h1:qbLdiZhFd182vRSOlhBV/OarUcJVTOF2WklPwHs8mYQ=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2 h1:it114Kjpk79JVh6AfxFMP5oi1gb+RPzcSLiG3zF/J0w=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2/go.mod h1:b9mq0bG5xJ10ZcTEQJLZ22O9y71hIt2MGTLqROA/SAM=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20220722192355-a843f53fa48d h1:mOtPXWIp4cWKNt9S55IuYAdyUgNtCfUAEVIjcXDx59E=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20220722192355-a843f53fa48d/go.mod h1:sDQAfwJGv25uGPZA04x87ERglCG6avnRcBT9wYoMII8=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20221122211539-47c893099f13 h1:4YewFQjQJNAzXtahRax77IFi0emoYvPZGESfi+KCpGg=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.6-0.20221122211539-47c893099f13/go.mod h1:sDQAfwJGv25uGPZA04x87ERglCG6avnRcBT9wYoMII8=
|
||||
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
@@ -690,8 +686,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
|
||||
github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ=
|
||||
github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
|
||||
github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA=
|
||||
github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4=
|
||||
@@ -715,8 +711,8 @@ github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo=
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.2 h1:4I1pot2HFhZmXbZL6X2dS0EGR6flsxd+FpaL/BpTXF0=
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.2/go.mod h1:M+NBT0f9tDBLuhZFAwUwQjAcxMLmwEyHiPQm1O2pBVs=
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.3 h1:2RnQ/iL17y9FIwGR+ZaPj7fMn2uzdZT+T5ptCi97q8c=
|
||||
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.3/go.mod h1:M+NBT0f9tDBLuhZFAwUwQjAcxMLmwEyHiPQm1O2pBVs=
|
||||
github.com/hashicorp/go-secure-stdlib/reloadutil v0.1.1 h1:SMGUnbpAcat8rIKHkBPjfv81yC46a8eCNZ2hsR2l1EI=
|
||||
github.com/hashicorp/go-secure-stdlib/reloadutil v0.1.1/go.mod h1:Ch/bf00Qnx77MZd49JRgHYqHQjtEmTgGU2faufpVZb0=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U=
|
||||
@@ -744,24 +740,24 @@ github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH9
|
||||
github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0=
|
||||
github.com/hashicorp/hcl/v2 v2.15.0 h1:CPDXO6+uORPjKflkWCCwoWc9uRp+zSIPcCQ+BrxV7m8=
|
||||
github.com/hashicorp/hcl/v2 v2.15.0/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng=
|
||||
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/nodeenrollment v0.1.13 h1:h830EbaWqt1wyRi3DERDtUHLW3tXl4cLfbVkPeD5Twc=
|
||||
github.com/hashicorp/nodeenrollment v0.1.13/go.mod h1:LIPKi+g0g/vl3xhpbzugCalHSxX1PMeqnatkAsxRgyM=
|
||||
github.com/hashicorp/terraform-exec v0.17.2 h1:EU7i3Fh7vDUI9nNRdMATCEfnm9axzTnad8zszYZ73Go=
|
||||
github.com/hashicorp/terraform-exec v0.17.2/go.mod h1:tuIbsL2l4MlwwIZx9HPM+LOV9vVyEfBYu2GsO1uH3/8=
|
||||
github.com/hashicorp/nodeenrollment v0.1.17 h1:ZaGNugd3EOZIdJxgC5bUA1CbHZ/OKZcgXnquzoFql6E=
|
||||
github.com/hashicorp/nodeenrollment v0.1.17/go.mod h1:N5gYsm8mWiDfIw/j+1IQ6NBO1cWCmhPpvQ9GB1QUnsU=
|
||||
github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU=
|
||||
github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI=
|
||||
github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s=
|
||||
github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY=
|
||||
github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ=
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4=
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE=
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.1 h1:cwZzPYla82XwAqpLhSzdVsOMU+6H29tczAwrB0z9Zek=
|
||||
github.com/hashicorp/terraform-plugin-go v0.14.1/go.mod h1:Bc/K6K26BQ2FHqIELPbpKtt2CzzbQou+0UQF3/0NsCQ=
|
||||
github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs=
|
||||
github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0 h1:eIJjFlI4k6BMso6Wq/bq56U0RukXc4JbwJJ8Oze2/tg=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0/go.mod h1:mYPs/uchNcBq7AclQv9QUtSf9iNcfp1Ag21jqTlDf2M=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM=
|
||||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1/go.mod h1:+tNlb0wkfdsDJ7JEiERLz4HzM19HyiuIoGzTsM7rPpw=
|
||||
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c h1:D8aRO6+mTqHfLsK/BC3j5OAoogv1WLRWzY1AaTo3rBg=
|
||||
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI=
|
||||
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0=
|
||||
@@ -802,9 +798,8 @@ github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpT
|
||||
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
|
||||
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
|
||||
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
||||
github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
||||
github.com/jackc/pgconn v1.10.1 h1:DzdIHIjG1AxGwoEEqS+mGsURyjt4enSmqzACXvVzOT8=
|
||||
github.com/jackc/pgconn v1.10.1/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
||||
github.com/jackc/pgconn v1.12.1 h1:rsDFzIpRk7xT4B8FufgpCCeyjdNpKyghZeSefViE5W8=
|
||||
github.com/jackc/pgconn v1.12.1/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono=
|
||||
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
|
||||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
|
||||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
|
||||
@@ -823,8 +818,8 @@ github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwX
|
||||
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgproto3/v2 v2.0.7/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns=
|
||||
github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgproto3/v2 v2.3.0 h1:brH0pCGBDkBW07HWlN/oSBXrmo3WB0UvZd1pIuDcL8Y=
|
||||
github.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
||||
github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
||||
@@ -836,9 +831,8 @@ github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkAL
|
||||
github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ=
|
||||
github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig=
|
||||
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
|
||||
github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgtype v1.9.0 h1:/SH1RxEtltvJgsDqp3TbiTFApD3mey3iygpuEGeuBXk=
|
||||
github.com/jackc/pgtype v1.9.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgtype v1.11.0 h1:u4uiGPz/1hryuXzyaBhSk6dnIyyG2683olG2OV+UUgs=
|
||||
github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
||||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
|
||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
||||
@@ -847,15 +841,14 @@ github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6
|
||||
github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg=
|
||||
github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA=
|
||||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
||||
github.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0=
|
||||
github.com/jackc/pgx/v4 v4.14.0 h1:TgdrmgnM7VY72EuSQzBbBd4JA1RLqJolrw9nQVZABVc=
|
||||
github.com/jackc/pgx/v4 v4.14.0/go.mod h1:jT3ibf/A0ZVCp89rtCIN0zCJxcE74ypROmHEZYsG/j8=
|
||||
github.com/jackc/pgx/v4 v4.16.1 h1:JzTglcal01DrghUqt+PmzWsZx/Yh7SC/CTQmSBMTd0Y=
|
||||
github.com/jackc/pgx/v4 v4.16.1/go.mod h1:SIhx0D5hoADaiXZVyv+3gSm3LCIIINTVO0PficsvWGQ=
|
||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
|
||||
@@ -880,9 +873,9 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI=
|
||||
github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
@@ -932,8 +925,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
@@ -986,9 +979,10 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
|
||||
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcBZzsIDwmw9uTHzw=
|
||||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
|
||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
@@ -1178,10 +1172,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
|
||||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
@@ -1242,8 +1235,9 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
@@ -1254,8 +1248,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
@@ -1298,8 +1293,8 @@ github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xo/dburl v0.9.0 h1:ME8QfRqZz/YDwf+VVEe9sq4wgEZCAOdYcUTeuAf+wQQ=
|
||||
github.com/xo/dburl v0.9.0/go.mod h1:7Uupe87dIDxNrbKFRrpw6bAf2l3/rqU42iwlpq1nyjY=
|
||||
github.com/xo/dburl v0.11.0 h1:AVtiIKI5VpKdfuEBvTEMsLoY3MW6+uHTm5Eeuvt6Olo=
|
||||
github.com/xo/dburl v0.11.0/go.mod h1:3i+BAX1bQngTMtk8dtGUTTUviVymLIViDtYHDP5NTMU=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/yhat/scrape v0.0.0-20161128144610-24b7890b0945/go.mod h1:4vRFPPNYllgCacoj+0FoKOjTW68rUhEfqPLiEJaK2w8=
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
|
||||
@@ -1315,8 +1310,9 @@ github.com/zalando/go-keyring v0.2.1 h1:MBRN/Z8H4U5wEKXiD67YbDAr5cj/DOStmSga70/2
|
||||
github.com/zalando/go-keyring v0.2.1/go.mod h1:g63M2PPn0w5vjmEbwAX3ib5I+41zdm4esSETOn9Y6Dw=
|
||||
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
|
||||
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
|
||||
github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0=
|
||||
github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
|
||||
github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY=
|
||||
github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA=
|
||||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE=
|
||||
@@ -1382,8 +1378,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
|
||||
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -1398,6 +1394,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
|
||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20220921164117-439092de6870 h1:j8b6j9gzSigH28O5SjSpQSSh9lFd6f5D/q0aHjNTulc=
|
||||
golang.org/x/exp v0.0.0-20220921164117-439092de6870/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
@@ -1495,8 +1493,8 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20211013171255-e13a2654a71e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -1513,8 +1511,8 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM=
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c h1:q3gFqPqH7NVofKo3c3yETAP//pPI+G5mvB7qqj1Y5kY=
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -1526,8 +1524,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
||||
golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1637,8 +1635,8 @@ golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b h1:2n253B2r0pYSmEV+UNCQoPfU/FiaizQEK5Gu4Bq4JE8=
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
||||
@@ -1734,7 +1732,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -1842,8 +1840,8 @@ google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm
|
||||
google.golang.org/genproto v0.0.0-20210721163202-f1cecdd8b78a/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20210726143408-b02e89920bf0/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
||||
google.golang.org/genproto v0.0.0-20211013025323-ce878158c4d4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg=
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
|
||||
google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno=
|
||||
google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
|
||||
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
@@ -1876,9 +1874,8 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
|
||||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
|
||||
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||
google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY=
|
||||
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
@@ -1944,15 +1941,16 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg=
|
||||
gorm.io/driver/postgres v1.2.2 h1:Ka9W6feOU+rPM9m007eYLMD4QoZuYGBnQ3Jp0faGSwg=
|
||||
gorm.io/driver/postgres v1.2.2/go.mod h1:Ik3tK+a3FMp8ORZl29v4b3M0RsgXsaeMXh9s9eVMXco=
|
||||
gorm.io/driver/sqlite v1.2.4 h1:jx16ESo1WzNjgBJNSbhEDoMKJnlhkU8BuBR2C0GC7D8=
|
||||
gorm.io/driver/sqlite v1.2.4/go.mod h1:n8/CTEIEmo7lKrehQI4pd+rz6O514tMkBeCAR5UTXLs=
|
||||
gorm.io/driver/postgres v1.3.8 h1:8bEphSAB69t3odsCR4NDzt581iZEWQuRM27Cg6KgfPY=
|
||||
gorm.io/driver/postgres v1.3.8/go.mod h1:qB98Aj6AhRO/oyu/jmZsi/YM9g6UzVCjMxO/6frFvcA=
|
||||
gorm.io/driver/sqlite v1.3.6 h1:Fi8xNYCUplOqWiPa3/GuCeowRNBRGTf62DEmhMDHeQQ=
|
||||
gorm.io/driver/sqlite v1.3.6/go.mod h1:Sg1/pvnKtbQ7jLXxfZa+jSHvoX8hoZA8cn4xllOMTgE=
|
||||
gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
|
||||
gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
|
||||
gorm.io/gorm v1.22.2/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
||||
gorm.io/gorm v1.22.3 h1:/JS6z+GStEQvJNW3t1FTwJwG/gZ+A7crFdRqtvG5ehA=
|
||||
gorm.io/gorm v1.22.3/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
||||
gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.23.6/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.23.8 h1:h8sGJ+biDgBA1AD1Ha9gFCx7h8npU7AsLdlkX0n2TpE=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
@@ -60,6 +61,11 @@ func New() *schema.Provider {
|
||||
Optional: true,
|
||||
Description: "When set to true, does not validate the Boundary API endpoint certificate",
|
||||
},
|
||||
"plugin_execution_dir": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: `Specifies a directory that the Boundary provider can use to write and execute its built-in plugins.`,
|
||||
},
|
||||
},
|
||||
ResourcesMap: map[string]*schema.Resource{
|
||||
"boundary_account": resourceAccount(),
|
||||
@@ -73,6 +79,7 @@ func New() *schema.Provider {
|
||||
"boundary_credential_store_static": resourceCredentialStoreStatic(),
|
||||
"boundary_credential_username_password": resourceCredentialUsernamePassword(),
|
||||
"boundary_credential_ssh_private_key": resourceCredentialSshPrivateKey(),
|
||||
"boundary_credential_json": resourceCredentialJson(),
|
||||
"boundary_managed_group": resourceManagedGroup(),
|
||||
"boundary_group": resourceGroup(),
|
||||
"boundary_host": resourceHost(),
|
||||
@@ -87,6 +94,7 @@ func New() *schema.Provider {
|
||||
"boundary_scope": resourceScope(),
|
||||
"boundary_target": resourceTarget(),
|
||||
"boundary_user": resourceUser(),
|
||||
"boundary_worker": resourceWorker(),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -115,11 +123,22 @@ func providerAuthenticate(ctx context.Context, d *schema.ResourceData, md *metaD
|
||||
if err != nil {
|
||||
return fmt.Errorf(`error reading data from "recovery_kms_hcl": %v`, err)
|
||||
}
|
||||
wrapper, _, err := wrapper.GetWrapperFromHcl(ctx, recoveryHclStr, "recovery",
|
||||
configutil.WithPluginOptions(
|
||||
pluginutil.WithPluginsMap(kms_plugin_assets.BuiltinKmsPlugins()),
|
||||
pluginutil.WithPluginsFilesystem(kms_plugin_assets.KmsPluginPrefix, kms_plugin_assets.FileSystem()),
|
||||
))
|
||||
|
||||
opts := []pluginutil.Option{
|
||||
pluginutil.WithPluginsMap(kms_plugin_assets.BuiltinKmsPlugins()),
|
||||
pluginutil.WithPluginsFilesystem(kms_plugin_assets.KmsPluginPrefix, kms_plugin_assets.FileSystem()),
|
||||
}
|
||||
|
||||
if execDir, ok := d.GetOk("plugin_execution_dir"); ok {
|
||||
opts = append(opts, pluginutil.WithPluginExecutionDirectory(execDir.(string)))
|
||||
}
|
||||
|
||||
// TODO: cleanup plugin when finished
|
||||
wrapper, _, err := wrapper.GetWrapperFromHcl(
|
||||
ctx,
|
||||
recoveryHclStr,
|
||||
"recovery",
|
||||
configutil.WithPluginOptions(opts...))
|
||||
if err != nil {
|
||||
return fmt.Errorf(`error reading wrappers from "recovery_kms_hcl": %v`, err)
|
||||
}
|
||||
@@ -159,6 +178,15 @@ func providerAuthenticate(ctx context.Context, d *schema.ResourceData, md *metaD
|
||||
|
||||
at, err := am.Authenticate(ctx, authMethodId.(string), "login", credentials)
|
||||
if err != nil {
|
||||
if apiErr := api.AsServerError(err); apiErr != nil {
|
||||
statusCode := apiErr.Response().StatusCode()
|
||||
if statusCode == http.StatusNotFound {
|
||||
return fmt.Errorf("unknown auth_method_id: %s", err.Error())
|
||||
}
|
||||
if statusCode == http.StatusUnauthorized {
|
||||
return fmt.Errorf("invalid login name or password: %s", err.Error())
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
md.client.SetToken(at.Attributes["token"].(string))
|
||||
|
||||
@@ -60,7 +60,7 @@ func resourceAccount() *schema.Resource {
|
||||
Description: "The account password. Only set on create, changes will not be reflected when updating account.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
|
||||
Sensitive: true,
|
||||
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
|
||||
if d.Id() == "" {
|
||||
// This is a new resource do not suppress password diff
|
||||
|
||||
@@ -65,7 +65,7 @@ func resourceAccountPassword() *schema.Resource {
|
||||
Description: "The account password. Only set on create, changes will not be reflected when updating account.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
|
||||
Sensitive: true,
|
||||
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
|
||||
if d.Id() == "" {
|
||||
// This is a new resource do not suppress password diff
|
||||
|
||||
@@ -99,6 +99,7 @@ func resourceAuthMethodOidc() *schema.Resource {
|
||||
Description: "The secret key assigned to this auth method from the provider. Once set, only the hash will be kept and the original value can be removed from configuration.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Sensitive: true,
|
||||
},
|
||||
authmethodOidcIssuerKey: {
|
||||
Description: "The issuer corresponding to the provider, which must match the issuer field in generated tokens.",
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/credentials"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
credentialJsonCredentialType = "json"
|
||||
credentialJsonObjectKey = "object"
|
||||
credentialJsonObjectHmacKey = "object_hmac"
|
||||
)
|
||||
|
||||
func resourceCredentialJson() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The json credential resource allows you to congiure a credential using a json object.",
|
||||
|
||||
CreateContext: resourceCredentialJsonCreate,
|
||||
ReadContext: resourceCredentialJsonRead,
|
||||
UpdateContext: resourceCredentialJsonUpdate,
|
||||
DeleteContext: resourceCredentialJsonDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
IDKey: {
|
||||
Description: "The ID of this json credential.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
NameKey: {
|
||||
Description: "The name of this json credential. Defaults to the resource name.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
DescriptionKey: {
|
||||
Description: "The description of this json credential.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
credentialStoreIdKey: {
|
||||
Description: "The credential store in which to save this json credential.",
|
||||
Type: schema.TypeString,
|
||||
ForceNew: true,
|
||||
Required: true,
|
||||
},
|
||||
credentialJsonObjectKey: {
|
||||
Description: `The object for the this json credential. Either values encoded with the "jsonencode" function, pre-escaped JSON string, or a file`,
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Sensitive: true,
|
||||
},
|
||||
credentialJsonObjectHmacKey: {
|
||||
Description: "The object hmac.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func setFromCredentialJsonResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error {
|
||||
if err := d.Set(NameKey, raw[NameKey]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(DescriptionKey, raw[DescriptionKey]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(credentialStoreIdKey, raw[credentialStoreIdKey]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if attrsVal, ok := raw["attributes"]; ok {
|
||||
attrs := attrsVal.(map[string]interface{})
|
||||
stateObjectHmac := d.Get(credentialJsonObjectHmacKey)
|
||||
boundaryObjectHmac := attrs[credentialJsonObjectHmacKey].(string)
|
||||
if stateObjectHmac.(string) != boundaryObjectHmac && fromRead {
|
||||
if err := d.Set(credentialJsonObjectKey, "(changed in Boundary)"); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := d.Set(credentialJsonObjectHmacKey, boundaryObjectHmac); err != nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
d.SetId(raw["id"].(string))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceCredentialJsonCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var opts []credentials.Option
|
||||
if v, ok := d.GetOk(NameKey); ok {
|
||||
opts = append(opts, credentials.WithName(v.(string)))
|
||||
}
|
||||
if v, ok := d.GetOk(DescriptionKey); ok {
|
||||
opts = append(opts, credentials.WithDescription(v.(string)))
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk(credentialJsonObjectKey); ok {
|
||||
var jsonObject map[string]interface{}
|
||||
if err := json.Unmarshal([]byte(v.(string)), &jsonObject); err != nil {
|
||||
return diag.Errorf("error unmarshaling json: %v", err)
|
||||
}
|
||||
opts = append(opts, credentials.WithJsonCredentialObject(jsonObject))
|
||||
}
|
||||
|
||||
var credentialStoreId string
|
||||
retrievedStoreId, ok := d.GetOk(credentialStoreIdKey)
|
||||
if ok {
|
||||
credentialStoreId = retrievedStoreId.(string)
|
||||
} else {
|
||||
return diag.Errorf("credential store id is unset")
|
||||
}
|
||||
|
||||
client := credentials.NewClient(md.client)
|
||||
cred, err := client.Create(ctx, credentialJsonCredentialType, credentialStoreId, opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error creating credential: %v", err)
|
||||
}
|
||||
if cred == nil {
|
||||
return diag.Errorf("nil credential after create")
|
||||
}
|
||||
|
||||
if err := setFromCredentialJsonResponseMap(d, cred.GetResponse().Map, false); err != nil {
|
||||
return diag.Errorf("error generating credential from response map: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceCredentialJsonRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
client := credentials.NewClient(md.client)
|
||||
|
||||
cred, err := client.Read(ctx, d.Id())
|
||||
if err != nil {
|
||||
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
return diag.Errorf("error reading credential: %v", err)
|
||||
}
|
||||
if cred == nil {
|
||||
return diag.Errorf("credential nil after read")
|
||||
}
|
||||
|
||||
if err := setFromCredentialJsonResponseMap(d, cred.GetResponse().Map, true); err != nil {
|
||||
return diag.Errorf("error generating credential from response map: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceCredentialJsonUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
client := credentials.NewClient(md.client)
|
||||
|
||||
var opts []credentials.Option
|
||||
if d.HasChange(NameKey) {
|
||||
opts = append(opts, credentials.DefaultName())
|
||||
if v, ok := d.GetOk(NameKey); ok {
|
||||
opts = append(opts, credentials.WithName(v.(string)))
|
||||
}
|
||||
}
|
||||
|
||||
if d.HasChange(DescriptionKey) {
|
||||
opts = append(opts, credentials.DefaultDescription())
|
||||
if v, ok := d.GetOk(DescriptionKey); ok {
|
||||
opts = append(opts, credentials.WithDescription(v.(string)))
|
||||
}
|
||||
}
|
||||
|
||||
if d.HasChange(credentialJsonObjectKey) {
|
||||
if v, ok := d.GetOk(credentialJsonObjectKey); ok {
|
||||
var jsonObject map[string]interface{}
|
||||
if err := json.Unmarshal([]byte(v.(string)), &jsonObject); err != nil {
|
||||
return diag.Errorf("error unmarshaling json: %v", err)
|
||||
}
|
||||
opts = append(opts, credentials.WithJsonCredentialObject(jsonObject))
|
||||
}
|
||||
}
|
||||
|
||||
if len(opts) > 0 {
|
||||
opts = append(opts, credentials.WithAutomaticVersioning(true))
|
||||
credUpdate, err := client.Update(ctx, d.Id(), 0, opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error updating credential: %v", err)
|
||||
}
|
||||
if credUpdate == nil {
|
||||
return diag.Errorf("credential nil after update")
|
||||
}
|
||||
|
||||
if err = setFromCredentialJsonResponseMap(d, credUpdate.GetResponse().Map, false); err != nil {
|
||||
return diag.Errorf("error generating credential from response map: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceCredentialJsonDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
client := credentials.NewClient(md.client)
|
||||
|
||||
_, err := client.Delete(ctx, d.Id())
|
||||
if err != nil {
|
||||
return diag.Errorf("error deleting credential: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/credentials"
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
|
||||
)
|
||||
|
||||
const (
|
||||
jsonCredResc = "boundary_credential_json.example"
|
||||
jsonCredName = "bar"
|
||||
jsonCredNameUpdate = "foo"
|
||||
jsonCredDesc = "the bar"
|
||||
jsonCredDescUpdate = "the foo"
|
||||
jsonCredObj = `jsonencode({
|
||||
password = "password",
|
||||
username = "admin"
|
||||
})`
|
||||
jsonCredObjUpdate = `jsonencode({
|
||||
password = "password",
|
||||
username = "db-admin"
|
||||
})`
|
||||
)
|
||||
|
||||
func jsonCredResource(name, description, object string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "boundary_credential_store_static" "example" {
|
||||
name = "static store name"
|
||||
description = "static store description"
|
||||
scope_id = boundary_scope.proj1.id
|
||||
depends_on = [boundary_role.proj1_admin]
|
||||
}
|
||||
|
||||
resource "boundary_credential_json" "example" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_static.example.id
|
||||
object = %s
|
||||
}`, name, description, object)
|
||||
}
|
||||
|
||||
func TestAccCredentialJson(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
|
||||
res := jsonCredResource(
|
||||
jsonCredName,
|
||||
jsonCredDesc,
|
||||
jsonCredObj,
|
||||
)
|
||||
|
||||
resUpdate := jsonCredResource(
|
||||
jsonCredNameUpdate,
|
||||
jsonCredDescUpdate,
|
||||
jsonCredObjUpdate,
|
||||
)
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
CheckDestroy: testAccCheckCredentialJsonResourceDestroy(t, provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
// create
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, res),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(jsonCredResc, NameKey, jsonCredName),
|
||||
resource.TestCheckResourceAttr(jsonCredResc, DescriptionKey, jsonCredDesc),
|
||||
resource.TestCheckResourceAttr(jsonCredResc, credentialJsonObjectKey, `{"password":"password","username":"admin"}`),
|
||||
|
||||
testAccCheckCredentialJsonObjectHmac(provider),
|
||||
testAccCheckCredentialJsonResourceExists(provider, jsonCredResc),
|
||||
),
|
||||
},
|
||||
importStep(jsonCredResc, credentialJsonObjectKey),
|
||||
{
|
||||
// update
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, resUpdate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(jsonCredResc, NameKey, jsonCredNameUpdate),
|
||||
resource.TestCheckResourceAttr(jsonCredResc, DescriptionKey, jsonCredDescUpdate),
|
||||
resource.TestCheckResourceAttr(jsonCredResc, credentialJsonObjectKey, `{"password":"password","username":"db-admin"}`),
|
||||
|
||||
testAccCheckCredentialJsonObjectHmac(provider),
|
||||
testAccCheckCredentialJsonResourceExists(provider, jsonCredResc),
|
||||
),
|
||||
},
|
||||
importStep(jsonCredResc, credentialJsonObjectKey),
|
||||
{
|
||||
// Run a plan only update and verify no changes
|
||||
PlanOnly: true,
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, resUpdate),
|
||||
},
|
||||
importStep(jsonCredResc, credentialJsonObjectKey),
|
||||
{
|
||||
// update again but apply a preConfig to externally update resource
|
||||
PreConfig: func() { jsonCredExternalUpdate(t, provider) },
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, resUpdate),
|
||||
},
|
||||
importStep(jsonCredResc, credentialJsonObjectKey),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func testAccCheckCredentialJsonResourceDestroy(t *testing.T, testProvider *schema.Provider) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
if testProvider.Meta() == nil {
|
||||
t.Fatal("got nil provider metadata")
|
||||
}
|
||||
md := testProvider.Meta().(*metaData)
|
||||
|
||||
for _, rs := range s.RootModule().Resources {
|
||||
switch rs.Type {
|
||||
case "boundary_credential_json":
|
||||
id := rs.Primary.ID
|
||||
|
||||
c := credentials.NewClient(md.client)
|
||||
_, err := c.Read(context.Background(), id)
|
||||
if apiErr := api.AsServerError(err); apiErr == nil || apiErr.Response().StatusCode() != http.StatusNotFound {
|
||||
return fmt.Errorf("didn't get a 404 when reading destroyed json credential %q: %v", id, err)
|
||||
}
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckCredentialJsonResourceExists(testProvider *schema.Provider, name string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[name]
|
||||
if !ok {
|
||||
return fmt.Errorf("not found: %s", name)
|
||||
}
|
||||
|
||||
id := rs.Primary.ID
|
||||
if id == "" {
|
||||
return fmt.Errorf("no ID is set")
|
||||
}
|
||||
storeId = id
|
||||
|
||||
md := testProvider.Meta().(*metaData)
|
||||
c := credentials.NewClient(md.client)
|
||||
if _, err := c.Read(context.Background(), id); err != nil {
|
||||
return fmt.Errorf("got an error reading %q: %w", id, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckCredentialJsonObjectHmac(testProvider *schema.Provider) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[jsonCredResc]
|
||||
if !ok {
|
||||
return fmt.Errorf("not found: %s", jsonCredResc)
|
||||
}
|
||||
|
||||
computed := rs.Primary.Attributes["object_hmac"]
|
||||
if len(computed) != 43 {
|
||||
return fmt.Errorf("Computed password hmac not the expected length of 43 characters. hmac: %q", computed)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func jsonCredExternalUpdate(t *testing.T, testProvider *schema.Provider) {
|
||||
if storeId == "" {
|
||||
t.Fatal("storeId must be set before testing an external update")
|
||||
}
|
||||
|
||||
md := testProvider.Meta().(*metaData)
|
||||
c := credentials.NewClient(md.client)
|
||||
cr, err := c.Read(context.Background(), storeId)
|
||||
if err != nil {
|
||||
t.Fatal(fmt.Errorf("got an error reading %q: %w", storeId, err))
|
||||
}
|
||||
|
||||
// update credential options
|
||||
var opts []credentials.Option
|
||||
opts = append(opts, credentials.WithDescription("this is an updated description"))
|
||||
|
||||
_, err = c.Update(context.Background(), cr.Item.Id, cr.Item.Version, opts...)
|
||||
if err != nil {
|
||||
t.Fatal(fmt.Errorf("got an error updating %q: %w", cr.Item.Id, err))
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,12 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
credentialStoreIdKey = "credential_store_id"
|
||||
credentialLibraryVaultHttpMethodKey = "http_method"
|
||||
credentialLibraryVaultHttpRequestBodyKey = "http_request_body"
|
||||
credentialLibraryVaultPathKey = "path"
|
||||
credentialLibraryCredentialTypeKey = "credential_type"
|
||||
credentialStoreIdKey = "credential_store_id"
|
||||
credentialLibraryVaultHttpMethodKey = "http_method"
|
||||
credentialLibraryVaultHttpRequestBodyKey = "http_request_body"
|
||||
credentialLibraryVaultPathKey = "path"
|
||||
credentialLibraryCredentialTypeKey = "credential_type"
|
||||
credentialLibraryCredentialMappingOverridesKey = "credential_mapping_overrides"
|
||||
)
|
||||
|
||||
var libraryVaultAttrs = []string{
|
||||
@@ -78,6 +79,11 @@ func resourceCredentialLibraryVault() *schema.Resource {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
credentialLibraryCredentialMappingOverridesKey: {
|
||||
Description: "The credential mapping override.",
|
||||
Type: schema.TypeMap,
|
||||
Optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -93,6 +99,10 @@ func setFromVaultCredentialLibraryResponseMap(d *schema.ResourceData, raw map[st
|
||||
return err
|
||||
}
|
||||
|
||||
if err := d.Set(credentialLibraryCredentialMappingOverridesKey, raw[credentialLibraryCredentialMappingOverridesKey]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if attrsVal, ok := raw["attributes"]; ok {
|
||||
attrs := attrsVal.(map[string]interface{})
|
||||
for _, v := range libraryVaultAttrs {
|
||||
@@ -129,6 +139,10 @@ func resourceCredentialLibraryCreateVault(ctx context.Context, d *schema.Resourc
|
||||
if v, ok := d.GetOk(credentialLibraryCredentialTypeKey); ok {
|
||||
opts = append(opts, credentiallibraries.WithCredentialType(v.(string)))
|
||||
}
|
||||
if v, ok := d.GetOk(credentialLibraryCredentialMappingOverridesKey); ok {
|
||||
mappingOverrides := v.(map[string]interface{})
|
||||
opts = append(opts, credentiallibraries.WithCredentialMappingOverrides(mappingOverrides))
|
||||
}
|
||||
|
||||
var credentialStoreId string
|
||||
cid, ok := d.GetOk(credentialStoreIdKey)
|
||||
@@ -216,6 +230,40 @@ func resourceCredentialLibraryUpdateVault(ctx context.Context, d *schema.Resourc
|
||||
opts = append(opts, credentiallibraries.WithVaultCredentialLibraryPath(v.(string)))
|
||||
}
|
||||
}
|
||||
if d.HasChange(credentialLibraryCredentialMappingOverridesKey) {
|
||||
var oldMapping, newMapping map[string]interface{}
|
||||
old, new := d.GetChange(credentialLibraryCredentialMappingOverridesKey)
|
||||
|
||||
if old == nil {
|
||||
old = map[string]interface{}{}
|
||||
}
|
||||
oldMapping = old.(map[string]interface{})
|
||||
|
||||
if new == nil {
|
||||
new = map[string]interface{}{}
|
||||
}
|
||||
newMapping = new.(map[string]interface{})
|
||||
|
||||
newAttrs := []string{}
|
||||
for k := range newMapping {
|
||||
newAttrs = append(newAttrs, k)
|
||||
}
|
||||
|
||||
for oldAttr := range oldMapping {
|
||||
isRemoved := true
|
||||
for _, newAttr := range newAttrs {
|
||||
if oldAttr == newAttr {
|
||||
isRemoved = false
|
||||
break
|
||||
}
|
||||
}
|
||||
if isRemoved {
|
||||
newMapping[oldAttr] = nil
|
||||
}
|
||||
}
|
||||
|
||||
opts = append(opts, credentiallibraries.WithCredentialMappingOverrides(newMapping))
|
||||
}
|
||||
|
||||
if len(opts) > 0 {
|
||||
opts = append(opts, credentiallibraries.WithAutomaticVersioning(true))
|
||||
|
||||
@@ -16,24 +16,26 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
vaultCredResc = "boundary_credential_library_vault.example"
|
||||
vaultCredTypedResc = "boundary_credential_library_vault.typed_example"
|
||||
vaultCredLibName = "foo"
|
||||
vaultCredLibDesc = "the foo"
|
||||
vaultCredLibPath = "/foo/bar"
|
||||
vaultCredLibMethodGet = "GET"
|
||||
vaultCredLibMethodPost = "POST"
|
||||
vaultCredLibRequestBody = "foobar"
|
||||
vaultCredLibStringUpdate = "_random"
|
||||
vaultCredResc = "boundary_credential_library_vault.example"
|
||||
vaultCredTypedResc = "boundary_credential_library_vault.typed_example"
|
||||
vaultCredUsernamePasswordResc = "boundary_credential_library_vault.username_password_mapping_override"
|
||||
vaultCredSshPrivateKeyResc = "boundary_credential_library_vault.ssh_private_key_mapping_override"
|
||||
vaultCredLibName = "foo"
|
||||
vaultCredLibDesc = "the foo"
|
||||
vaultCredLibPath = "/foo/bar"
|
||||
vaultCredLibMethodGet = "GET"
|
||||
vaultCredLibMethodPost = "POST"
|
||||
vaultCredLibRequestBody = "foobar"
|
||||
vaultCredLibStringUpdate = "_random"
|
||||
)
|
||||
|
||||
var vaultCredLibResource = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "example" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
}`, vaultCredLibName,
|
||||
vaultCredLibDesc,
|
||||
vaultCredLibPath,
|
||||
@@ -41,12 +43,12 @@ resource "boundary_credential_library_vault" "example" {
|
||||
|
||||
var vaultCredLibResourceUpdate = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "example" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
http_request_body = "%s"
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
http_request_body = "%s"
|
||||
}`, vaultCredLibName+vaultCredLibStringUpdate,
|
||||
vaultCredLibDesc+vaultCredLibStringUpdate,
|
||||
vaultCredLibPath+vaultCredLibStringUpdate,
|
||||
@@ -66,6 +68,71 @@ resource "boundary_credential_library_vault" "typed_example" {
|
||||
vaultCredLibPath,
|
||||
vaultCredLibMethodGet)
|
||||
|
||||
var vaultUsernamePasswordMappingOverrideCredLibResource = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "username_password_mapping_override" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
credential_type = "username_password"
|
||||
credential_mapping_overrides = {
|
||||
password_attribute = "alternative_password_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}`, vaultCredLibName,
|
||||
vaultCredLibDesc,
|
||||
vaultCredLibPath,
|
||||
vaultCredLibMethodGet)
|
||||
|
||||
var vaultUsernamePasswordMappingOverrideCredLibResourceUpdate = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "username_password_mapping_override" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
credential_type = "username_password"
|
||||
credential_mapping_overrides = {
|
||||
password_attribute = "updated_password_label"
|
||||
username_attribute = "updated_username_label"
|
||||
}
|
||||
}`, vaultCredLibName,
|
||||
vaultCredLibDesc,
|
||||
vaultCredLibPath,
|
||||
vaultCredLibMethodGet)
|
||||
|
||||
var vaultUsernamePasswordMappingOverrideCredLibResourceRemove = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "username_password_mapping_override" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
credential_type = "username_password"
|
||||
}`, vaultCredLibName,
|
||||
vaultCredLibDesc,
|
||||
vaultCredLibPath,
|
||||
vaultCredLibMethodGet)
|
||||
|
||||
var vaultSshPrivateKeyMappingOverrideCredLibResource = fmt.Sprintf(`
|
||||
resource "boundary_credential_library_vault" "ssh_private_key_mapping_override" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
credential_store_id = boundary_credential_store_vault.example.id
|
||||
path = "%s"
|
||||
http_method = "%s"
|
||||
credential_type = "ssh_private_key"
|
||||
credential_mapping_overrides = {
|
||||
private_key_attribute = "alternative_key_label"
|
||||
private_key_passphrase_attribute = "alternative_passphrase_label"
|
||||
username_attribute = "alternative_username_label"
|
||||
}
|
||||
}`, vaultCredLibName,
|
||||
vaultCredLibDesc,
|
||||
vaultCredLibPath,
|
||||
vaultCredLibMethodGet)
|
||||
|
||||
func TestAccCredentialLibraryVault(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
@@ -132,6 +199,74 @@ func TestAccCredentialLibraryVault(t *testing.T) {
|
||||
),
|
||||
},
|
||||
importStep(vaultCredResc),
|
||||
|
||||
{
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, vaultCredLibResourceUpdate, vaultUsernamePasswordMappingOverrideCredLibResource),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, NameKey, vaultCredLibName),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, DescriptionKey, vaultCredLibDesc),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultPathKey, vaultCredLibPath),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpMethodKey, vaultCredLibMethodGet),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpRequestBodyKey, ""),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryCredentialTypeKey, "username_password"),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, "credential_mapping_overrides.password_attribute", "alternative_password_label"),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, "credential_mapping_overrides.username_attribute", "alternative_username_label"),
|
||||
|
||||
testAccCheckCredentialLibraryVaultResourceExists(provider, vaultCredUsernamePasswordResc),
|
||||
),
|
||||
},
|
||||
importStep(vaultCredResc),
|
||||
|
||||
{
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, vaultCredLibResourceUpdate, vaultUsernamePasswordMappingOverrideCredLibResourceUpdate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, NameKey, vaultCredLibName),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, DescriptionKey, vaultCredLibDesc),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultPathKey, vaultCredLibPath),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpMethodKey, vaultCredLibMethodGet),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpRequestBodyKey, ""),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryCredentialTypeKey, "username_password"),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, "credential_mapping_overrides.password_attribute", "updated_password_label"),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, "credential_mapping_overrides.username_attribute", "updated_username_label"),
|
||||
|
||||
testAccCheckCredentialLibraryVaultResourceExists(provider, vaultCredUsernamePasswordResc),
|
||||
),
|
||||
},
|
||||
importStep(vaultCredResc),
|
||||
|
||||
{
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, vaultCredLibResourceUpdate, vaultUsernamePasswordMappingOverrideCredLibResourceRemove),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, NameKey, vaultCredLibName),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, DescriptionKey, vaultCredLibDesc),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultPathKey, vaultCredLibPath),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpMethodKey, vaultCredLibMethodGet),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryVaultHttpRequestBodyKey, ""),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryCredentialTypeKey, "username_password"),
|
||||
resource.TestCheckResourceAttr(vaultCredUsernamePasswordResc, credentialLibraryCredentialMappingOverridesKey+".%", "0"),
|
||||
|
||||
testAccCheckCredentialLibraryVaultResourceExists(provider, vaultCredUsernamePasswordResc),
|
||||
),
|
||||
},
|
||||
importStep(vaultCredResc),
|
||||
|
||||
{
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, vaultCredLibResourceUpdate, vaultSshPrivateKeyMappingOverrideCredLibResource),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, NameKey, vaultCredLibName),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, DescriptionKey, vaultCredLibDesc),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, credentialLibraryVaultPathKey, vaultCredLibPath),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, credentialLibraryVaultHttpMethodKey, vaultCredLibMethodGet),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, credentialLibraryVaultHttpRequestBodyKey, ""),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, credentialLibraryCredentialTypeKey, "ssh_private_key"),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, "credential_mapping_overrides.private_key_attribute", "alternative_key_label"),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, "credential_mapping_overrides.private_key_passphrase_attribute", "alternative_passphrase_label"),
|
||||
resource.TestCheckResourceAttr(vaultCredSshPrivateKeyResc, "credential_mapping_overrides.username_attribute", "alternative_username_label"),
|
||||
|
||||
testAccCheckCredentialLibraryVaultResourceExists(provider, vaultCredSshPrivateKeyResc),
|
||||
),
|
||||
},
|
||||
importStep(vaultCredResc),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ func resourceCredentialSshPrivateKey() *schema.Resource {
|
||||
Description: "The private key associated with the credential.",
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Sensitive: true,
|
||||
},
|
||||
credentialSshPrivateKeyPrivateKeyHmacKey: {
|
||||
Description: "The private key hmac.",
|
||||
@@ -72,6 +73,7 @@ func resourceCredentialSshPrivateKey() *schema.Resource {
|
||||
Description: "The passphrase of the private key associated with the credential.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Sensitive: true,
|
||||
},
|
||||
credentialSshPrivateKeyPassphraseHmacKey: {
|
||||
Description: "The private key passphrase hmac.",
|
||||
|
||||
@@ -2,6 +2,7 @@ package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
@@ -123,36 +124,49 @@ func resourceCredentialStoreVault() *schema.Resource {
|
||||
}
|
||||
}
|
||||
|
||||
func setFromVaultCredentialStoreResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error {
|
||||
func setFromVaultCredentialStoreResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) diag.Diagnostics {
|
||||
if err := d.Set(NameKey, raw[NameKey]); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
if err := d.Set(DescriptionKey, raw[DescriptionKey]); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
if err := d.Set(ScopeIdKey, raw[ScopeIdKey]); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
var diags diag.Diagnostics
|
||||
csId := raw["id"]
|
||||
if attrsVal, ok := raw["attributes"]; ok {
|
||||
attrs := attrsVal.(map[string]interface{})
|
||||
for _, v := range storeVaultAttrs {
|
||||
if err := d.Set(v, attrs[v]); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
|
||||
stateTokenHmac := d.Get(credentialStoreVaultTokenHmacKey)
|
||||
boundaryTokenHmac := attrs[credentialStoreVaultTokenHmacKey].(string)
|
||||
if stateTokenHmac.(string) != boundaryTokenHmac && fromRead {
|
||||
// TokenHmac has changed in Boundary, therefore the token has changed.
|
||||
// Update token value to force tf to attempt update.
|
||||
if err := d.Set(credentialStoreVaultTokenKey, "(changed in Boundary)"); err != nil {
|
||||
return err
|
||||
boundaryTokenHmac, ok := attrs[credentialStoreVaultTokenHmacKey]
|
||||
tokenStatus := attrs["token_status"]
|
||||
switch {
|
||||
case ok:
|
||||
boundaryTokenHmacStr := boundaryTokenHmac.(string)
|
||||
stateTokenHmac := d.Get(credentialStoreVaultTokenHmacKey)
|
||||
if stateTokenHmac.(string) != boundaryTokenHmacStr && fromRead {
|
||||
// TokenHmac has changed in Boundary, therefore the token has changed.
|
||||
// Update token value to force tf to attempt update.
|
||||
if err := d.Set(credentialStoreVaultTokenKey, "(changed in Boundary)"); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := d.Set(credentialStoreVaultTokenHmacKey, boundaryTokenHmac); err != nil {
|
||||
return err
|
||||
if err := d.Set(credentialStoreVaultTokenHmacKey, boundaryTokenHmacStr); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
case tokenStatus == "expired":
|
||||
diags = append(diags, diag.Diagnostic{
|
||||
Severity: diag.Warning,
|
||||
Summary: fmt.Sprintf("Vault token has expired for credential store %q, please update.", csId),
|
||||
})
|
||||
}
|
||||
|
||||
stateClientKeyHmac := d.Get(credentialStoreVaultClientCertificateKeyHmacKey)
|
||||
@@ -164,17 +178,17 @@ func setFromVaultCredentialStoreResponseMap(d *schema.ResourceData, raw map[stri
|
||||
// ClientKeyHmac has changed in Boundary, therefore the ClientKey has changed.
|
||||
// Update ClientKey value to force tf to attempt update.
|
||||
if err := d.Set(credentialStoreVaultClientCertificateKeyKey, "(changed in Boundary)"); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
if err := d.Set(credentialStoreVaultClientCertificateKeyHmacKey, boundaryClientKeyHmac); err != nil {
|
||||
return err
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
|
||||
d.SetId(raw["id"].(string))
|
||||
d.SetId(csId.(string))
|
||||
|
||||
return nil
|
||||
return diags
|
||||
}
|
||||
|
||||
func resourceCredentialStoreVaultCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
@@ -229,8 +243,8 @@ func resourceCredentialStoreVaultCreate(ctx context.Context, d *schema.ResourceD
|
||||
return diag.Errorf("nil credential store after create")
|
||||
}
|
||||
|
||||
if err := setFromVaultCredentialStoreResponseMap(d, cr.GetResponse().Map, false); err != nil {
|
||||
return diag.Errorf("error generating credential store from response map: %v", err)
|
||||
if diagnostics := setFromVaultCredentialStoreResponseMap(d, cr.GetResponse().Map, false); diagnostics != nil {
|
||||
return diagnostics
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -252,8 +266,8 @@ func resourceCredentialStoreVaultRead(ctx context.Context, d *schema.ResourceDat
|
||||
return diag.Errorf("credential store nil after read")
|
||||
}
|
||||
|
||||
if err := setFromVaultCredentialStoreResponseMap(d, cr.GetResponse().Map, true); err != nil {
|
||||
return diag.Errorf("error generating credential store from response map: %v", err)
|
||||
if diagnostics := setFromVaultCredentialStoreResponseMap(d, cr.GetResponse().Map, true); diagnostics != nil {
|
||||
return diagnostics
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -352,8 +366,8 @@ func resourceCredentialStoreVaultUpdate(ctx context.Context, d *schema.ResourceD
|
||||
return diag.Errorf("credential store nil after update")
|
||||
}
|
||||
|
||||
if err = setFromVaultCredentialStoreResponseMap(d, crUpdate.GetResponse().Map, false); err != nil {
|
||||
return diag.Errorf("error generating credential store from response map: %v", err)
|
||||
if diagnostics := setFromVaultCredentialStoreResponseMap(d, crUpdate.GetResponse().Map, false); diagnostics != nil {
|
||||
return diagnostics
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ func resourceCredentialUsernamePassword() *schema.Resource {
|
||||
Description: "The password of this username/password credential.",
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Sensitive: true,
|
||||
},
|
||||
credentialUsernamePasswordPasswordHmacKey: {
|
||||
Description: "The password hmac.",
|
||||
|
||||
@@ -75,7 +75,7 @@ func setFromGroupResponseMap(d *schema.ResourceData, raw map[string]interface{})
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceGroupCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
func resourceGroupCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var scopeId string
|
||||
@@ -108,7 +108,12 @@ func resourceGroupCreate(ctx context.Context, d *schema.ResourceData, meta inter
|
||||
if gcr == nil {
|
||||
return diag.Errorf("group nil after create")
|
||||
}
|
||||
raw := gcr.GetResponse().Map
|
||||
apiResponse := gcr.GetResponse().Map
|
||||
defer func() {
|
||||
if err := setFromGroupResponseMap(d, apiResponse); err != nil {
|
||||
errs = append(errs, diag.FromErr(err)...)
|
||||
}
|
||||
}()
|
||||
|
||||
if val, ok := d.GetOk(groupMemberIdsKey); ok {
|
||||
list := val.(*schema.Set).List()
|
||||
@@ -118,16 +123,12 @@ func resourceGroupCreate(ctx context.Context, d *schema.ResourceData, meta inter
|
||||
}
|
||||
gcsmr, err := grps.SetMembers(ctx, gcr.Item.Id, gcr.Item.Version, memberIds)
|
||||
if err != nil {
|
||||
return diag.Errorf("error setting principals on role: %v", err)
|
||||
return diag.Errorf("error setting members on group: %v", err)
|
||||
}
|
||||
if gcsmr == nil {
|
||||
return diag.Errorf("group nil after setting members")
|
||||
}
|
||||
raw = gcsmr.GetResponse().Map
|
||||
}
|
||||
|
||||
if err := setFromGroupResponseMap(d, raw); err != nil {
|
||||
return diag.FromErr(err)
|
||||
apiResponse = gcsmr.GetResponse().Map
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -139,7 +139,7 @@ func setFromHostSetStaticResponseMap(d *schema.ResourceData, raw map[string]inte
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceHostSetStaticCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
func resourceHostSetStaticCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var hostsetHostCatalogId string
|
||||
@@ -195,7 +195,12 @@ func resourceHostSetStaticCreate(ctx context.Context, d *schema.ResourceData, me
|
||||
if hscr == nil {
|
||||
return diag.Errorf("nil host set after create")
|
||||
}
|
||||
raw := hscr.GetResponse().Map
|
||||
apiResponse := hscr.GetResponse().Map
|
||||
defer func() {
|
||||
if err := setFromHostSetStaticResponseMap(d, apiResponse); err != nil {
|
||||
errs = append(errs, diag.FromErr(err)...)
|
||||
}
|
||||
}()
|
||||
|
||||
if hostIds != nil {
|
||||
hsshr, err := hsClient.SetHosts(ctx, hscr.Item.Id, hscr.Item.Version, hostIds)
|
||||
@@ -205,11 +210,7 @@ func resourceHostSetStaticCreate(ctx context.Context, d *schema.ResourceData, me
|
||||
if hsshr == nil {
|
||||
return diag.Errorf("nil host set after setting hosts")
|
||||
}
|
||||
raw = hsshr.GetResponse().Map
|
||||
}
|
||||
|
||||
if err := setFromHostSetStaticResponseMap(d, raw); err != nil {
|
||||
return diag.FromErr(err)
|
||||
apiResponse = hsshr.GetResponse().Map
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -14,7 +14,6 @@ const (
|
||||
roleGrantScopeIdKey = "grant_scope_id"
|
||||
rolePrincipalIdsKey = "principal_ids"
|
||||
roleGrantStringsKey = "grant_strings"
|
||||
roleDefaultRoleKey = "default_role"
|
||||
)
|
||||
|
||||
func resourceRole() *schema.Resource {
|
||||
@@ -68,11 +67,6 @@ func resourceRole() *schema.Resource {
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
},
|
||||
roleDefaultRoleKey: {
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Description: "Indicates that the role containing this value is the default role (that is, has the id 'r_default'), which triggers some specialized behavior to allow it to be imported and managed.",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -100,12 +94,7 @@ func setFromRoleResponseMap(d *schema.ResourceData, raw map[string]interface{})
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
if d.Get(roleDefaultRoleKey).(bool) {
|
||||
d.SetId("r_default")
|
||||
return resourceRoleRead(ctx, d, meta)
|
||||
}
|
||||
|
||||
func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var scopeId string
|
||||
@@ -162,18 +151,22 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
|
||||
if tcr == nil {
|
||||
return diag.Errorf("nil role after create")
|
||||
}
|
||||
raw := tcr.GetResponse().Map
|
||||
apiResponse := tcr.GetResponse().Map
|
||||
defer func() {
|
||||
if err := setFromRoleResponseMap(d, apiResponse); err != nil {
|
||||
errs = append(errs, diag.FromErr(err)...)
|
||||
}
|
||||
}()
|
||||
|
||||
var diags diag.Diagnostics
|
||||
if principalIds != nil {
|
||||
tspr, err := rc.SetPrincipals(ctx, tcr.Item.Id, 0, principalIds, roles.WithAutomaticVersioning(true))
|
||||
switch {
|
||||
case err != nil:
|
||||
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting principals", Detail: err.Error()})
|
||||
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "error setting principals", Detail: err.Error()})
|
||||
case tspr == nil:
|
||||
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting principal IDs"})
|
||||
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting principals"})
|
||||
default:
|
||||
raw = tspr.GetResponse().Map
|
||||
apiResponse = tspr.GetResponse().Map
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,19 +174,15 @@ func resourceRoleCreate(ctx context.Context, d *schema.ResourceData, meta interf
|
||||
tsgr, err := rc.SetGrants(ctx, tcr.Item.Id, 0, grantStrings, roles.WithAutomaticVersioning(true))
|
||||
switch {
|
||||
case err != nil:
|
||||
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grants", Detail: err.Error()})
|
||||
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "error setting grants", Detail: err.Error()})
|
||||
case tsgr == nil:
|
||||
diags = append(diags, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting grant strings"})
|
||||
errs = append(errs, diag.Diagnostic{Severity: diag.Error, Summary: "nil role after setting grants"})
|
||||
default:
|
||||
raw = tsgr.GetResponse().Map
|
||||
apiResponse = tsgr.GetResponse().Map
|
||||
}
|
||||
}
|
||||
|
||||
if err := setFromRoleResponseMap(d, raw); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
return diags
|
||||
return errs
|
||||
}
|
||||
|
||||
func resourceRoleRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
@@ -323,10 +312,6 @@ func resourceRoleUpdate(ctx context.Context, d *schema.ResourceData, meta interf
|
||||
}
|
||||
|
||||
func resourceRoleDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
if d.Get(roleDefaultRoleKey).(bool) {
|
||||
return nil
|
||||
}
|
||||
|
||||
md := meta.(*metaData)
|
||||
rc := roles.NewClient(md.client)
|
||||
|
||||
|
||||
@@ -13,13 +13,15 @@ import (
|
||||
|
||||
const (
|
||||
targetHostSourceIdsKey = "host_source_ids"
|
||||
targetApplicationCredentialSourceIdsKey = "application_credential_source_ids"
|
||||
targetBrokeredCredentialSourceIdsKey = "brokered_credential_source_ids"
|
||||
targetInjectedAppCredentialSourceIdsKey = "injected_application_credential_source_ids"
|
||||
targetDefaultPortKey = "default_port"
|
||||
targetSessionMaxSecondsKey = "session_max_seconds"
|
||||
targetSessionConnectionLimitKey = "session_connection_limit"
|
||||
targetWorkerFilterKey = "worker_filter"
|
||||
|
||||
targetTypeTcp = "tcp"
|
||||
targetTypeSsh = "ssh"
|
||||
)
|
||||
|
||||
func resourceTarget() *schema.Resource {
|
||||
@@ -73,8 +75,14 @@ func resourceTarget() *schema.Resource {
|
||||
Optional: true,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
targetApplicationCredentialSourceIdsKey: {
|
||||
Description: "A list of application credential source ID's.",
|
||||
targetBrokeredCredentialSourceIdsKey: {
|
||||
Description: "A list of brokered credential source ID's.",
|
||||
Type: schema.TypeSet,
|
||||
Optional: true,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
targetInjectedAppCredentialSourceIdsKey: {
|
||||
Description: "A list of injected application credential source ID's.",
|
||||
Type: schema.TypeSet,
|
||||
Optional: true,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
@@ -114,7 +122,10 @@ func setFromTargetResponseMap(d *schema.ResourceData, raw map[string]interface{}
|
||||
if err := d.Set(targetHostSourceIdsKey, raw["host_source_ids"]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(targetApplicationCredentialSourceIdsKey, raw["application_credential_source_ids"]); err != nil {
|
||||
if err := d.Set(targetBrokeredCredentialSourceIdsKey, raw["brokered_credential_source_ids"]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(targetInjectedAppCredentialSourceIdsKey, raw["injected_application_credential_source_ids"]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := d.Set(targetSessionMaxSecondsKey, raw["session_max_seconds"]); err != nil {
|
||||
@@ -128,7 +139,7 @@ func setFromTargetResponseMap(d *schema.ResourceData, raw map[string]interface{}
|
||||
}
|
||||
|
||||
switch raw["type"].(string) {
|
||||
case targetTypeTcp:
|
||||
case targetTypeTcp, targetTypeSsh:
|
||||
if attrsVal, ok := raw["attributes"]; ok {
|
||||
attrs := attrsVal.(map[string]interface{})
|
||||
if defPort, ok := attrs["default_port"].(json.Number); ok {
|
||||
@@ -144,7 +155,7 @@ func setFromTargetResponseMap(d *schema.ResourceData, raw map[string]interface{}
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var scopeId string
|
||||
@@ -161,7 +172,7 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
return diag.Errorf("no type provided")
|
||||
}
|
||||
switch typeStr {
|
||||
case targetTypeTcp:
|
||||
case targetTypeTcp, targetTypeSsh:
|
||||
default:
|
||||
return diag.Errorf("invalid type provided")
|
||||
}
|
||||
@@ -182,10 +193,15 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
defaultPortVal, ok := d.GetOk(targetDefaultPortKey)
|
||||
if ok {
|
||||
defaultPortInt := defaultPortVal.(int)
|
||||
if defaultPortInt < 0 {
|
||||
return diag.Errorf(`"default_port" cannot be less than zero`)
|
||||
if defaultPortInt < 0 || defaultPortInt > 65535 {
|
||||
return diag.Errorf(`"default_port" must be a valid tcp port`)
|
||||
}
|
||||
switch typeStr {
|
||||
case targetTypeTcp:
|
||||
opts = append(opts, targets.WithTcpTargetDefaultPort(uint32(defaultPortInt)))
|
||||
case targetTypeSsh:
|
||||
opts = append(opts, targets.WithSshTargetDefaultPort(uint32(defaultPortInt)))
|
||||
}
|
||||
opts = append(opts, targets.WithTcpTargetDefaultPort(uint32(defaultPortInt)))
|
||||
}
|
||||
|
||||
sessionMaxSecondsVal, ok := d.GetOk(targetSessionMaxSecondsKey)
|
||||
@@ -215,12 +231,21 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
}
|
||||
}
|
||||
|
||||
var credentialSourceIds []string
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetApplicationCredentialSourceIdsKey); ok {
|
||||
var brokeredCreds []string
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetBrokeredCredentialSourceIdsKey); ok {
|
||||
list := credentialSourceIdsVal.(*schema.Set).List()
|
||||
credentialSourceIds = make([]string, 0, len(list))
|
||||
brokeredCreds = make([]string, 0, len(list))
|
||||
for _, i := range list {
|
||||
credentialSourceIds = append(credentialSourceIds, i.(string))
|
||||
brokeredCreds = append(brokeredCreds, i.(string))
|
||||
}
|
||||
}
|
||||
|
||||
var injectedCreds []string
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetInjectedAppCredentialSourceIdsKey); ok {
|
||||
list := credentialSourceIdsVal.(*schema.Set).List()
|
||||
injectedCreds = make([]string, 0, len(list))
|
||||
for _, i := range list {
|
||||
injectedCreds = append(injectedCreds, i.(string))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +256,6 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
}
|
||||
|
||||
tc := targets.NewClient(md.client)
|
||||
|
||||
tcr, err := tc.Create(ctx, typeStr, scopeId, opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error creating target: %v", err)
|
||||
@@ -239,7 +263,12 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
if tcr == nil {
|
||||
return diag.Errorf("target nil after create")
|
||||
}
|
||||
raw := tcr.GetResponse().Map
|
||||
apiResponse := tcr.GetResponse().Map
|
||||
defer func() {
|
||||
if err := setFromTargetResponseMap(d, apiResponse); err != nil {
|
||||
errs = append(errs, diag.FromErr(err)...)
|
||||
}
|
||||
}()
|
||||
|
||||
version := tcr.Item.Version
|
||||
if hostSourceIds != nil {
|
||||
@@ -247,20 +276,29 @@ func resourceTargetCreate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
if err != nil {
|
||||
return diag.Errorf("error setting host sources on target: %v", err)
|
||||
}
|
||||
raw = tur.GetResponse().Map
|
||||
if tur == nil {
|
||||
return diag.Errorf("nil target after setting host sources")
|
||||
}
|
||||
apiResponse = tur.GetResponse().Map
|
||||
version = tur.Item.Version
|
||||
}
|
||||
|
||||
if credentialSourceIds != nil {
|
||||
tur, err := tc.SetCredentialSources(ctx, tcr.Item.Id, version, targets.WithApplicationCredentialSourceIds(credentialSourceIds))
|
||||
var credOpts []targets.Option
|
||||
if brokeredCreds != nil {
|
||||
credOpts = append(credOpts, targets.WithBrokeredCredentialSourceIds(brokeredCreds))
|
||||
}
|
||||
if injectedCreds != nil {
|
||||
credOpts = append(credOpts, targets.WithInjectedApplicationCredentialSourceIds(injectedCreds))
|
||||
}
|
||||
if len(credOpts) > 0 {
|
||||
tur, err := tc.SetCredentialSources(ctx, tcr.Item.Id, version, credOpts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error setting credential sources on target: %v", err)
|
||||
}
|
||||
raw = tur.GetResponse().Map
|
||||
}
|
||||
|
||||
if err := setFromTargetResponseMap(d, raw); err != nil {
|
||||
return diag.FromErr(err)
|
||||
if tur == nil {
|
||||
return diag.Errorf("nil target after setting credential sources")
|
||||
}
|
||||
apiResponse = tur.GetResponse().Map
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -295,6 +333,16 @@ func resourceTargetUpdate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
|
||||
var opts []targets.Option
|
||||
|
||||
var typeStr string
|
||||
if typeVal, ok := d.GetOk(TypeKey); ok {
|
||||
typeStr = typeVal.(string)
|
||||
}
|
||||
switch typeStr {
|
||||
case targetTypeTcp, targetTypeSsh:
|
||||
default:
|
||||
return diag.Errorf("invalid type provided")
|
||||
}
|
||||
|
||||
var name *string
|
||||
if d.HasChange(NameKey) {
|
||||
opts = append(opts, targets.DefaultName())
|
||||
@@ -319,15 +367,30 @@ func resourceTargetUpdate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
|
||||
var defaultPort *int
|
||||
if d.HasChange(targetDefaultPortKey) {
|
||||
opts = append(opts, targets.DefaultTcpTargetDefaultPort())
|
||||
defaultPortVal, ok := d.GetOk(targetDefaultPortKey)
|
||||
if ok {
|
||||
defaultPortInt := defaultPortVal.(int)
|
||||
if defaultPortInt < 0 {
|
||||
return diag.Errorf(`"default_port" cannot be less than zero`)
|
||||
switch typeStr {
|
||||
case targetTypeTcp:
|
||||
opts = append(opts, targets.DefaultTcpTargetDefaultPort())
|
||||
defaultPortVal, ok := d.GetOk(targetDefaultPortKey)
|
||||
if ok {
|
||||
defaultPortInt := defaultPortVal.(int)
|
||||
if defaultPortInt < 0 || defaultPortInt > 65535 {
|
||||
return diag.Errorf(`"default_port" must be a valid tcp port`)
|
||||
}
|
||||
defaultPort = &defaultPortInt
|
||||
opts = append(opts, targets.WithTcpTargetDefaultPort(uint32(defaultPortInt)))
|
||||
}
|
||||
|
||||
case targetTypeSsh:
|
||||
opts = append(opts, targets.DefaultSshTargetDefaultPort())
|
||||
defaultPortVal, ok := d.GetOk(targetDefaultPortKey)
|
||||
if ok {
|
||||
defaultPortInt := defaultPortVal.(int)
|
||||
if defaultPortInt < 0 || defaultPortInt > 65535 {
|
||||
return diag.Errorf(`"default_port" must be a valid tcp port`)
|
||||
}
|
||||
defaultPort = &defaultPortInt
|
||||
opts = append(opts, targets.WithSshTargetDefaultPort(uint32(defaultPortInt)))
|
||||
}
|
||||
defaultPort = &defaultPortInt
|
||||
opts = append(opts, targets.WithTcpTargetDefaultPort(uint32(defaultPortInt)))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,31 +491,46 @@ func resourceTargetUpdate(ctx context.Context, d *schema.ResourceData, meta inte
|
||||
}
|
||||
}
|
||||
|
||||
// The above calls may not actually happen, so we use d.Id() and automatic
|
||||
// versioning here
|
||||
if d.HasChange(targetApplicationCredentialSourceIdsKey) {
|
||||
var credentialSourceIds []string
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetApplicationCredentialSourceIdsKey); ok {
|
||||
// if any of the credential types are changed, then all credential ids must be gathered
|
||||
// because the SetCredentialSources function will remove ids that are not present.
|
||||
if d.HasChange(targetBrokeredCredentialSourceIdsKey) || d.HasChange(targetInjectedAppCredentialSourceIdsKey) {
|
||||
credOpts := []targets.Option{
|
||||
targets.WithAutomaticVersioning(true),
|
||||
}
|
||||
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetBrokeredCredentialSourceIdsKey); ok {
|
||||
var credentialSourceIds []string
|
||||
credSourceIds := credentialSourceIdsVal.(*schema.Set).List()
|
||||
for _, credSourceId := range credSourceIds {
|
||||
credentialSourceIds = append(credentialSourceIds, credSourceId.(string))
|
||||
}
|
||||
credOpts = append(credOpts, targets.WithBrokeredCredentialSourceIds(credentialSourceIds))
|
||||
}
|
||||
|
||||
opts := []targets.Option{
|
||||
targets.WithAutomaticVersioning(true),
|
||||
targets.DefaultApplicationCredentialSourceIds(),
|
||||
}
|
||||
if len(credentialSourceIds) > 0 {
|
||||
opts = append(opts, targets.WithApplicationCredentialSourceIds(credentialSourceIds))
|
||||
if credentialSourceIdsVal, ok := d.GetOk(targetInjectedAppCredentialSourceIdsKey); ok {
|
||||
var credentialSourceIds []string
|
||||
credSourceIds := credentialSourceIdsVal.(*schema.Set).List()
|
||||
for _, credSourceId := range credSourceIds {
|
||||
credentialSourceIds = append(credentialSourceIds, credSourceId.(string))
|
||||
}
|
||||
credOpts = append(credOpts, targets.WithInjectedApplicationCredentialSourceIds(credentialSourceIds))
|
||||
}
|
||||
|
||||
_, err := tc.SetCredentialSources(ctx, d.Id(), 0, opts...)
|
||||
result, err := tc.SetCredentialSources(ctx, d.Id(), 0, credOpts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error updating credential sources in target: %v", err)
|
||||
}
|
||||
if err := d.Set(targetApplicationCredentialSourceIdsKey, credentialSourceIds); err != nil {
|
||||
return diag.FromErr(err)
|
||||
|
||||
if d.HasChange(targetBrokeredCredentialSourceIdsKey) {
|
||||
if err := d.Set(targetBrokeredCredentialSourceIdsKey, result.Item.BrokeredCredentialSourceIds); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
|
||||
if d.HasChange(targetInjectedAppCredentialSourceIdsKey) {
|
||||
if err := d.Set(targetInjectedAppCredentialSourceIdsKey, result.Item.InjectedApplicationCredentialSourceIds); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
@@ -89,7 +90,7 @@ resource "boundary_target" "foo" {
|
||||
host_source_ids = [
|
||||
boundary_host_set.foo.id
|
||||
]
|
||||
application_credential_source_ids = [
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.foo.id
|
||||
]
|
||||
default_port = 22
|
||||
@@ -108,7 +109,7 @@ resource "boundary_target" "foo" {
|
||||
host_source_ids = [
|
||||
boundary_host_set.bar.id
|
||||
]
|
||||
application_credential_source_ids = [
|
||||
brokered_credential_source_ids = [
|
||||
boundary_credential_library_vault.bar.id
|
||||
]
|
||||
default_port = 80
|
||||
@@ -130,6 +131,21 @@ resource "boundary_target" "foo" {
|
||||
session_connection_limit = 7
|
||||
worker_filter = "type == \"bar\""
|
||||
}`, fooTargetDescriptionUpdate)
|
||||
|
||||
fooTargetPartialSuccess = fmt.Sprintf(`
|
||||
resource "boundary_target" "foo" {
|
||||
name = "expected_to_fail"
|
||||
description = "%s"
|
||||
type = "tcp"
|
||||
scope_id = boundary_scope.proj1.id
|
||||
default_port = 80
|
||||
depends_on = [boundary_role.proj1_admin]
|
||||
session_max_seconds = 7000
|
||||
session_connection_limit = 7
|
||||
injected_application_credential_source_ids = [
|
||||
boundary_credential_library_vault.bar.id
|
||||
]
|
||||
}`, fooTargetDescription)
|
||||
)
|
||||
|
||||
func TestAccTarget(t *testing.T) {
|
||||
@@ -166,7 +182,7 @@ func TestAccTarget(t *testing.T) {
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionConnectionLimitKey, "6"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetWorkerFilterKey, `type == "foo"`),
|
||||
testAccCheckTargetResourceHostSource(provider, "boundary_target.foo", []string{"boundary_host_set.foo"}),
|
||||
testAccCheckTargetResourceAppCredSources(provider, "boundary_target.foo", []string{"boundary_credential_library_vault.foo"}),
|
||||
testAccCheckTargetResourceBrokeredCredSources(provider, "boundary_target.foo", []string{"boundary_credential_library_vault.foo"}),
|
||||
),
|
||||
},
|
||||
importStep("boundary_target.foo"),
|
||||
@@ -181,7 +197,7 @@ func TestAccTarget(t *testing.T) {
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionConnectionLimitKey, "7"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetWorkerFilterKey, `type == "bar"`),
|
||||
testAccCheckTargetResourceHostSource(provider, "boundary_target.foo", []string{"boundary_host_set.bar"}),
|
||||
testAccCheckTargetResourceAppCredSources(provider, "boundary_target.foo", []string{"boundary_credential_library_vault.bar"}),
|
||||
testAccCheckTargetResourceBrokeredCredSources(provider, "boundary_target.foo", []string{"boundary_credential_library_vault.bar"}),
|
||||
),
|
||||
},
|
||||
importStep("boundary_target.foo"),
|
||||
@@ -196,7 +212,38 @@ func TestAccTarget(t *testing.T) {
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionConnectionLimitKey, "7"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetWorkerFilterKey, `type == "bar"`),
|
||||
testAccCheckTargetResourceHostSource(provider, "boundary_target.foo", nil),
|
||||
testAccCheckTargetResourceAppCredSources(provider, "boundary_target.foo", nil),
|
||||
testAccCheckTargetResourceBrokeredCredSources(provider, "boundary_target.foo", nil),
|
||||
),
|
||||
},
|
||||
importStep("boundary_target.foo"),
|
||||
{
|
||||
// test updating state file when the target is created, but fails on associating an invalid injected credential source to a tcp target type
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, fooBarCredLibs, fooTargetPartialSuccess),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckTargetResourceExists(provider, "boundary_target.foo"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", DescriptionKey, ""),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetDefaultPortKey, "80"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionMaxSecondsKey, "7000"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionConnectionLimitKey, "7"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetHostSourceIdsKey+".%", "0"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetInjectedAppCredentialSourceIdsKey+".%", "0"),
|
||||
),
|
||||
ExpectError: regexp.MustCompile("Unable to set credential sources in target: tcp.VetCredentialSources: tcp.Target only supports credential purpose"),
|
||||
},
|
||||
importStep("boundary_target.foo", targetInjectedAppCredentialSourceIdsKey),
|
||||
{
|
||||
// test resolving invalid injected credential source error without raising duplicate name error, due to state file not being in sync.
|
||||
Config: testConfig(url, fooOrg, firstProjectFoo, credStoreRes, fooBarCredLibs, fooTargetUpdateUnsetHostAndCredSources),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckTargetResourceExists(provider, "boundary_target.foo"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", DescriptionKey, fooTargetDescriptionUpdate),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetDefaultPortKey, "80"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionMaxSecondsKey, "7000"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetSessionConnectionLimitKey, "7"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetWorkerFilterKey, `type == "bar"`),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetHostSourceIdsKey+".%", "0"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetInjectedAppCredentialSourceIdsKey+".%", "0"),
|
||||
resource.TestCheckResourceAttr("boundary_target.foo", targetBrokeredCredentialSourceIdsKey+".%", "0"),
|
||||
),
|
||||
},
|
||||
importStep("boundary_target.foo"),
|
||||
@@ -261,7 +308,7 @@ func testAccCheckTargetResourceHostSource(testProvider *schema.Provider, name st
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckTargetResourceAppCredSources(testProvider *schema.Provider, name string, credSources []string) resource.TestCheckFunc {
|
||||
func testAccCheckTargetResourceBrokeredCredSources(testProvider *schema.Provider, name string, credSources []string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[name]
|
||||
if !ok {
|
||||
@@ -298,11 +345,11 @@ func testAccCheckTargetResourceAppCredSources(testProvider *schema.Provider, nam
|
||||
return fmt.Errorf("got an error when reading target %q: %w", id, err)
|
||||
}
|
||||
|
||||
if len(t.Item.ApplicationCredentialSourceIds) != len(credSourceIDs) {
|
||||
return fmt.Errorf("tf state and boundary have different number of application credential sources")
|
||||
if len(t.Item.BrokeredCredentialSourceIds) != len(credSourceIDs) {
|
||||
return fmt.Errorf("tf state and boundary have different number of brokered credential sources")
|
||||
}
|
||||
|
||||
for _, stateCredSourceId := range t.Item.ApplicationCredentialSourceIds {
|
||||
for _, stateCredSourceId := range t.Item.BrokeredCredentialSourceIds {
|
||||
ok := false
|
||||
for _, gotCredSourceID := range credSourceIDs {
|
||||
if gotCredSourceID == stateCredSourceId {
|
||||
@@ -310,7 +357,7 @@ func testAccCheckTargetResourceAppCredSources(testProvider *schema.Provider, nam
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf("application credential source id in state not set in boundary: %s", stateCredSourceId)
|
||||
return fmt.Errorf("brokered credential source id in state not set in boundary: %s", stateCredSourceId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func setFromUserResponseMap(d *schema.ResourceData, raw map[string]interface{})
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceUserCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
func resourceUserCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) (errs diag.Diagnostics) {
|
||||
md := meta.(*metaData)
|
||||
|
||||
var scopeId string
|
||||
@@ -106,7 +106,12 @@ func resourceUserCreate(ctx context.Context, d *schema.ResourceData, meta interf
|
||||
if ucr == nil {
|
||||
return diag.Errorf("user nil after create")
|
||||
}
|
||||
raw := ucr.GetResponse().Map
|
||||
apiResponse := ucr.GetResponse().Map
|
||||
defer func() {
|
||||
if err := setFromUserResponseMap(d, apiResponse); err != nil {
|
||||
errs = append(errs, diag.FromErr(err)...)
|
||||
}
|
||||
}()
|
||||
|
||||
if val, ok := d.GetOk(userAccountIDsKey); ok {
|
||||
list := val.(*schema.Set).List()
|
||||
@@ -121,11 +126,7 @@ func resourceUserCreate(ctx context.Context, d *schema.ResourceData, meta interf
|
||||
if usrac == nil {
|
||||
return diag.Errorf("user nil after setting accounts")
|
||||
}
|
||||
raw = usrac.GetResponse().Map
|
||||
}
|
||||
|
||||
if err := setFromUserResponseMap(d, raw); err != nil {
|
||||
return diag.FromErr(err)
|
||||
apiResponse = usrac.GetResponse().Map
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/workers"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
const (
|
||||
scope = "scope"
|
||||
scopeId = "global"
|
||||
version = "version"
|
||||
address = "address"
|
||||
canonicalTags = "canonical_tags"
|
||||
configTags = "config_tags"
|
||||
workerGeneratedAuthToken = "worker_generated_auth_token"
|
||||
controllerGeneratedActivationToken = "controller_generated_activation_token"
|
||||
apiTags = "api_tags"
|
||||
releaseVersion = "release_version"
|
||||
authorizedActions = "authorized_actions"
|
||||
)
|
||||
|
||||
func resourceWorker() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
Description: "The resource allows you to create a self-managed worker object.",
|
||||
|
||||
CreateContext: resourceWorkerCreate,
|
||||
ReadContext: resourceWorkerRead,
|
||||
UpdateContext: resourceWorkerUpdate,
|
||||
DeleteContext: resourceWorkerDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
IDKey: {
|
||||
Description: "The ID of the worker.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
ScopeIdKey: {
|
||||
Description: "The scope for the worker.",
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
},
|
||||
NameKey: {
|
||||
Description: "The name for the worker.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
DescriptionKey: {
|
||||
Description: "The description for the worker.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
address: {
|
||||
Description: "The accessible address of the self managed worker.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
workerGeneratedAuthToken: {
|
||||
Description: "The worker authentication token required to register the worker for the worker-led authentication flow. Leaving this blank will result in a controller generated token.",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
},
|
||||
controllerGeneratedActivationToken: {
|
||||
Description: "A single use token generated by the controller to be passed to the self-managed worker.",
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
releaseVersion: {
|
||||
Description: "The version of the Boundary binary running on the self managed worker.",
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
authorizedActions: {
|
||||
Description: "A list of actions that the worker is entitled to perform.",
|
||||
Type: schema.TypeList,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func setFromWorkerResponseMap(d *schema.ResourceData, raw map[string]interface{}) error {
|
||||
d.SetId(raw["id"].(string))
|
||||
d.Set(ScopeIdKey, raw["scope_id"])
|
||||
d.Set(NameKey, raw["name"])
|
||||
d.Set(DescriptionKey, raw["description"])
|
||||
d.Set(address, raw["address"])
|
||||
d.Set(workerGeneratedAuthToken, raw["worker_generated_auth_token"])
|
||||
d.Set(controllerGeneratedActivationToken, raw["controller_generated_activation_token"])
|
||||
d.Set(releaseVersion, raw["release_version"])
|
||||
d.Set(authorizedActions, raw["authorized_actions"])
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceWorkerRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
wkrs := workers.NewClient(md.client)
|
||||
|
||||
wrr, err := wkrs.Read(ctx, d.Id())
|
||||
if err != nil {
|
||||
if apiErr := api.AsServerError(err); apiErr != nil && apiErr.Response().StatusCode() == http.StatusNotFound {
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
return diag.Errorf("error calling read worker: %v", err)
|
||||
}
|
||||
if wrr == nil {
|
||||
return diag.Errorf("worker nil after read")
|
||||
}
|
||||
|
||||
if err := setFromWorkerResponseMap(d, wrr.GetResponse().Map); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceWorkerCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
opts := []workers.Option{}
|
||||
|
||||
if v, ok := d.GetOk(NameKey); ok {
|
||||
opts = append(opts, workers.WithName(v.(string)))
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk(DescriptionKey); ok {
|
||||
opts = append(opts, workers.WithDescription(v.(string)))
|
||||
}
|
||||
|
||||
var workerAuthToken string
|
||||
if v, ok := d.GetOk(workerGeneratedAuthToken); ok {
|
||||
workerAuthToken = v.(string)
|
||||
}
|
||||
|
||||
wkr := workers.NewClient(md.client)
|
||||
|
||||
if len(workerAuthToken) > 0 {
|
||||
wkrc, err := wkr.CreateWorkerLed(ctx, workerAuthToken, scopeId, opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error creating worker: %v", err)
|
||||
}
|
||||
if wkrc == nil {
|
||||
return diag.Errorf("worker nil after create")
|
||||
}
|
||||
if err := setFromWorkerResponseMap(d, wkrc.GetResponse().Map); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
} else {
|
||||
wkrc, err := wkr.CreateControllerLed(ctx, scopeId, opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error creating worker: %v", err)
|
||||
}
|
||||
if wkrc == nil {
|
||||
return diag.Errorf("worker nil after create")
|
||||
}
|
||||
if err := setFromWorkerResponseMap(d, wkrc.GetResponse().Map); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceWorkerUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
wkr := workers.NewClient(md.client)
|
||||
|
||||
opts := []workers.Option{}
|
||||
|
||||
var name *string
|
||||
if d.HasChange(NameKey) {
|
||||
opts = append(opts, workers.DefaultName())
|
||||
nameVal, ok := d.GetOk(NameKey)
|
||||
if ok {
|
||||
nameStr := nameVal.(string)
|
||||
name = &nameStr
|
||||
opts = append(opts, workers.WithName(nameStr))
|
||||
}
|
||||
}
|
||||
|
||||
var desc *string
|
||||
if d.HasChange(DescriptionKey) {
|
||||
opts = append(opts, workers.DefaultDescription())
|
||||
descVal, ok := d.GetOk(DescriptionKey)
|
||||
if ok {
|
||||
descStr := descVal.(string)
|
||||
desc = &descStr
|
||||
opts = append(opts, workers.WithDescription(descStr))
|
||||
}
|
||||
}
|
||||
|
||||
var versionInt int
|
||||
if versionVal, ok := d.GetOk(version); ok {
|
||||
versionInt = versionVal.(int)
|
||||
}
|
||||
|
||||
if len(opts) > 0 {
|
||||
opts = append(opts, workers.WithAutomaticVersioning(true))
|
||||
_, err := wkr.Update(ctx, d.Id(), uint32(versionInt), opts...)
|
||||
if err != nil {
|
||||
return diag.Errorf("error updating worker: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if d.HasChange(NameKey) {
|
||||
if err := d.Set(NameKey, name); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
if d.HasChange(DescriptionKey) {
|
||||
if err := d.Set(DescriptionKey, desc); err != nil {
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func resourceWorkerDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
|
||||
md := meta.(*metaData)
|
||||
wClient := workers.NewClient(md.client)
|
||||
|
||||
_, err := wClient.Delete(ctx, d.Id())
|
||||
if err != nil {
|
||||
return diag.Errorf("error deleting worker: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/workers"
|
||||
"github.com/hashicorp/boundary/testing/controller"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
|
||||
)
|
||||
|
||||
const (
|
||||
workerName = "self managed worker"
|
||||
workerNameUpdate = "self managed worker update"
|
||||
workerDesc = "self managed worker description"
|
||||
workerDescUpdate = "self managed worker description update"
|
||||
workerToken = "GzusqckarbczHoLGQ4UA25uSRGy7e7hUk4Qgz8T3NmSZF4oXBc1dKMRyH7Mr6W5u2QWggkZi1wsnfYMufb5LZJJnxEdywUxpE8RgAbVTahMhJm8oeH3nagrAKfWJkrTt8QuoqiupcTrFmJtDPZ5WBtqKSXiW3jdG8esCt7ZNKVaKV1Hq6MBXUf7duj9KfAy4Y3B31jDTzoF1uVnK1AsaLkEhgbHbuAH33L2KG5ivo7YeFeE6PknNoVavPSRSkoEpcXSfjvoPMAz9ttpNvH7jGWPwLti8r48NcVj41ftXWg"
|
||||
)
|
||||
|
||||
var (
|
||||
workerLedCreate = fmt.Sprintf(`
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
worker_generated_auth_token = "%s"
|
||||
}`, workerName, workerDesc, workerToken)
|
||||
|
||||
workerLedUpdate = fmt.Sprintf(`
|
||||
resource "boundary_worker" "worker_led" {
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
worker_generated_auth_token = "%s"
|
||||
}`, workerNameUpdate, workerDescUpdate, workerToken)
|
||||
|
||||
controllerLedCreate = fmt.Sprintf(`
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
}`, workerName, workerDesc)
|
||||
controllerLedUpdate = fmt.Sprintf(`
|
||||
resource "boundary_worker" "controller_led" {
|
||||
scope_id = "global"
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
}`, workerNameUpdate, workerDescUpdate)
|
||||
)
|
||||
|
||||
func TestWorkerWorkerLed(t *testing.T) {
|
||||
token := os.Getenv("BOUNDARY_TF_PROVIDER_TEST_WORKER_LED_TOKEN")
|
||||
if token == "" {
|
||||
t.Skip("Not running worker led activation test without worker led token present")
|
||||
}
|
||||
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
CheckDestroy: testAccCheckworkerResourceDestroy(t, provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
// create
|
||||
Config: testConfig(url, workerLedCreate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckworkerResourceExists(provider, "boundary_worker.worker_led"),
|
||||
resource.TestCheckResourceAttr("boundary_worker.worker_led", "description", workerDesc),
|
||||
resource.TestCheckResourceAttr("boundary_worker.worker_led", "name", workerName),
|
||||
),
|
||||
},
|
||||
importStep("boundary_worker.worker_led"),
|
||||
{
|
||||
// update
|
||||
Config: testConfig(url, workerLedUpdate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckworkerResourceExists(provider, "boundary_worker.worker_led"),
|
||||
resource.TestCheckResourceAttr("boundary_worker.worker_led", "description", workerDescUpdate),
|
||||
resource.TestCheckResourceAttr("boundary_worker.worker_led", "name", workerNameUpdate),
|
||||
),
|
||||
},
|
||||
importStep("boundary_worker.worker_led"),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestWorkerControllerLed(t *testing.T) {
|
||||
tc := controller.NewTestController(t, tcConfig...)
|
||||
defer tc.Shutdown()
|
||||
url := tc.ApiAddrs()[0]
|
||||
|
||||
var provider *schema.Provider
|
||||
resource.Test(t, resource.TestCase{
|
||||
ProviderFactories: providerFactories(&provider),
|
||||
CheckDestroy: testAccCheckworkerResourceDestroy(t, provider),
|
||||
Steps: []resource.TestStep{
|
||||
{
|
||||
// create
|
||||
Config: testConfig(url, controllerLedCreate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckworkerResourceExists(provider, "boundary_worker.controller_led"),
|
||||
resource.TestCheckResourceAttr("boundary_worker.controller_led", "description", workerDesc),
|
||||
resource.TestCheckResourceAttr("boundary_worker.controller_led", "name", workerName),
|
||||
resource.TestCheckResourceAttrSet("boundary_worker.controller_led", "controller_generated_activation_token"),
|
||||
),
|
||||
},
|
||||
importStep("boundary_worker.controller_led"),
|
||||
{
|
||||
// update
|
||||
Config: testConfig(url, controllerLedUpdate),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckworkerResourceExists(provider, "boundary_worker.controller_led"),
|
||||
resource.TestCheckResourceAttr("boundary_worker.controller_led", "description", workerDescUpdate),
|
||||
resource.TestCheckResourceAttr("boundary_worker.controller_led", "name", workerNameUpdate),
|
||||
),
|
||||
},
|
||||
importStep("boundary_worker.controller_led"),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func testAccCheckworkerResourceExists(testProvider *schema.Provider, name string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
rs, ok := s.RootModule().Resources[name]
|
||||
if !ok {
|
||||
return fmt.Errorf("Not found: %s", name)
|
||||
}
|
||||
|
||||
id := rs.Primary.ID
|
||||
if id == "" {
|
||||
return fmt.Errorf("No ID is set")
|
||||
}
|
||||
|
||||
md := testProvider.Meta().(*metaData)
|
||||
|
||||
wkrClient := workers.NewClient(md.client)
|
||||
|
||||
if _, err := wkrClient.Read(context.Background(), id); err != nil {
|
||||
return fmt.Errorf("Got an error when reading worker %q: %v", id, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckworkerResourceDestroy(t *testing.T, testProvider *schema.Provider) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
if testProvider.Meta() == nil {
|
||||
t.Fatal("got nil provider metadata")
|
||||
}
|
||||
md := testProvider.Meta().(*metaData)
|
||||
|
||||
for _, rs := range s.RootModule().Resources {
|
||||
switch rs.Type {
|
||||
case "boundary_worker":
|
||||
id := rs.Primary.ID
|
||||
|
||||
wkrClient := workers.NewClient(md.client)
|
||||
|
||||
_, err := wkrClient.Read(context.Background(), id)
|
||||
if apiErr := api.AsServerError(err); apiErr == nil || apiErr.Response().StatusCode() != http.StatusNotFound {
|
||||
return fmt.Errorf("didn't get a 404 when reading destroyed worker %q: %v", id, err)
|
||||
}
|
||||
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/darwin/amd64
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/darwin/arm64
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/freebsd/386
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/freebsd/amd64
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/freebsd/arm
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/linux/386
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/linux/amd64
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/linux/arm
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/linux/arm64
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/windows/386
|
||||
var content embed.FS
|
||||
@@ -5,5 +5,6 @@ import (
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//
|
||||
//go:embed assets/windows/amd64
|
||||
var content embed.FS
|
||||
@@ -4,7 +4,7 @@ go 1.17
|
||||
|
||||
require (
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.0
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@@ -101,8 +101,8 @@ github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0/go.mod h1:bmYifnHykiAB5yR+
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 h1:hKWzjzqfUi1HtpBEJ9tLKlRya1u6kRQGZAW9OFR+ia8=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0/go.mod h1:H+TfVXu/Eyi6Ccs4EoT8pa3gR5lRh12sw4AOq6XkXCg=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/aead/v2 v2.0.0/go.mod h1:YdrJE0Yqex9DoLBiS0rcfXOQdZKL9j9QJmb+B6rob1g=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.0 h1:g8i04iwNWBbbRPNApOVBWKFDO1De6AflcKkp9C3BA2k=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.0/go.mod h1:sDmsWR/W2LqwU217o32RzdHMb/FywGLF72PVIhpZ3hE=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.1 h1:6joKpqCFveaNMEwC3qna67usws6DjdxqfCuQEHSM0aM=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.1/go.mod h1:sDmsWR/W2LqwU217o32RzdHMb/FywGLF72PVIhpZ3hE=
|
||||
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
|
||||
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
|
||||
github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE=
|
||||
|
||||
@@ -3,8 +3,8 @@ module github.com/hashicorp/boundary/plugins/kms/mains/transit
|
||||
go 1.17
|
||||
|
||||
require (
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.0
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -12,51 +12,51 @@ require (
|
||||
github.com/armon/go-radix v1.0.0 // indirect
|
||||
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/fatih/color v1.7.0 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-hclog v1.1.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.2.1 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 // indirect
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.5 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-plugin v1.4.3 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.6.6 // indirect
|
||||
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
|
||||
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
||||
github.com/hashicorp/go-version v1.2.0 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/vault/api v1.4.1 // indirect
|
||||
github.com/hashicorp/vault/sdk v0.4.1 // indirect
|
||||
github.com/hashicorp/vault/api v1.7.2 // indirect
|
||||
github.com/hashicorp/vault/sdk v0.5.1 // indirect
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
|
||||
github.com/mattn/go-colorable v0.1.6 // indirect
|
||||
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/mitchellh/copystructure v1.0.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.4.2 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.0 // indirect
|
||||
github.com/oklog/run v1.0.0 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.1 // indirect
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.7.0 // indirect
|
||||
github.com/stretchr/testify v1.7.2 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000 // indirect
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
|
||||
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a // indirect
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068 // indirect
|
||||
google.golang.org/grpc v1.44.0 // indirect
|
||||
google.golang.org/protobuf v1.27.1 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
@@ -40,8 +40,9 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
|
||||
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y=
|
||||
@@ -99,19 +100,20 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S
|
||||
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
|
||||
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.1.0 h1:QsGcniKx5/LuX2eYoeL+Np3UKYPNaN7YKpTh29h8rbw=
|
||||
github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw=
|
||||
github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0 h1:8qUXiUcayCr1RxMzS/D0DK1TPFTlpP8z3cWSR3BUf8E=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.0/go.mod h1:bmYifnHykiAB5yR+FK9fNjvE0GzE1Ev2F4eMTVourcA=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0 h1:hKWzjzqfUi1HtpBEJ9tLKlRya1u6kRQGZAW9OFR+ia8=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.0/go.mod h1:H+TfVXu/Eyi6Ccs4EoT8pa3gR5lRh12sw4AOq6XkXCg=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/aead/v2 v2.0.0/go.mod h1:YdrJE0Yqex9DoLBiS0rcfXOQdZKL9j9QJmb+B6rob1g=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.0 h1:GCS3ZzGZb9u2Jcg0ILkw2zdGvkNPkpsMmozP/dnM6Z0=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.0/go.mod h1:7nyMrL0t9U76zy8ZaNlWKoOYci6cZRvbLFOlhDK9QyQ=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2 h1:it114Kjpk79JVh6AfxFMP5oi1gb+RPzcSLiG3zF/J0w=
|
||||
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.2/go.mod h1:b9mq0bG5xJ10ZcTEQJLZ22O9y71hIt2MGTLqROA/SAM=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.4/go.mod h1:sDQAfwJGv25uGPZA04x87ERglCG6avnRcBT9wYoMII8=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.5 h1:rOFDv+3k05mnW0oaDLffhVUwg03Csn0mvfO98Wdd2bE=
|
||||
github.com/hashicorp/go-kms-wrapping/v2 v2.0.5/go.mod h1:sDQAfwJGv25uGPZA04x87ERglCG6avnRcBT9wYoMII8=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.1 h1:72zlIBTJd2pvYmINqotpvcI4ZXLxhRq2cVPTuqv0xqY=
|
||||
github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.1/go.mod h1:JytRAxdJViV+unUUWedb7uzEy5pgu7OurbqX0eHEikE=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
@@ -125,11 +127,13 @@ github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR3
|
||||
github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw=
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc=
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 h1:78ki3QBevHwYrVxnyVeaEz+7WtifHhauYF23es/0KlI=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 h1:nd0HIW15E6FG1MsnArYaHfuw9C2zgzM8LxkG5Ty/788=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
|
||||
github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs=
|
||||
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
|
||||
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
|
||||
@@ -143,10 +147,10 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/vault/api v1.4.1 h1:mWLfPT0RhxBitjKr6swieCEP2v5pp/M//t70S3kMLRo=
|
||||
github.com/hashicorp/vault/api v1.4.1/go.mod h1:LkMdrZnWNrFaQyYYazWVn7KshilfDidgVBq6YiTq/bM=
|
||||
github.com/hashicorp/vault/sdk v0.4.1 h1:3SaHOJY687jY1fnB61PtL0cOkKItphrbLmux7T92HBo=
|
||||
github.com/hashicorp/vault/sdk v0.4.1/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaakYkhZRoVuhj0=
|
||||
github.com/hashicorp/vault/api v1.7.2 h1:kawHE7s/4xwrdKbkmwQi0wYaIeUhk5ueek7ljuezCVQ=
|
||||
github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M=
|
||||
github.com/hashicorp/vault/sdk v0.5.1 h1:zly/TmNgOXCGgWIRA8GojyXzG817POtVh3uzIwzZx+8=
|
||||
github.com/hashicorp/vault/sdk v0.5.1/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
@@ -168,13 +172,16 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
|
||||
@@ -186,14 +193,15 @@ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdI
|
||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
|
||||
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
|
||||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
@@ -236,8 +244,9 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||
@@ -246,8 +255,8 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000 h1:SL+8VVnkqyshUSz5iNnXtrBQzvFF2SkROm6t5RczFAE=
|
||||
golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
@@ -293,9 +302,10 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a h1:ppl5mZgokTT8uPkmYOyEUmPTr3ypaKkg5eFOGrAmxxE=
|
||||
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -360,7 +370,8 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build tools
|
||||
// +build tools
|
||||
|
||||
package tools
|
||||
|
||||
Reference in new issue
Block a user