diff --git a/.download-tfproviderlint.sh b/.download-tfproviderlint.sh deleted file mode 100644 index 4946c943e0..0000000000 --- a/.download-tfproviderlint.sh +++ /dev/null @@ -1,378 +0,0 @@ -#!/bin/sh -set -e -# Code generated by godownloader on 2020-05-15T21:01:24Z. DO NOT EDIT. -# - -usage() { - this=$1 - cat </dev/null -} -echoerr() { - echo "$@" 1>&2 -} -log_prefix() { - echo "$0" -} -_logp=6 -log_set_priority() { - _logp="$1" -} -log_priority() { - if test -z "$1"; then - echo "$_logp" - return - fi - [ "$1" -le "$_logp" ] -} -log_tag() { - case $1 in - 0) echo "emerg" ;; - 1) echo "alert" ;; - 2) echo "crit" ;; - 3) echo "err" ;; - 4) echo "warning" ;; - 5) echo "notice" ;; - 6) echo "info" ;; - 7) echo "debug" ;; - *) echo "$1" ;; - esac -} -log_debug() { - log_priority 7 || return 0 - echoerr "$(log_prefix)" "$(log_tag 7)" "$@" -} -log_info() { - log_priority 6 || return 0 - echoerr "$(log_prefix)" "$(log_tag 6)" "$@" -} -log_err() { - log_priority 3 || return 0 - echoerr "$(log_prefix)" "$(log_tag 3)" "$@" -} -log_crit() { - log_priority 2 || return 0 - echoerr "$(log_prefix)" "$(log_tag 2)" "$@" -} -uname_os() { - os=$(uname -s | tr '[:upper:]' '[:lower:]') - case "$os" in - cygwin_nt*) os="windows" ;; - mingw*) os="windows" ;; - msys_nt*) os="windows" ;; - esac - echo "$os" -} -uname_arch() { - arch=$(uname -m) - case $arch in - x86_64) arch="amd64" ;; - x86) arch="386" ;; - i686) arch="386" ;; - i386) arch="386" ;; - aarch64) arch="arm64" ;; - armv5*) arch="armv5" ;; - armv6*) arch="armv6" ;; - armv7*) arch="armv7" ;; - esac - echo ${arch} -} -uname_os_check() { - os=$(uname_os) - case "$os" in - darwin) return 0 ;; - dragonfly) return 0 ;; - freebsd) return 0 ;; - linux) return 0 ;; - android) return 0 ;; - nacl) return 0 ;; - netbsd) return 0 ;; - openbsd) return 0 ;; - plan9) return 0 ;; - solaris) return 0 ;; - windows) return 0 ;; - esac - log_crit "uname_os_check '$(uname -s)' got converted to '$os' which is not a GOOS value. Please file bug at https://github.com/client9/shlib" - return 1 -} -uname_arch_check() { - arch=$(uname_arch) - case "$arch" in - 386) return 0 ;; - amd64) return 0 ;; - arm64) return 0 ;; - armv5) return 0 ;; - armv6) return 0 ;; - armv7) return 0 ;; - ppc64) return 0 ;; - ppc64le) return 0 ;; - mips) return 0 ;; - mipsle) return 0 ;; - mips64) return 0 ;; - mips64le) return 0 ;; - s390x) return 0 ;; - amd64p32) return 0 ;; - esac - log_crit "uname_arch_check '$(uname -m)' got converted to '$arch' which is not a GOARCH value. Please file bug report at https://github.com/client9/shlib" - return 1 -} -untar() { - tarball=$1 - case "${tarball}" in - *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" ;; - *.tar) tar --no-same-owner -xf "${tarball}" ;; - *.zip) unzip "${tarball}" ;; - *) - log_err "untar unknown archive format for ${tarball}" - return 1 - ;; - esac -} -http_download_curl() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - code=$(curl -w '%{http_code}' -sL -o "$local_file" "$source_url") - else - code=$(curl -w '%{http_code}' -sL -H "$header" -o "$local_file" "$source_url") - fi - if [ "$code" != "200" ]; then - log_debug "http_download_curl received HTTP status $code" - return 1 - fi - return 0 -} -http_download_wget() { - local_file=$1 - source_url=$2 - header=$3 - if [ -z "$header" ]; then - wget -q -O "$local_file" "$source_url" - else - wget -q --header "$header" -O "$local_file" "$source_url" - fi -} -http_download() { - log_debug "http_download $2" - if is_command curl; then - http_download_curl "$@" - return - elif is_command wget; then - http_download_wget "$@" - return - fi - log_crit "http_download unable to find wget or curl" - return 1 -} -http_copy() { - tmp=$(mktemp) - http_download "${tmp}" "$1" "$2" || return 1 - body=$(cat "$tmp") - rm -f "${tmp}" - echo "$body" -} -github_release() { - owner_repo=$1 - version=$2 - test -z "$version" && version="latest" - giturl="https://github.com/${owner_repo}/releases/${version}" - json=$(http_copy "$giturl" "Accept:application/json") - test -z "$json" && return 1 - version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') - test -z "$version" && return 1 - echo "$version" -} -hash_sha256() { - TARGET=${1:-/dev/stdin} - if is_command gsha256sum; then - hash=$(gsha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command sha256sum; then - hash=$(sha256sum "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command shasum; then - hash=$(shasum -a 256 "$TARGET" 2>/dev/null) || return 1 - echo "$hash" | cut -d ' ' -f 1 - elif is_command openssl; then - hash=$(openssl -dst openssl dgst -sha256 "$TARGET") || return 1 - echo "$hash" | cut -d ' ' -f a - else - log_crit "hash_sha256 unable to find command to compute sha-256 hash" - return 1 - fi -} -hash_sha256_verify() { - TARGET=$1 - checksums=$2 - if [ -z "$checksums" ]; then - log_err "hash_sha256_verify checksum file not specified in arg2" - return 1 - fi - BASENAME=${TARGET##*/} - want=$(grep "${BASENAME}" "${checksums}" 2>/dev/null | tr '\t' ' ' | cut -d ' ' -f 1) - if [ -z "$want" ]; then - log_err "hash_sha256_verify unable to find checksum for '${TARGET}' in '${checksums}'" - return 1 - fi - got=$(hash_sha256 "$TARGET") - if [ "$want" != "$got" ]; then - log_err "hash_sha256_verify checksum for '$TARGET' did not verify ${want} vs $got" - return 1 - fi -} -cat /dev/null < +## Schema + +### Required + +- `object_name` (String) Specifies the object identifier for the tag association. +- `object_type` (String) Specifies the type of object to add a tag to. ex: 'ACCOUNT', 'COLUMN', 'DATABASE', etc. For more information: https://docs.snowflake.com/en/user-guide/object-tagging.html#supported-objects +- `tag_id` (String) Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id) +- `tag_value` (String) Specifies the value of the tag, (e.g. 'finance' or 'engineering') + +### Optional + +- `skip_validation` (Boolean) If true, skips validation of the tag association. It can take up to an hour for the SNOWFLAKE.TAG_REFERENCES table to update, and also requires ACCOUNT_ADMIN role to read from. https://docs.snowflake.com/en/sql-reference/account-usage/tag_references.html +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `timeouts` + +Optional: + +- `create` (String) + +## Import + +Import is supported using the following syntax: + +```shell +# format is dbName.schemaName.tagName or dbName.schemaName.tagName +terraform import snowflake_tag_association.example 'dbName.schemaName.tagName' +``` diff --git a/docs/resources/user.md b/docs/resources/user.md index 469f95f044..20c2228994 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -25,7 +25,7 @@ resource snowflake_user user { last_name = "User" default_warehouse = "warehouse" - default_secondary_roles = ['ALL'] + default_secondary_roles = ["ALL"] default_role = "role1" rsa_public_key = "..." @@ -59,7 +59,7 @@ resource snowflake_user user { - `password` (String, Sensitive) **WARNING:** this will put the password in the terraform state file. Use carefully. - `rsa_public_key` (String) Specifies the user’s RSA public key; used for key-pair authentication. Must be on 1 line without header and trailer. - `rsa_public_key_2` (String) Specifies the user’s second RSA public key; used to rotate the public and private keys for key-pair authentication based on an expiration schedule set by your organization. Must be on 1 line without header and trailer. -- `tag` (Block List) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) +- `tag` (Block List, Deprecated) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) ### Read-Only diff --git a/docs/resources/view.md b/docs/resources/view.md index 0f575bf6dd..6e330a03a5 100644 --- a/docs/resources/view.md +++ b/docs/resources/view.md @@ -43,7 +43,7 @@ SQL - `comment` (String) Specifies a comment for the view. - `is_secure` (Boolean) Specifies that the view is secure. - `or_replace` (Boolean) Overwrites the View if it exists. -- `tag` (Block List) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) +- `tag` (Block List, Deprecated) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) ### Read-Only diff --git a/docs/resources/warehouse.md b/docs/resources/warehouse.md index 25db370004..a3cdd4dd31 100644 --- a/docs/resources/warehouse.md +++ b/docs/resources/warehouse.md @@ -40,7 +40,7 @@ resource snowflake_warehouse w { - `scaling_policy` (String) Specifies the policy for automatically starting and shutting down clusters in a multi-cluster warehouse running in Auto-scale mode. - `statement_queued_timeout_in_seconds` (Number) Object parameter that specifies the time, in seconds, a SQL statement (query, DDL, DML, etc.) can be queued on a warehouse before it is canceled by the system. - `statement_timeout_in_seconds` (Number) Specifies the time, in seconds, after which a running SQL statement (query, DDL, DML, etc.) is canceled by the system -- `tag` (Block List) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) +- `tag` (Block List, Deprecated) Definitions of a tag to associate with the resource. (see [below for nested schema](#nestedblock--tag)) - `wait_for_provisioning` (Boolean) Specifies whether the warehouse, after being resized, waits for all the servers to provision before executing any queued or new queries. - `warehouse_size` (String) Specifies the size of the virtual warehouse. Larger warehouse sizes 5X-Large and 6X-Large are currently in preview and only available on Amazon Web Services (AWS). diff --git a/examples/resources/snowflake_notification_integration/resource.tf b/examples/resources/snowflake_notification_integration/resource.tf index ef038e751f..2a551606b5 100644 --- a/examples/resources/snowflake_notification_integration/resource.tf +++ b/examples/resources/snowflake_notification_integration/resource.tf @@ -12,12 +12,12 @@ resource snowflake_notification_integration integration { azure_tenant_id = "..." # AWS_SQS - notification_provider = "AWS_SQS" - aws_sqs_arn = "..." - aws_sqs_role_arn = "..." + #notification_provider = "AWS_SQS" + #aws_sqs_arn = "..." + #aws_sqs_role_arn = "..." # AWS_SNS - notification_provider = "AWS_SNS" - aws_sns_topic_arn = "..." - aws_sns_role_arn = "..." + #notification_provider = "AWS_SNS" + #aws_sns_topic_arn = "..." + #aws_sns_role_arn = "..." } diff --git a/examples/resources/snowflake_tag/resource.tf b/examples/resources/snowflake_tag/resource.tf index d53e30ce81..610009e659 100644 --- a/examples/resources/snowflake_tag/resource.tf +++ b/examples/resources/snowflake_tag/resource.tf @@ -1,10 +1,15 @@ -resource "snowflake_tag" "test_tag" { - // Required - name = "tag_name" - database = "test_db" - schema = "test_schema" +resource "snowflake_database" "database" { + name = "db1" +} + +resource "snowflake_schema" "schema" { + name = "schema1" + database = snowflake_database.database.name +} - // Optionals - comment = "test comment" - allowed_values = ["foo", "bar"] +resource "snowflake_tag" "tag" { + name = "cost_center" + database = snowflake_database.database.name + schema = snowflake_schema.schema.name + allowed_values = ["finance", "engineering"] } diff --git a/examples/resources/snowflake_tag_association/import.sh b/examples/resources/snowflake_tag_association/import.sh new file mode 100644 index 0000000000..8b55fc9a15 --- /dev/null +++ b/examples/resources/snowflake_tag_association/import.sh @@ -0,0 +1,2 @@ +# format is dbName.schemaName.tagName or dbName.schemaName.tagName +terraform import snowflake_tag_association.example 'dbName.schemaName.tagName' diff --git a/examples/resources/snowflake_tag_association/resource.tf b/examples/resources/snowflake_tag_association/resource.tf new file mode 100644 index 0000000000..a0be386e02 --- /dev/null +++ b/examples/resources/snowflake_tag_association/resource.tf @@ -0,0 +1,23 @@ +resource "snowflake_database" "database" { + name = "db1" +} + +resource "snowflake_schema" "schema" { + name = "schema1" + database = snowflake_database.database.name +} + +resource "snowflake_tag" "tag" { + name = "cost_center" + database = snowflake_database.database.name + schema = snowflake_schema.schema.name + allowed_values = ["finance", "engineering"] +} + +resource "snowflake_tag_association" "association" { + object_name = snowflake_database.database.name + object_type = "DATABASE" + tag_id = snowflake_tag.tag.id + tag_value = "finance" + skip_validation = true +} diff --git a/examples/resources/snowflake_user/resource.tf b/examples/resources/snowflake_user/resource.tf index 38e088fee6..27756c3e8a 100644 --- a/examples/resources/snowflake_user/resource.tf +++ b/examples/resources/snowflake_user/resource.tf @@ -10,7 +10,7 @@ resource snowflake_user user { last_name = "User" default_warehouse = "warehouse" - default_secondary_roles = ['ALL'] + default_secondary_roles = ["ALL"] default_role = "role1" rsa_public_key = "..." diff --git a/go.mod b/go.mod index 3987ca39f9..d215fa3dca 100644 --- a/go.mod +++ b/go.mod @@ -5,18 +5,17 @@ go 1.19 require ( github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/Pallinder/go-randomdata v1.2.0 - github.com/chanzuckerberg/go-misc v0.0.0-20220523144615-aff6a4c5021c - github.com/hashicorp/terraform-plugin-docs v0.8.1 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0 + github.com/hashicorp/terraform-plugin-docs v0.13.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.21.0 github.com/jmoiron/sqlx v1.3.5 github.com/luna-duclos/instrumentedsql v1.1.3 github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 - github.com/snowflakedb/gosnowflake v1.6.9 - github.com/stretchr/testify v1.7.1 + github.com/snowflakedb/gosnowflake v1.6.13 + github.com/stretchr/testify v1.8.0 github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a - golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 - golang.org/x/tools v0.1.10 + golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d + golang.org/x/tools v0.1.4 ) require ( @@ -25,96 +24,86 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.2 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.12 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.6 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.5 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.26.10 // indirect - github.com/aws/smithy-go v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2 v1.16.11 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.12.14 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.13 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5 // indirect + github.com/aws/smithy-go v1.12.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect - github.com/gabriel-vasile/mimetype v1.4.0 // indirect - github.com/go-test/deep v1.0.8 // indirect + github.com/gabriel-vasile/mimetype v1.4.1 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/flatbuffers v2.0.6+incompatible // indirect + github.com/google/flatbuffers v2.0.7+incompatible // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.2.0 // indirect + github.com/hashicorp/go-hclog v1.2.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.5 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.5.0 // indirect - github.com/hashicorp/hc-install v0.3.2 // indirect - github.com/hashicorp/hcl/v2 v2.12.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/hc-install v0.4.0 // indirect + github.com/hashicorp/hcl/v2 v2.13.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.16.1 // indirect + github.com/hashicorp/terraform-exec v0.17.2 // indirect github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect - github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect - github.com/hashicorp/terraform-registry-address v0.0.0-20220510144317-d78f4a47ae27 // indirect + github.com/hashicorp/terraform-plugin-go v0.14.0 // 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 - github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/huandu/xstrings v1.3.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/klauspost/compress v1.15.4 // indirect - github.com/lib/pq v1.10.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-ieproxy v0.0.1 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/mitchellh/cli v1.1.3 // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-ieproxy v0.0.7 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mitchellh/cli v1.1.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pierrec/lz4/v4 v4.1.14 // indirect + github.com/pierrec/lz4/v4 v4.1.15 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect - github.com/zclconf/go-cty v1.10.0 // indirect - golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + github.com/zclconf/go-cty v1.11.0 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c // indirect + golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220524164028-0aa58a9287dd // indirect - google.golang.org/grpc v1.46.2 // indirect - google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect + google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc // indirect + google.golang.org/grpc v1.48.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) - -exclude github.co/mattn/go-ieproxy v0.0.3 - -exclude github.co/mattn/go-ieproxy v0.0.2 diff --git a/go.sum b/go.sum index b3072edac8..4c8cae9acc 100644 --- a/go.sum +++ b/go.sum @@ -30,16 +30,14 @@ github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6z github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00lCDlaYPg= github.com/Pallinder/go-randomdata v1.2.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -49,7 +47,6 @@ github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 h1:q4dksr6IC github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= @@ -59,51 +56,47 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go-v2 v1.16.4 h1:swQTEQUyJF/UkEA94/Ga55miiKFoXmm/Zd67XHgmjSg= -github.com/aws/aws-sdk-go-v2 v1.16.4/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1 h1:SdK4Ppk5IzLs64ZMvr6MrSficMtjY2oS0WOORXTlxwU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1/go.mod h1:n8Bs1ElDD2wJ9kCRTczA83gYbBmjSwZp3umc6zF4EeM= -github.com/aws/aws-sdk-go-v2/config v1.15.7 h1:PrzhYjDpWnGSpjedmEapldQKPW4x8cCNzUI8XOho1CM= -github.com/aws/aws-sdk-go-v2/config v1.15.7/go.mod h1:exERlvqx1OoUHrxQpMgrmfSW0H6B1+r3xziZD3bBXRg= -github.com/aws/aws-sdk-go-v2/credentials v1.12.2 h1:tX4EHQFU4+O9at5QjnwIKb/Qgv7MbgbUNtqTRF0Vu2M= -github.com/aws/aws-sdk-go-v2/credentials v1.12.2/go.mod h1:/XWqDVuzclEKvzileqtD7/t+wIhOogv//6JFlKEe0Wc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.5 h1:YPxclBeE07HsLQE8vtjC8T2emcTjM9nzqsnDi2fv5UM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.5/go.mod h1:WAPnuhG5IQ/i6DETFl5NmX3kKqCzw7aau9NHAGcm4QE= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.12 h1:Gd+McyLAdshV3ZaQXt7Vd8dtLMZgcAmn5Y/mXDEO9L8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.12/go.mod h1:8pCb6S1pHhY5PulX37wdb2dqXHkM4B3ij6Z1gAOdDtE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.11 h1:gsqHplNh1DaQunEKZISK56wlpbCg0yKxNVvGWCFuF1k= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.11/go.mod h1:tmUB6jakq5DFNcXsXOA/ZQ7/C8VnSKYkx58OI7Fh79g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.5 h1:PLFj+M2PgIDHG//hw3T0O0KLI4itVtAjtxrZx4AHPLg= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.5/go.mod h1:fV1AaS2gFc1tM0RCb015FJ0pvWVUfJZANzjwoO4YakM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.12 h1:j0VqrjtgsY1Bx27tD0ysay36/K4kFMWRp9K3ieO9nLU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.12/go.mod h1:00c7+ALdPh4YeEUPXJzyU0Yy01nPGOq2+9rUaz05z9g= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.2 h1:1fs9WkbFcMawQjxEI0B5L0SqvBhJZebxWM6Z3x/qHWY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.2/go.mod h1:0jDVeWUFPbI3sOfsXXAsIdiawXcn7VBLx/IlFVTRP64= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1 h1:T4pFel53bkHjL2mMo+4DKE6r6AuoZnM0fg7k1/ratr4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1/go.mod h1:GeUru+8VzrTXV/83XyMJ80KpH8xO89VPoUileyNQ+tc= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.6 h1:9mvDAsMiN+07wcfGM+hJ1J3dOKZ2YOpDiPZ6ufRJcgw= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.6/go.mod h1:Eus+Z2iBIEfhOvhSdMTcscNOMy6n3X9/BJV0Zgax98w= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.5 h1:gRW1ZisKc93EWEORNJRvy/ZydF3o6xLSveJHdi1Oa0U= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.5/go.mod h1:ZbkttHXaVn3bBo/wpJbQGiiIWR90eTBUVBrEHUEQlho= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.5 h1:DyPYkrH4R2zn+Pdu6hM3VTuPsQYAE6x2WB24X85Sgw0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.5/go.mod h1:XtL92YWo0Yq80iN3AgYRERJqohg4TozrqRlxYhHGJ7g= -github.com/aws/aws-sdk-go-v2/service/s3 v1.26.10 h1:GWdLZK0r1AK5sKb8rhB9bEXqXCK8WNuyv4TBAD6ZviQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.26.10/go.mod h1:+O7qJxF8nLorAhuIVhYTHse6okjHJJm4EwhhzvpnkT0= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.5 h1:TfJ/zuOYvHnxkvohSwAF3Ppn9KT/SrGZuOZHTPy8Guw= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.5/go.mod h1:TFVe6Rr2joVLsYQ1ABACXgOC6lXip/qpX2x5jWg/A9w= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.6 h1:aYToU0/iazkMY67/BYLt3r6/LT/mUtarLAF5mGof1Kg= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.6/go.mod h1:rP1rEOKAGZoXp4iGDxSXFvODAtXpm34Egf0lL0eshaQ= -github.com/aws/smithy-go v1.11.2 h1:eG/N+CcUMAvsdffgMvjMKwfyDzIkjM6pfxMJ8Mzc6mE= -github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= +github.com/aws/aws-sdk-go-v2 v1.16.11 h1:xM1ZPSvty3xVmdxiGr7ay/wlqv+MWhH0rMlyLdbC0YQ= +github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4 h1:zfT11pa7ifu/VlLDpmc5OY2W4nYmnKkFDGeMVnmqAI0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.4/go.mod h1:ES0I1GBs+YYgcDS1ek47Erbn4TOL811JKqBXtgzqyZ8= +github.com/aws/aws-sdk-go-v2/config v1.17.1 h1:BWxTjokU/69BZ4DnLrZco6OvBDii6ToEdfBL/y5I1nA= +github.com/aws/aws-sdk-go-v2/config v1.17.1/go.mod h1:uOxDHjBemNTF2Zos+fgG0NNfE86wn1OAHDTGxjMEYi0= +github.com/aws/aws-sdk-go-v2/credentials v1.12.14 h1:AtVG/amkjbDBfnPr/tuW2IG18HGNznP6L12Dx0rLz+Q= +github.com/aws/aws-sdk-go-v2/credentials v1.12.14/go.mod h1:opAndTyq+YN7IpVG57z2CeNuXSQMqTYxGGlYH0m0RMY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12 h1:wgJBHO58Pc1V1QAnzdVM3JK3WbE/6eUF0JxCZ+/izz0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12/go.mod h1:aZ4vZnyUuxedC7eD4JyEHpGnCz+O2sHQEx3VvAwklSE= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27 h1:xFXIMBci0UXStoOHq/8w0XIZPB2hgb9CD7uATJhqt10= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.27/go.mod h1:+tj2cHQkChanggNZn1J2fJ1Cv6RO1TV0AA3472do31I= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18 h1:OmiwoVyLKEqqD5GvB683dbSqxiOfvx4U2lDZhG2Esc4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18/go.mod h1:348MLhzV1GSlZSMusdwQpXKbhD7X2gbI/TxwAPKkYZQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12 h1:5mvQDtNWtI6H56+E4LUnLWEmATMB7oEh+Z9RurtIuC0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12/go.mod h1:ckaCVTEdGAxO6KwTGzgskxR1xM+iJW4lxMyDFVda2Fc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19 h1:g5qq9sgtEzt2szMaDqQO6fqKe026T6dHTFJp5NsPzkQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19/go.mod h1:cVHo8KTuHjShb9V8/VjH3S/8+xPu16qx8fdGwmotJhE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.9 h1:agLpf3vtYX1rtKTrOGpevdP3iC2W0hKDmzmhhxJzL+A= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.9/go.mod h1:cv+n1mdyh+0B8tAtlEBzTYFA2Uv15SISEn6kabYhIgE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.5 h1:g1ITJ9i9ixa+/WVggLNK20KyliAA8ltnuxfZEDfo2hM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.5/go.mod h1:oehQLbMQkppKLXvpx/1Eo0X47Fe+0971DXC9UjGnKcI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.13 h1:3GamN8jcdz/a3nvL/ZVtoH/6xxeshfsiXj5O+6GW4Rg= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.13/go.mod h1:89CSPn69UECDLVn0H6FwKNgbtirksl8C8i3aBeeeihw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12 h1:7iPTTX4SAI2U2VOogD7/gmHlsgnYSgoNHt7MSQXtG2M= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12/go.mod h1:1TODGhheLWjpQWSuhYuAUWYTCKwEjx2iblIFKDHjeTc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12 h1:QFjSOmHSb77qRTv7KI9UFon9X5wLWY5/M+6la3dTcZc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.12/go.mod h1:MADjAN0GHFDuc5lRa5Y5ki+oIO/w7X4qczHy+OUx0IA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5 h1:h9qqTedYnA9JcWjKyLV6UYIMSdp91ExLCUbjbpDLH7A= +github.com/aws/aws-sdk-go-v2/service/s3 v1.27.5/go.mod h1:J8SS5Tp/zeLxaubB0xGfKnVrvssNBNLwTipreTKLhjQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.17 h1:pXxu9u2z1UqSbjO9YA8kmFJBhFc1EVTDaf7A+S+Ivq8= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.17/go.mod h1:mS5xqLZc/6kc06IpXn5vRxdLaED+jEuaSRv5BxtnsiY= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.13 h1:dl8T0PJlN92rvEGOEUiD0+YPYdPEaCZK0TqHukvSfII= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.13/go.mod h1:Ru3QVMLygVs/07UQ3YDur1AQZZp2tUNje8wfloFttC0= +github.com/aws/smithy-go v1.12.1 h1:yQRC55aXN/y1W10HgwHle01DRuV9Dpf31iGkotjt3Ag= +github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chanzuckerberg/go-misc v0.0.0-20220523144615-aff6a4c5021c h1:n/D8yP5uH3+n8bU3h/cB4IgmYkDmxooUbEjPW5fePDw= -github.com/chanzuckerberg/go-misc v0.0.0-20220523144615-aff6a4c5021c/go.mod h1:7+kdoUlpKyfas+/ouPPkZQCvLwYru3bpyuWr/OOXTSc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -136,8 +129,8 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/gabriel-vasile/mimetype v1.4.0 h1:Cn9dkdYsMIu56tGho+fqzh7XmvY2YyGU0FnbhiOsEro= -github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= +github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= +github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -156,9 +149,7 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -181,8 +172,8 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v2.0.6+incompatible h1:XHFReMv7nFFusa+CEokzWbzaYocKXI6C7hdU5Kgh9Lw= -github.com/google/flatbuffers v2.0.6+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.7+incompatible h1:YpCZ0HafTWMKIjyEE/LXp3tIpNs2lxs8XcCAEItxoaI= +github.com/google/flatbuffers v2.0.7+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -190,7 +181,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/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.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 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/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -210,50 +200,51 @@ 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.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +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-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= -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.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= +github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.5.0 h1:O293SZ2Eg+AAYijkVK3jR786Am1bhDEh2GHT0tIVE5E= github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.3.2 h1:oiQdJZvXmkNcRcEOOfM5n+VTsvNjWQeOjfAoO6dKSH8= -github.com/hashicorp/hc-install v0.3.2/go.mod h1:xMG6Tr8Fw1WFjlxH0A9v61cW15pFwgEGqEz0V4jisHs= -github.com/hashicorp/hcl/v2 v2.12.0 h1:PsYxySWpMD4KPaoJLnsHwtK5Qptvj/4Q6s0t4sUxZf4= -github.com/hashicorp/hcl/v2 v2.12.0/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= +github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= +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/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.16.1 h1:NAwZFJW2L2SaCBVZoVaH8LPImLOGbPLkSHy0IYbs2uE= -github.com/hashicorp/terraform-exec v0.16.1/go.mod h1:aj0lVshy8l+MHhFNoijNHtqTJQI3Xlowv5EOsEaGO7M= +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/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.8.1 h1:XJC/cDvmE7zJfDFCtOI1bURaencBQC0xYx3DZ5cWbhE= -github.com/hashicorp/terraform-plugin-docs v0.8.1/go.mod h1:p40z/69HYNUN/G2RDYp8XUCA5B1VzGTZl7/N9V+BWXU= -github.com/hashicorp/terraform-plugin-go v0.9.1 h1:vXdHaQ6aqL+OF076nMSBV+JKPdmXlzG5mzVDD04WyPs= -github.com/hashicorp/terraform-plugin-go v0.9.1/go.mod h1:ItjVSlQs70otlzcCwlPcU8FRXLdO973oYFRZwAOxy8M= -github.com/hashicorp/terraform-plugin-log v0.4.0 h1:F3eVnm8r2EfQCe2k9blPIiF/r2TT01SHijXnS7bujvc= -github.com/hashicorp/terraform-plugin-log v0.4.0/go.mod h1:9KclxdunFownr4pIm1jdmwKRmE4d6HVG2c9XDq47rpg= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0 h1:Qr5fWNg1SPSfCRMtou67Y6Kcy9UnMYRNlIJTKRuUvXU= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0/go.mod h1:b+LFg8WpYgFgvEBP/6Htk5H9/pJp1V1E8NJAekfH2Ws= -github.com/hashicorp/terraform-registry-address v0.0.0-20220510144317-d78f4a47ae27 h1:IOawOnLgKntezAV3oJs17rkhXha+h0EF5OMjb2KFlYc= -github.com/hashicorp/terraform-registry-address v0.0.0-20220510144317-d78f4a47ae27/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= +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-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-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= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= 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/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= @@ -269,8 +260,8 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.4 h1:1kn4/7MepF/CHmYub99/nNX8az0IJjfSOU/jbnTVfqQ= -github.com/klauspost/compress v1.15.4/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -281,30 +272,28 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/luna-duclos/instrumentedsql v1.1.3 h1:t7mvC0z1jUt5A0UQ6I/0H31ryymuQRnJcWCiqV3lSAA= github.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQLANWwZt2ULeIC8yMNYs= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= 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.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-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= +github.com/mattn/go-ieproxy v0.0.7 h1:d2hBmNUJOAf2aGgzMQtz1wBByJQvRk72/1TXBiCVHXU= +github.com/mattn/go-ieproxy v0.0.7/go.mod h1:6ZpRmhBaYuBX1U2za+9rC9iCGLsSp2tftelZne7CPko= 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/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/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -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/mitchellh/cli v1.1.3 h1:xrX6lWnp1wgXZ65TGY2SB5URdQYcXu6VILdxDf5NttQ= -github.com/mitchellh/cli v1.1.3/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= +github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= +github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -312,7 +301,6 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -327,8 +315,8 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= -github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -346,32 +334,32 @@ github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3V github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/snowflakedb/gosnowflake v1.6.9 h1:uFVAJw4wXXV2DPqn/F3wwyOXeXF5TnB4jSaLc6fFKYk= -github.com/snowflakedb/gosnowflake v1.6.9/go.mod h1:BoZ0gnLERaUEiziH4Dumim10LN8cvoaCKovsAfhxzrE= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/snowflakedb/gosnowflake v1.6.13 h1:r8iozak/p3P2jYfjF3EbeteqMMzPWjwmVrdENJDW6EI= +github.com/snowflakedb/gosnowflake v1.6.13/go.mod h1:BoZ0gnLERaUEiziH4Dumim10LN8cvoaCKovsAfhxzrE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= 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/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -387,14 +375,13 @@ github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 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.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -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.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= +github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -406,16 +393,15 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 h1:SLP7Q4Di66FONjDJbCYrCRrh97focO6sLogHO7/g8F0= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/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/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= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3 h1:n9HxLrNxWWtEb1cA950nuEEj3QnKbtsCJ6KjcgisNUs= golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf h1:oXVg4h2qJDd9htKxb5SCpFBHLipW6hXmL3qpUixS2jw= -golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf/go.mod h1:yh0Ynu2b5ZUe3MQfp2nM0ecK7wsgouWTDN0FNeJuIys= 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= @@ -432,9 +418,8 @@ golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -453,11 +438,12 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220524220425-1d687d428aca h1:xTaFYiPROfpPhqrfTIDXj0ri1SpfueYT951s4bAuDO8= -golang.org/x/net v0.0.0-20220524220425-1d687d428aca/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220107192237-5cfca573fb4d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c h1:JVAXQ10yGGVbSyoer5VILysz6YKjdNT2bsvlayjqhes= +golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -469,14 +455,10 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -485,7 +467,6 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -497,10 +478,16 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/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-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 h1:Sx/u41w+OwrInGdEckYmEuU5gHoGSL4QbDz3S9s6j4U= +golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/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 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +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= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -518,15 +505,14 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.4 h1:cVngSRcfgyZCzys3KYOpCFa+4dqX/Oub9tAq00ttGVs= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3 h1:DnoIG+QAMaF5NvxnGe/oKsgKcAc6PcUyl8q0VetfQ8s= @@ -544,8 +530,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79/go.mod h1:yiaVoXHpRzHGyxV3o4DktVWY4mSUErTKaeEOq6C3t3U= -google.golang.org/genproto v0.0.0-20220524164028-0aa58a9287dd h1:o2wC1f/WWpyVg1QyxFJWOj2VcO7CXfoxpwI5MWWfv8w= -google.golang.org/genproto v0.0.0-20220524164028-0aa58a9287dd/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc h1:Nf+EdcTLHR8qDNN/KfkQL0u0ssxt9OhbaWCl5C0ucEI= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -554,8 +540,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +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/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= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -568,8 +554,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -582,11 +568,12 @@ 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.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= 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= 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= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/main.go b/main.go index 568afce3e3..18cc74af8c 100644 --- a/main.go +++ b/main.go @@ -2,30 +2,17 @@ package main import ( "flag" - "fmt" - "log" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider" - "github.com/chanzuckerberg/go-misc/ver" "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" ) const ProviderAddr = "registry.terraform.io/Snowflake-Labs/snowflake" func main() { - version := flag.Bool("version", false, "spit out version for resources here") debug := flag.Bool("debug", false, "set to true to run the provider with support for debuggers like delve") flag.Parse() - if *version { - verString, err := ver.VersionStr() - if err != nil { - log.Fatal(err) - } - fmt.Println(verString) - return - } - plugin.Serve(&plugin.ServeOpts{ Debug: *debug, ProviderAddr: ProviderAddr, diff --git a/pkg/datasources/users.go b/pkg/datasources/users.go index 5c552a3bd6..fd09e58a25 100644 --- a/pkg/datasources/users.go +++ b/pkg/datasources/users.go @@ -141,7 +141,7 @@ func ReadUsers(d *schema.ResourceData, meta interface{}) error { userMap["default_namespace"] = user.DefaultNamespace.String userMap["default_role"] = user.DefaultRole.String userMap["default_secondary_roles"] = strings.Split( - helpers.ListContentToString(user.DefaultSecondaryRoles.String), ",") + helpers.ListContentToString(user.DefaultSecondaryRoles.String), ",") userMap["has_rsa_public_key"] = user.HasRsaPublicKey userMap["email"] = user.Email.String userMap["display_name"] = user.DisplayName.String diff --git a/pkg/datasources/warehouses_acceptance_test.go b/pkg/datasources/warehouses_acceptance_test.go index 44b8875416..c8c4ff01ac 100644 --- a/pkg/datasources/warehouses_acceptance_test.go +++ b/pkg/datasources/warehouses_acceptance_test.go @@ -1,7 +1,7 @@ package datasources_test import ( - "fmt" + //"fmt" //"strings" //"testing" // @@ -26,19 +26,19 @@ import ( // }) //} -func warehouses(warehouseName string) string { - return fmt.Sprintf(` - resource snowflake_warehouse "s"{ - name = "%v" - warehouse_size = "XSMALL" - initially_suspended = true - auto_suspend = 60 - max_concurrency_level = 8 - statement_timeout_in_seconds = 172800 - } +// func warehouses(warehouseName string) string { +// return fmt.Sprintf(` +// resource snowflake_warehouse "s"{ +// name = "%v" +// warehouse_size = "XSMALL" +// initially_suspended = true +// auto_suspend = 60 +// max_concurrency_level = 8 +// statement_timeout_in_seconds = 172800 +// } - data snowflake_warehouses "s" { - depends_on = [snowflake_warehouse.s] - } - `, warehouseName) -} +// data snowflake_warehouses "s" { +// depends_on = [snowflake_warehouse.s] +// } +// `, warehouseName) +// } diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index 7f16731487..133db522af 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -4,12 +4,14 @@ import ( "crypto/rsa" "encoding/json" "encoding/pem" + "fmt" "io" - "io/ioutil" + "net/http" + "net/url" + "os" + "strconv" + "strings" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/datasources" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/db" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" homedir "github.com/mitchellh/go-homedir" "github.com/pkg/errors" @@ -17,11 +19,9 @@ import ( "github.com/youmark/pkcs8" "golang.org/x/crypto/ssh" - "fmt" - "net/http" - "net/url" - "strconv" - "strings" + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/datasources" + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/db" + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources" ) // Provider is a provider @@ -225,6 +225,7 @@ func getResources() map[string]*schema.Resource { "snowflake_table": resources.Table(), "snowflake_external_table": resources.ExternalTable(), "snowflake_tag": resources.Tag(), + "snowflake_tag_association": resources.TagAssociation(), "snowflake_task": resources.Task(), "snowflake_user": resources.User(), "snowflake_user_ownership_grant": resources.UserOwnershipGrant(), @@ -403,7 +404,7 @@ func ReadPrivateKeyFile(privateKeyPath string) ([]byte, error) { return nil, errors.Wrap(err, "Invalid Path to private key") } - privateKeyBytes, err := ioutil.ReadFile(expandedPrivateKeyPath) + privateKeyBytes, err := os.ReadFile(expandedPrivateKeyPath) if err != nil { return nil, errors.Wrap(err, "Could not read private key") } @@ -493,7 +494,7 @@ func GetOauthAccessToken( return "", errors.New(fmt.Sprintf("Response status code: %s: %s", strconv.Itoa(response.StatusCode), http.StatusText(response.StatusCode))) } defer response.Body.Close() - body, err := ioutil.ReadAll(response.Body) + body, err := io.ReadAll(response.Body) if err != nil { return "", errors.Wrap(err, "Response body was not able to be parsed") } diff --git a/pkg/provider/provider_test.go b/pkg/provider/provider_test.go index d81522e127..8ea8f032d0 100644 --- a/pkg/provider/provider_test.go +++ b/pkg/provider/provider_test.go @@ -3,7 +3,7 @@ package provider_test import ( "bytes" "encoding/json" - "io/ioutil" + "io" "net/http" "net/url" "reflect" @@ -224,7 +224,7 @@ func TestGetOauthAccessToken(t *testing.T) { } return &http.Response{ StatusCode: statusCODE, - Body: ioutil.NopCloser(bytes.NewBufferString(tt.want)), + Body: io.NopCloser(bytes.NewBufferString(tt.want)), Header: make(http.Header), } }) @@ -236,7 +236,7 @@ func TestGetOauthAccessToken(t *testing.T) { if err != nil { t.Errorf("Body was not returned %v", err) } - got, err := ioutil.ReadAll(body.Body) + got, err := io.ReadAll(body.Body) if err != nil { t.Errorf("Response body was not able to be parsed %v", err) } diff --git a/pkg/resources/account_grant.go b/pkg/resources/account_grant.go index 52cb94e3f0..724fa52508 100644 --- a/pkg/resources/account_grant.go +++ b/pkg/resources/account_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validAccountPrivileges = NewPrivilegeSet( @@ -38,7 +38,7 @@ var accountGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the account.", Default: privilegeMonitorUsage, - ValidateFunc: validation.ValidatePrivilege(validAccountPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validAccountPrivileges.ToList(), true), }, "roles": { Type: schema.TypeSet, diff --git a/pkg/resources/database_grant.go b/pkg/resources/database_grant.go index 53bcc256fe..71896d59fa 100644 --- a/pkg/resources/database_grant.go +++ b/pkg/resources/database_grant.go @@ -2,9 +2,9 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/pkg/errors" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validDatabasePrivileges = NewPrivilegeSet( @@ -30,7 +30,7 @@ var databaseGrantSchema = map[string]*schema.Schema{ Description: "The privilege to grant on the database.", Default: "USAGE", ForceNew: true, - ValidateFunc: validation.ValidatePrivilege(validDatabasePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validDatabasePrivileges.ToList(), true), }, "roles": { Type: schema.TypeSet, diff --git a/pkg/resources/external_table_grant.go b/pkg/resources/external_table_grant.go index 4ab94282d7..a0e4d89ce4 100644 --- a/pkg/resources/external_table_grant.go +++ b/pkg/resources/external_table_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -37,7 +37,7 @@ var externalTableGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future external table.", Default: "SELECT", - ValidateFunc: validation.ValidatePrivilege(validExternalTablePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validExternalTablePrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/file_format_grant.go b/pkg/resources/file_format_grant.go index 0b6cb35807..7675d0ed0d 100644 --- a/pkg/resources/file_format_grant.go +++ b/pkg/resources/file_format_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -36,7 +36,7 @@ var fileFormatGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future file format.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validFileFormatPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validFileFormatPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/function_grant.go b/pkg/resources/function_grant.go index 112c0ab838..2ef6f15a66 100644 --- a/pkg/resources/function_grant.go +++ b/pkg/resources/function_grant.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -64,7 +64,7 @@ var functionGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validFunctionPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validFunctionPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/helpers_test.go b/pkg/resources/helpers_test.go index 327d43e9b7..5c6b80f70b 100644 --- a/pkg/resources/helpers_test.go +++ b/pkg/resources/helpers_test.go @@ -3,10 +3,11 @@ package resources_test import ( "testing" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/stretchr/testify/require" + + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider" + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources" ) func database(t *testing.T, id string, params map[string]interface{}) *schema.ResourceData { diff --git a/pkg/resources/integration_grant.go b/pkg/resources/integration_grant.go index 0bf3833f5f..7c6701ec11 100644 --- a/pkg/resources/integration_grant.go +++ b/pkg/resources/integration_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validIntegrationPrivileges = NewPrivilegeSet( @@ -22,7 +22,7 @@ var integrationGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the integration.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validIntegrationPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validIntegrationPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/managed_account.go b/pkg/resources/managed_account.go index b0b60c8599..858b9a8f69 100644 --- a/pkg/resources/managed_account.go +++ b/pkg/resources/managed_account.go @@ -9,6 +9,7 @@ import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" snowflakeValidation "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) const ( @@ -48,7 +49,7 @@ var managedAccountSchema = map[string]*schema.Schema{ Optional: true, Default: SnowflakeReaderAccountType, Description: "Specifies the type of managed account.", - ValidateFunc: snowflakeValidation.ValidatePrivilege([]string{SnowflakeReaderAccountType}, true), + ValidateFunc: validation.StringInSlice([]string{SnowflakeReaderAccountType}, true), ForceNew: true, }, "comment": { diff --git a/pkg/resources/masking_policy_grant.go b/pkg/resources/masking_policy_grant.go index 041972cb40..ae2a9002b8 100644 --- a/pkg/resources/masking_policy_grant.go +++ b/pkg/resources/masking_policy_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validMaskingPoilcyPrivileges = NewPrivilegeSet( @@ -29,7 +29,7 @@ var maskingPolicyGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the masking policy.", Default: "APPLY", - ValidateFunc: validation.ValidatePrivilege(validMaskingPoilcyPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validMaskingPoilcyPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/materialized_view_grant.go b/pkg/resources/materialized_view_grant.go index 68bae7b24b..850ae69cdc 100644 --- a/pkg/resources/materialized_view_grant.go +++ b/pkg/resources/materialized_view_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -43,7 +43,7 @@ var materializedViewGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future materialized view view.", Default: "SELECT", - ValidateFunc: validation.ValidatePrivilege(validMaterializedViewPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validMaterializedViewPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/pipe_grant.go b/pkg/resources/pipe_grant.go index ea45505dc0..4dcc8bbdbb 100644 --- a/pkg/resources/pipe_grant.go +++ b/pkg/resources/pipe_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -37,7 +37,7 @@ var pipeGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future pipe.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validPipePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validPipePrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/procedure_grant.go b/pkg/resources/procedure_grant.go index 9ebcaf27f9..50e3ccd699 100644 --- a/pkg/resources/procedure_grant.go +++ b/pkg/resources/procedure_grant.go @@ -4,8 +4,8 @@ import ( "strings" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -64,7 +64,7 @@ var procedureGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future procedure.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validProcedurePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validProcedurePrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/resource_monitor.go b/pkg/resources/resource_monitor.go index cc9922dc77..debcdd26bb 100644 --- a/pkg/resources/resource_monitor.go +++ b/pkg/resources/resource_monitor.go @@ -229,9 +229,15 @@ func ReadResourceMonitor(d *schema.ResourceData, meta interface{}) error { return err } err = d.Set("notify_triggers", nTrigs) - + if err != nil { + return err + } + // Account level - d.Set("set_for_account", rm.Level.Valid && rm.Level.String == "ACCOUNT") + err = d.Set("set_for_account", rm.Level.Valid && rm.Level.String == "ACCOUNT") + if err != nil { + return err + } return err } diff --git a/pkg/resources/resource_monitor_grant.go b/pkg/resources/resource_monitor_grant.go index 82a9291f07..12a6e64973 100644 --- a/pkg/resources/resource_monitor_grant.go +++ b/pkg/resources/resource_monitor_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validResourceMonitorPrivileges = NewPrivilegeSet( @@ -23,7 +23,7 @@ var resourceMonitorGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the resource monitor.", Default: "MONITOR", - ValidateFunc: validation.ValidatePrivilege(validResourceMonitorPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validResourceMonitorPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/row_access_policy_grant.go b/pkg/resources/row_access_policy_grant.go index 381acc8053..8b56a7b7b0 100644 --- a/pkg/resources/row_access_policy_grant.go +++ b/pkg/resources/row_access_policy_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validRowAccessPoilcyPrivileges = NewPrivilegeSet( @@ -29,7 +29,7 @@ var rowAccessPolicyGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the row access policy.", Default: "APPLY", - ValidateFunc: validation.ValidatePrivilege(validRowAccessPoilcyPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validRowAccessPoilcyPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/schema_grant.go b/pkg/resources/schema_grant.go index 99fff8bce8..96bbf75179 100644 --- a/pkg/resources/schema_grant.go +++ b/pkg/resources/schema_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -49,7 +49,7 @@ var schemaGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future schema. Note that if \"OWNERSHIP\" is specified, ensure that the role that terraform is using is granted access.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validSchemaPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validSchemaPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/sequence.go b/pkg/resources/sequence.go index b8564c5d5b..94bc8cb058 100644 --- a/pkg/resources/sequence.go +++ b/pkg/resources/sequence.go @@ -226,6 +226,9 @@ func UpdateSequence(d *schema.ResourceData, meta interface{}) error { row := snowflake.QueryRow(db, stmt) sequence, err := snowflake.ScanSequence(row) + if err != nil { + return errors.Wrap(err, "unable to scan row for SHOW SEQUENCES") + } deleteSequenceErr := DeleteSequence(d, meta) if deleteSequenceErr != nil { return deleteSequenceErr diff --git a/pkg/resources/sequence_grant.go b/pkg/resources/sequence_grant.go index 80d0d965b0..0eda749a47 100644 --- a/pkg/resources/sequence_grant.go +++ b/pkg/resources/sequence_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -36,7 +36,7 @@ var sequenceGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future sequence.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validSequencePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validSequencePrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/stage_grant.go b/pkg/resources/stage_grant.go index 0b9ad67cd7..82397b9e35 100644 --- a/pkg/resources/stage_grant.go +++ b/pkg/resources/stage_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validStagePrivileges = NewPrivilegeSet( @@ -39,7 +39,7 @@ var stageGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the stage.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validStagePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validStagePrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/stream_grant.go b/pkg/resources/stream_grant.go index f88ce7bd2a..a05e28e1ab 100644 --- a/pkg/resources/stream_grant.go +++ b/pkg/resources/stream_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -36,7 +36,7 @@ var streamGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future stream.", Default: "SELECT", - ValidateFunc: validation.ValidatePrivilege(validStreamPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validStreamPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/table_grant.go b/pkg/resources/table_grant.go index 61a96898c3..3793365a80 100644 --- a/pkg/resources/table_grant.go +++ b/pkg/resources/table_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -43,7 +43,7 @@ var tableGrantSchema = map[string]*schema.Schema{ Description: "The privilege to grant on the current or future table.", Default: privilegeSelect.String(), ForceNew: true, - ValidateFunc: validation.ValidatePrivilege(validTablePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validTablePrivileges.ToList(), true), }, "roles": { Type: schema.TypeSet, diff --git a/pkg/resources/tag.go b/pkg/resources/tag.go index 82da4daedf..bf6d975415 100644 --- a/pkg/resources/tag.go +++ b/pkg/resources/tag.go @@ -55,6 +55,7 @@ var tagReferenceSchema = &schema.Schema{ Optional: true, MinItems: 0, Description: "Definitions of a tag to associate with the resource.", + Deprecated: "Use the 'snowflake_tag_association' resource instead.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { @@ -81,7 +82,7 @@ var tagReferenceSchema = &schema.Schema{ }, } -type tagID struct { +type TagID struct { DatabaseName string SchemaName string TagName string @@ -125,7 +126,7 @@ func handleTagChanges(db *sql.DB, d *schema.ResourceData, builder TagBuilder) er // String() takes in a schemaID object and returns a pipe-delimited string: // DatabaseName|SchemaName|TagName -func (ti *tagID) String() (string, error) { +func (ti *TagID) String() (string, error) { var buf bytes.Buffer csvWriter := csv.NewWriter(&buf) csvWriter.Comma = schemaIDDelimiter @@ -140,7 +141,7 @@ func (ti *tagID) String() (string, error) { // tagIDFromString() takes in a pipe-delimited string: DatabaseName|tagName // and returns a tagID object -func tagIDFromString(stringID string) (*tagID, error) { +func tagIDFromString(stringID string) (*TagID, error) { reader := csv.NewReader(strings.NewReader(stringID)) reader.Comma = tagIDDelimiter lines, err := reader.ReadAll() @@ -155,7 +156,7 @@ func tagIDFromString(stringID string) (*tagID, error) { return nil, fmt.Errorf("3 fields allowed") } - tagResult := &tagID{ + tagResult := &TagID{ DatabaseName: lines[0][0], SchemaName: lines[0][1], TagName: lines[0][2], @@ -203,7 +204,7 @@ func CreateTag(d *schema.ResourceData, meta interface{}) error { return errors.Wrapf(err, "error creating tag %v", name) } - tagID := &tagID{ + tagID := &TagID{ DatabaseName: database, SchemaName: schema, TagName: name, diff --git a/pkg/resources/tag_association.go b/pkg/resources/tag_association.go new file mode 100644 index 0000000000..cb6cec558b --- /dev/null +++ b/pkg/resources/tag_association.go @@ -0,0 +1,186 @@ +package resources + +import ( + "context" + "database/sql" + "fmt" + "log" + "time" + + "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/helper/validation" + + "github.com/pkg/errors" + + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" + snowflakeValidation "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" +) + +var tagAssociationSchema = map[string]*schema.Schema{ + "object_name": { + Type: schema.TypeString, + Required: true, + Description: "Specifies the object identifier for the tag association.", + ForceNew: true, + }, + "object_type": { + Type: schema.TypeString, + Required: true, + Description: "Specifies the type of object to add a tag to. ex: 'ACCOUNT', 'COLUMN', 'DATABASE', etc. " + + "For more information: https://docs.snowflake.com/en/user-guide/object-tagging.html#supported-objects", + ValidateFunc: validation.StringInSlice([]string{ + "ACCOUNT", "COLUMN", "DATABASE", "INTEGRATION", "PIPE", "ROLE", "SCHEMA", "STREAM", "SHARE", "STAGE", + "TABLE", "TASK", "USER", "VIEW", "WAREHOUSE", + }, true), + ForceNew: true, + }, + "tag_id": { + Type: schema.TypeString, + Required: true, + Description: "Specifies the identifier for the tag. Note: format must follow: \"databaseName\".\"schemaName\".\"tagName\" or \"databaseName.schemaName.tagName\" or \"databaseName|schemaName.tagName\" (snowflake_tag.tag.id)", + ValidateFunc: snowflakeValidation.ValidateFullyQualifiedTagID, + ForceNew: true, + }, + "tag_value": { + Type: schema.TypeString, + Required: true, + Description: "Specifies the value of the tag, (e.g. 'finance' or 'engineering')", + ForceNew: true, + }, + "skip_validation": { + Type: schema.TypeBool, + Optional: true, + Description: "If true, skips validation of the tag association. It can take up to an hour for the SNOWFLAKE.TAG_REFERENCES table to update, and also requires ACCOUNT_ADMIN role to read from. https://docs.snowflake.com/en/sql-reference/account-usage/tag_references.html", + Default: false, + }, +} + +// Schema returns a pointer to the resource representing a schema +func TagAssociation() *schema.Resource { + return &schema.Resource{ + Create: CreateTagAssociation, + Read: ReadTagAssociation, + Update: UpdateTagAssociation, + Delete: DeleteTagAssociation, + + Schema: tagAssociationSchema, + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(70 * time.Minute), + }, + } +} + +// CreateSchema implements schema.CreateFunc +func CreateTagAssociation(d *schema.ResourceData, meta interface{}) error { + db := meta.(*sql.DB) + tagID := d.Get("tag_id").(string) + objectName := d.Get("object_name").(string) + objectType := d.Get("object_type").(string) + tagValue := d.Get("tag_value").(string) + builder := snowflake.TagAssociation(tagID).WithObjectName(objectName).WithObjectType(objectType).WithTagValue(tagValue) + + q := builder.Create() + err := snowflake.Exec(db, q) + if err != nil { + return errors.Wrapf(err, "error associating tag to object: [%v] with command: [%v], tag_id [%v]", objectName, q, tagID) + } + + skipValidate := d.Get("skip_validation").(bool) + if !skipValidate { + log.Printf("[DEBUG] validating tag creation") + + err = resource.RetryContext(context.Background(), d.Timeout(schema.TimeoutCreate)-time.Minute, func() *resource.RetryError { + + resp, err := snowflake.ListTagAssociations(builder, db) + + if err != nil { + return resource.NonRetryableError(fmt.Errorf("error: %s", err)) + } + + // if length of response is zero, tag association was not found. retry for up to 70 minutes + if len(resp) == 0 { + return resource.RetryableError(fmt.Errorf("expected tag association to be created but not yet created")) + } + return nil + }) + if err != nil { + return errors.Wrap(err, "error validating tag association") + } + } + t := &TagID{ + DatabaseName: builder.GetTagDatabase(), + SchemaName: builder.GetTagSchema(), + TagName: builder.GetTagName(), + } + dataIDInput, err := t.String() + if err != nil { + return errors.Wrap(err, "error creating tag id") + } + d.SetId(dataIDInput) + return ReadTagAssociation(d, meta) + +} + +// ReadSchema implements schema.ReadFunc +func ReadTagAssociation(d *schema.ResourceData, meta interface{}) error { + db := meta.(*sql.DB) + + tagName := d.Get("tag_id").(string) + objectName := d.Get("object_name").(string) + objectType := d.Get("object_type").(string) + tagValue := d.Get("tag_value").(string) + skipValidate := d.Get("skip_validation").(bool) + if skipValidate { + log.Printf("[DEBUG] skipping read for tag association that has skip_validation enabled") + return nil + } + + builder := snowflake.TagAssociation(tagName).WithObjectName(objectName).WithObjectType(objectType).WithTagValue(tagValue) + _, err := snowflake.ListTagAssociations(builder, db) + if err == sql.ErrNoRows { + // If not found, mark resource to be removed from state file during apply or refresh + log.Printf("[DEBUG] tag associations (%s) not found", d.Id()) + d.SetId("") + return nil + } + if err != nil { + //return err + return errors.Wrapf(err, "error listing tags, error is x") + } + + return nil +} + +func UpdateTagAssociation(d *schema.ResourceData, meta interface{}) error { + if d.HasChange("skip_validation") { + old, new := d.GetChange("skip_validation") + log.Printf("[DEBUG] skip_validation changed from %v to %v", old, new) + } + + return ReadTagAssociation(d, meta) +} + +// DeleteSchema implements schema.DeleteFunc +func DeleteTagAssociation(d *schema.ResourceData, meta interface{}) error { + db := meta.(*sql.DB) + + tagName := d.Get("tag_id").(string) + objectName := d.Get("object_name").(string) + objectType := d.Get("object_type").(string) + + q := snowflake.TagAssociation(tagName).WithObjectName(objectName).WithObjectType(objectType).Drop() + + err := snowflake.Exec(db, q) + if err != nil { + log.Printf("[DEBUG] error is %v", err.Error()) + return errors.Wrapf(err, "error deleting tag association for object [%v]", objectName) + } + + d.SetId("") + + return nil +} diff --git a/pkg/resources/tag_association_acceptance_test.go b/pkg/resources/tag_association_acceptance_test.go new file mode 100644 index 0000000000..d0029860c9 --- /dev/null +++ b/pkg/resources/tag_association_acceptance_test.go @@ -0,0 +1,63 @@ +package resources_test + +import ( + "fmt" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" +) + +func TestAcc_TagAssociation(t *testing.T) { + accName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) + + resource.ParallelTest(t, resource.TestCase{ + Providers: providers(), + CheckDestroy: nil, + Steps: []resource.TestStep{ + { + Config: tagAssociationConfig(accName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("snowflake_tag_association.test", "object_name", accName), + resource.TestCheckResourceAttr("snowflake_tag_association.test", "object_type", "DATABASE"), + resource.TestCheckResourceAttr("snowflake_tag_association.test", "tag_id", fmt.Sprintf("%s|%s|%s", accName, accName, accName)), + resource.TestCheckResourceAttr("snowflake_tag_association.test", "tag_value", "finance"), + resource.TestCheckResourceAttr("snowflake_tag_association.test", "skip_validation", "true"), + ), + }, + }, + }) +} + +func tagAssociationConfig(n string) string { + return fmt.Sprintf(` +resource "snowflake_database" "test" { + name = "%[1]v" + comment = "Terraform acceptance test" +} + +resource "snowflake_schema" "test" { + name = "%[1]v" + database = snowflake_database.test.name + comment = "Terraform acceptance test" +} + +resource "snowflake_tag" "test" { + name = "%[1]v" + database = snowflake_database.test.name + schema = snowflake_schema.test.name + allowed_values = ["finance", "hr"] + comment = "Terraform acceptance test" +} + +resource "snowflake_tag_association" "test" { + object_name = snowflake_database.test.name + object_type = "DATABASE" + tag_id = snowflake_tag.test.id + tag_value = "finance" + skip_validation = true +} +`, n) +} + diff --git a/pkg/resources/tag_grant.go b/pkg/resources/tag_grant.go index 8e64cf7585..77f0e6db96 100644 --- a/pkg/resources/tag_grant.go +++ b/pkg/resources/tag_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validTagPrivileges = NewPrivilegeSet( @@ -29,7 +29,7 @@ var tagGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the tag.", Default: "APPLY", - ValidateFunc: validation.ValidatePrivilege(validTagPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validTagPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/task_grant.go b/pkg/resources/task_grant.go index 5d34180bf1..f881535744 100644 --- a/pkg/resources/task_grant.go +++ b/pkg/resources/task_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -37,7 +37,7 @@ var taskGrantSchema = map[string]*schema.Schema{ Optional: true, Description: "The privilege to grant on the current or future task.", Default: "USAGE", - ValidateFunc: validation.ValidatePrivilege(validTaskPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validTaskPrivileges.ToList(), true), ForceNew: true, }, "roles": { diff --git a/pkg/resources/user.go b/pkg/resources/user.go index 8afd6c72fb..4b6c9d9bf1 100644 --- a/pkg/resources/user.go +++ b/pkg/resources/user.go @@ -6,8 +6,9 @@ import ( "regexp" "strings" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + + "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" ) var userProperties = []string{ @@ -159,8 +160,6 @@ func User() *schema.Resource { } } -// func DeleteResource(t string, builder func(string) *snowflake.Builder) func(*schema.ResourceData, interface{}) error { - func CreateUser(d *schema.ResourceData, meta interface{}) error { return CreateResource("user", userProperties, userSchema, snowflake.User, ReadUser)(d, meta) } diff --git a/pkg/resources/user_public_keys.go b/pkg/resources/user_public_keys.go index 218a94a7c8..610bf43d9e 100644 --- a/pkg/resources/user_public_keys.go +++ b/pkg/resources/user_public_keys.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/chanzuckerberg/go-misc/sets" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -115,7 +114,7 @@ func UpdateUserPublicKeys(d *schema.ResourceData, meta interface{}) error { name := d.Id() propsToSet := map[string]string{} - propsToUnset := sets.NewStringSet() + propsToUnset := map[string]string{} for _, prop := range userPublicKeyProperties { // if key hasn't changed, continue @@ -127,7 +126,7 @@ func UpdateUserPublicKeys(d *schema.ResourceData, meta interface{}) error { if publicKeyOK { // if set, then we should update the value propsToSet[prop] = publicKey.(string) } else { // if now unset, we should unset the key from the user - propsToUnset.Add(publicKey.(string)) + propsToUnset[prop]=publicKey.(string) } } @@ -140,8 +139,8 @@ func UpdateUserPublicKeys(d *schema.ResourceData, meta interface{}) error { } // unset the keys we decided should be unset - for _, prop := range propsToUnset.List() { - err := unsetUserPublicKeys(db, name, prop) + for k := range propsToUnset { + err := unsetUserPublicKeys(db, name, k) if err != nil { return err } diff --git a/pkg/resources/view_grant.go b/pkg/resources/view_grant.go index 70f0417c00..a087cfd855 100644 --- a/pkg/resources/view_grant.go +++ b/pkg/resources/view_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/pkg/errors" ) @@ -38,7 +38,7 @@ var viewGrantSchema = map[string]*schema.Schema{ Description: "The privilege to grant on the current or future view.", Default: privilegeSelect.String(), ForceNew: true, - ValidateFunc: validation.ValidatePrivilege(validViewPrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validViewPrivileges.ToList(), true), }, "roles": { Type: schema.TypeSet, diff --git a/pkg/resources/warehouse_grant.go b/pkg/resources/warehouse_grant.go index f20b8e80ff..3e2f9052c3 100644 --- a/pkg/resources/warehouse_grant.go +++ b/pkg/resources/warehouse_grant.go @@ -2,8 +2,8 @@ package resources import ( "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake" - "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) var validWarehousePrivileges = NewPrivilegeSet( @@ -26,7 +26,7 @@ var warehouseGrantSchema = map[string]*schema.Schema{ Description: "The privilege to grant on the warehouse.", Default: privilegeUsage.String(), ForceNew: true, - ValidateFunc: validation.ValidatePrivilege(validWarehousePrivileges.ToList(), true), + ValidateFunc: validation.StringInSlice(validWarehousePrivileges.ToList(), true), }, "roles": { Type: schema.TypeSet, diff --git a/pkg/snowflake/tag_association.go b/pkg/snowflake/tag_association.go new file mode 100644 index 0000000000..1964f79745 --- /dev/null +++ b/pkg/snowflake/tag_association.go @@ -0,0 +1,121 @@ +package snowflake + +import ( + "database/sql" + "fmt" + "log" + "strings" + + "github.com/jmoiron/sqlx" + "github.com/pkg/errors" +) + +// TagAssociationBuilder abstracts the creation of SQL queries for a Snowflake tag +type TagAssociationBuilder struct { + databaseName string + objectName string + objectType string + schemaName string + tagName string + tagValue string +} + +type tagAssociation struct { + ColumnId sql.NullString `db:"COLUMN_ID"` + ColumnName sql.NullString `db:"COLUMN_NAME"` + Domain sql.NullString `db:"DOMAIN"` + ObjectDatabase sql.NullString `db:"OBJECT_DATABASE"` + ObjectDeleted sql.NullString `db:"OBJECT_DELETED"` + ObjectId sql.NullString `db:"OBJECT_ID"` + ObjectName sql.NullString `db:"OBJECT_NAME"` + ObjectSchema sql.NullString `db:"OBJECT_SCHEMA"` + TagDatabase sql.NullString `db:"TAG_DATABASE"` + TagId sql.NullString `db:"TAG_ID"` + TagName sql.NullString `db:"TAG_NAME"` + TagSchema sql.NullString `db:"TAG_SCHEMA"` + TagValue sql.NullString `db:"TAG_VALUE"` +} + +// WithObjectId adds the name of the schema to the TagAssociationBuilder +func (tb *TagAssociationBuilder) WithObjectName(objectName string) *TagAssociationBuilder { + tb.objectName = objectName + return tb +} + +// WithObjectType adds the object type of the resource to add tag attachement to the TagAssociationBuilder +func (tb *TagAssociationBuilder) WithObjectType(objectType string) *TagAssociationBuilder { + tb.objectType = objectType + return tb +} + +// WithTagValue adds the name of the tag value to the TagAssociationBuilder +func (tb *TagAssociationBuilder) WithTagValue(tagValue string) *TagAssociationBuilder { + tb.tagValue = tagValue + return tb +} + +// GetTagDatabase returns the value of the tag database of TagAssociationBuilder +func (tb *TagAssociationBuilder) GetTagDatabase() string { + return tb.databaseName +} + +// GetTagName returns the value of the tag name of TagAssociationBuilder +func (tb *TagAssociationBuilder) GetTagName() string { + return tb.schemaName +} + +// GetTagSchema returns the value of the tag schema of TagAssociationBuilder +func (tb *TagAssociationBuilder) GetTagSchema() string { + return tb.schemaName +} + +// TagAssociation returns a pointer to a Builder that abstracts the DDL operations for a tag sssociation. +// +// Supported DDL operations are: +// - CREATE TAG +// - DROP TAG +// +// [Snowflake Reference](https://docs.snowflake.com/en/user-guide/object-tagging.html) +func TagAssociation(tagID string) *TagAssociationBuilder { + parsedString := strings.Replace(tagID, "\"", "", -1) + + var s []string + if strings.Contains(parsedString, "|") { + s = strings.Split(parsedString, "|") + } else if strings.Contains(parsedString, ".") { + s = strings.Split(parsedString, ".") + } + return &TagAssociationBuilder{ + databaseName: s[0], + schemaName: s[1], + tagName: s[2], + } +} + +// Create returns the SQL query that will set the tag on an object. +func (tb *TagAssociationBuilder) Create() string { + return fmt.Sprintf(`ALTER %v "%v" SET TAG "%v"."%v"."%v" = '%v'`, tb.objectType, tb.objectName, tb.databaseName, tb.schemaName, tb.tagName, tb.tagValue) +} + +// Drop returns the SQL query that will remove a tag from an object. +func (tb *TagAssociationBuilder) Drop() string { + return fmt.Sprintf(`ALTER %v "%v" UNSET TAG "%v"."%v"."%v"`, tb.objectType, tb.objectName, tb.databaseName, tb.schemaName, tb.tagName) +} + +func ListTagAssociations(tb *TagAssociationBuilder, db *sql.DB) ([]tagAssociation, error) { + stmt := fmt.Sprintf(`SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES WHERE TAG_NAME = '%v' AND DOMAIN = '%v' AND TAG_VALUE = '%v'`, tb.tagName, tb.objectType, tb.tagValue) + rows, err := db.Query(stmt) + if err != nil { + return nil, err + } + defer rows.Close() + tagAssociations := []tagAssociation{} + err = sqlx.StructScan(rows, &tagAssociations) + log.Printf("[DEBUG] tagAssociations is %v", tagAssociations) + + if err == sql.ErrNoRows { + log.Printf("[DEBUG] no tag associations found for tag %s", tb.tagName) + return nil, err + } + return tagAssociations, errors.Wrapf(err, "unable to scan row for %s", stmt) +} diff --git a/pkg/testhelpers/fixtures.go b/pkg/testhelpers/fixtures.go index 454b159647..896060effc 100644 --- a/pkg/testhelpers/fixtures.go +++ b/pkg/testhelpers/fixtures.go @@ -1,7 +1,7 @@ package testhelpers import ( - "io/ioutil" + "os" "path/filepath" "testing" ) @@ -15,6 +15,6 @@ func MustFixture(t *testing.T, name string) string { } func Fixture(name string) (string, error) { - b, err := ioutil.ReadFile(filepath.Join("testdata", name)) + b, err := os.ReadFile(filepath.Join("testdata", name)) return string(b), err } diff --git a/pkg/validation/validation.go b/pkg/validation/validation.go index 63bf6b62d7..7b326b4f22 100644 --- a/pkg/validation/validation.go +++ b/pkg/validation/validation.go @@ -4,9 +4,6 @@ import ( "fmt" "strings" "unicode" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) const ( @@ -62,26 +59,6 @@ func ValidatePassword(i interface{}, k string) (s []string, errs []error) { return } -// ValidatePrivilege validates the privilege is in the authorized set. -// Will also check for the ALL privilege and hopefully provide a helpful error message. -func ValidatePrivilege(valid []string, ignoreCase bool) schema.SchemaValidateFunc { - //lintignore:V013 - return func(i interface{}, k string) (warnings []string, errors []error) { - v, ok := i.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) - return warnings, errors - } - - if v == "ALL" || (ignoreCase && strings.ToUpper(v) == "ALL") { - errors = append(errors, fmt.Errorf("the ALL privilege is deprecated, see https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/318")) - return warnings, errors - } - - return validation.StringInSlice(valid, ignoreCase)(i, k) - } -} - // ValidateIsNotAccountLocator validates that the account value is not an account locator. Account locators have the // following format: 8 characters where the first 3 characters are letters and the last 5 are digits. ex: ABC12345 // The desired format should be 'organization_name.account_name' ex: testOrgName.testAccName @@ -115,3 +92,22 @@ func ValidateIsNotAccountLocator(i interface{}, k string) (s []string, errors [] } return } + +func ValidateFullyQualifiedTagID(i interface{}, k string) (s []string, errors []error) { + v, _ := i.(string) + if strings.Contains(v, ".") { + tagArray := strings.Split(v, ".") + if len(tagArray) != 3 { + errors = append(errors, fmt.Errorf("%v, is not a valid tag id. If using period delimiter, three parts must be specified dbName.schemaName.tagName ", v)) + } + } else if strings.Contains(v, "|") { + tagArray := strings.Split(v, "|") + if len(tagArray) != 3 { + errors = append(errors, fmt.Errorf("%v, is not a valid tag id. If using pipe delimiter, three parts must be specified dbName|schemaName|tagName ", v)) + } + } else { + errors = append(errors, fmt.Errorf("%v, is not a valid tag id. please use one of the following formats:"+ + "\n'dbName'.'schemaName'.'tagName' or dbName|schemaName|tagName ", v)) + } + return +} diff --git a/pkg/validation/validation_test.go b/pkg/validation/validation_test.go index 299ed418d7..16f434046b 100644 --- a/pkg/validation/validation_test.go +++ b/pkg/validation/validation_test.go @@ -33,30 +33,6 @@ func TestValidatePassword(t *testing.T) { } } -func TestValidatePrivilege(t *testing.T) { - r := require.New(t) - - // even if we "allow" ALL, error out - w, errs := ValidatePrivilege([]string{"ALL"}, true)("ALL", "unused") - r.Empty(w) - r.Len(errs, 1) - r.Equal( - "the ALL privilege is deprecated, see https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/318", - errs[0].Error(), - ) - - // fail if not in set - w, errs = ValidatePrivilege([]string{"YES"}, true)("NO", "unused") - r.Empty(w) - r.Len(errs, 1) - r.Equal("expected unused to be one of [YES], got NO", errs[0].Error()) - - // success - w, errs = ValidatePrivilege([]string{"YES"}, true)("YES", "unused") - r.Empty(w) - r.Empty(errs) -} - var validAccounts = []string{ "testOrg.testAcc", "testingOrg2.testingAcc2",