From b9e68d94f28c56a9f9d6a97c22a330010d236894 Mon Sep 17 00:00:00 2001 From: Dario Ferrer Date: Fri, 22 Apr 2022 17:56:30 +0200 Subject: [PATCH 1/2] GitSource: added git source deployment Followed the API documentation https://vercel.com/docs/rest-api#endpoints/deployments/create-a-new-deployment --- client/deployment_create.go | 25 ++++++++++++++--------- vercel/resource_deployment.go | 31 ++++++++++++++++++++++++++++- vercel/resource_deployment_model.go | 19 ++++++++++++++++++ 3 files changed, 65 insertions(+), 10 deletions(-) diff --git a/client/deployment_create.go b/client/deployment_create.go index 5ac38fc5..ff7cc046 100644 --- a/client/deployment_create.go +++ b/client/deployment_create.go @@ -20,6 +20,11 @@ type DeploymentFile struct { Sha string `json:"sha"` Size int `json:"size"` } +type GitSource struct { + RepoId string `json:"repoId"` + Ref string `json:"ref"` + Type string `json:"type"` +} // CreateDeploymentRequest defines the request the Vercel API expects in order to create a deployment. type CreateDeploymentRequest struct { @@ -35,6 +40,7 @@ type CreateDeploymentRequest struct { Regions []string `json:"regions,omitempty"` Routes []interface{} `json:"routes,omitempty"` Target string `json:"target,omitempty"` + GitSource GitSource `json:"gitSource,omitempty"` } // DeploymentResponse defines the response the Vercel API returns when a deployment is created or updated. @@ -59,15 +65,16 @@ type DeploymentResponse struct { Build struct { Environment []string `json:"env"` } `json:"build"` - AliasAssigned bool `json:"aliasAssigned"` - ChecksConclusion string `json:"checksConclusion"` - ErrorCode string `json:"errorCode"` - ErrorMessage string `json:"errorMessage"` - ID string `json:"id"` - ProjectID string `json:"projectId"` - ReadyState string `json:"readyState"` - Target *string `json:"target"` - URL string `json:"url"` + GitSource GitSource `json:"git_source"` + AliasAssigned bool `json:"aliasAssigned"` + ChecksConclusion string `json:"checksConclusion"` + ErrorCode string `json:"errorCode"` + ErrorMessage string `json:"errorMessage"` + ID string `json:"id"` + ProjectID string `json:"projectId"` + ReadyState string `json:"readyState"` + Target *string `json:"target"` + URL string `json:"url"` } // IsComplete is used to determine whether a deployment is still processing, or whether it is fully done. diff --git a/vercel/resource_deployment.go b/vercel/resource_deployment.go index 730b24a1..d7fbe1a1 100644 --- a/vercel/resource_deployment.go +++ b/vercel/resource_deployment.go @@ -80,7 +80,7 @@ Once the build step has completed successfully, a new, immutable deployment will }, "files": { Description: "A map of files to be uploaded for the deployment. This should be provided by a `vercel_project_directory` or `vercel_file` data source.", - Required: true, + Optional: true, PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()}, Type: types.MapType{ ElemType: types.StringType, @@ -89,6 +89,34 @@ Once the build step has completed successfully, a new, immutable deployment will mapItemsMinCount(1), }, }, + "git_source": { + Description: "A map with the Git repo information", + Optional: true, + PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()}, + Attributes: tfsdk.SingleNestedAttributes(map[string]tfsdk.Attribute{ + "repo_id": { + Required: true, + PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()}, + Type: types.StringType, + Description: "Frontend git repo ID", + }, + "ref": { + Required: true, + PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()}, + Type: types.StringType, + Description: "Branch or commit hash", + }, + "type": { + Required: true, + PlanModifiers: tfsdk.AttributePlanModifiers{tfsdk.RequiresReplace()}, + Type: types.StringType, + Description: "Type of git repo, supported values are: github", + Validators: []tfsdk.AttributeValidator{ + stringOneOf("github"), + }, + }, + }), + }, "project_settings": { Description: "Project settings that will be applied to the deployment.", Optional: true, @@ -193,6 +221,7 @@ func (r resourceDeployment) Create(ctx context.Context, req tfsdk.CreateResource ProjectID: plan.ProjectID.Value, ProjectSettings: plan.ProjectSettings.toRequest(), Target: target, + GitSource: plan.GitSource.toRequest(), } out, err := r.p.client.CreateDeployment(ctx, cdr, plan.TeamID.Value) diff --git a/vercel/resource_deployment_model.go b/vercel/resource_deployment_model.go index 6f8d7902..a9c16011 100644 --- a/vercel/resource_deployment_model.go +++ b/vercel/resource_deployment_model.go @@ -20,6 +20,13 @@ type ProjectSettings struct { RootDirectory types.String `tfsdk:"root_directory"` } +// GitSource represents the Git integration source for a deployment. +type GitSource struct { + RepoId types.String `tfsdk:"repo_id"` + Ref types.String `tfsdk:"ref"` + Type types.String `tfsdk:"type"` +} + // Deployment represents the terraform state for a deployment resource. type Deployment struct { Domains types.List `tfsdk:"domains"` @@ -32,6 +39,7 @@ type Deployment struct { ProjectSettings *ProjectSettings `tfsdk:"project_settings"` TeamID types.String `tfsdk:"team_id"` URL types.String `tfsdk:"url"` + GitSource *GitSource `tfsdk:"git_source"` } // setIfNotUnknown is a helper function to set a value in a map if it is not unknown. @@ -45,6 +53,16 @@ func setIfNotUnknown(m map[string]interface{}, v types.String, name string) { } } +// toRequest takes the input of GitSource and converts them into the required +// format for a CreateDeploymentRequest. +func (g *GitSource) toRequest() client.GitSource { + var gs client.GitSource + gs.Ref = g.Ref.Value + gs.RepoId = g.RepoId.Value + gs.Type = g.Type.Value + return gs +} + // toRequest takes a set of ProjectSettings and converts them into the required // format for a CreateDeploymentRequest. func (p *ProjectSettings) toRequest() map[string]interface{} { @@ -185,5 +203,6 @@ func convertResponseToDeployment(response client.DeploymentResponse, plan Deploy Files: plan.Files, PathPrefix: fillStringNull(plan.PathPrefix), ProjectSettings: plan.ProjectSettings.fillNulls(), + GitSource: plan.GitSource, } } From 0d06222bf05192db67fb8571634c6453ef9e616f Mon Sep 17 00:00:00 2001 From: Dario Ferrer Date: Mon, 25 Apr 2022 16:52:27 +0200 Subject: [PATCH 2/2] Documentation: Documentation was updated Ran `go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs` and that updated the docs, including some formatting. --- docs/data-sources/file.md | 6 ++-- docs/data-sources/project.md | 36 +++++++++++----------- docs/data-sources/project_directory.md | 6 ++-- docs/index.md | 6 ++-- docs/resources/deployment.md | 41 ++++++++++++++++---------- docs/resources/project.md | 36 +++++++++++----------- docs/resources/project_domain.md | 14 ++++----- go.mod | 14 ++++++++- go.sum | 15 ++++++++++ 9 files changed, 106 insertions(+), 68 deletions(-) diff --git a/docs/data-sources/file.md b/docs/data-sources/file.md index 038e1b82..9ba4a959 100644 --- a/docs/data-sources/file.md +++ b/docs/data-sources/file.md @@ -38,11 +38,11 @@ resource "vercel_deployment" "example" { ### Required -- **path** (String) The path to the file on your filesystem. Note that the path is relative to the root of the terraform files. +- `path` (String) The path to the file on your filesystem. Note that the path is relative to the root of the terraform files. ### Read-Only -- **file** (Map of String) A map of filename to metadata about the file. The metadata contains the file size and hash, and allows a deployment to be created if the file changes. -- **id** (String) The ID of this resource. +- `file` (Map of String) A map of filename to metadata about the file. The metadata contains the file size and hash, and allows a deployment to be created if the file changes. +- `id` (String) The ID of this resource. diff --git a/docs/data-sources/project.md b/docs/data-sources/project.md index 6b62b13e..9b77b74b 100644 --- a/docs/data-sources/project.md +++ b/docs/data-sources/project.md @@ -34,34 +34,34 @@ output "project_id" { ### Required -- **name** (String) The name of the project. +- `name` (String) The name of the project. ### Optional -- **team_id** (String) The team ID the project exists beneath. +- `team_id` (String) The team ID the project exists beneath. ### Read-Only -- **build_command** (String) The build command for this project. If omitted, this value will be automatically detected. -- **dev_command** (String) The dev command for this project. If omitted, this value will be automatically detected. -- **environment** (Attributes Set) A list of environment variables that should be configured for the project. (see [below for nested schema](#nestedatt--environment)) -- **framework** (String) The framework that is being used for this project. If omitted, no framework is selected. -- **git_repository** (Attributes) The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed. This requires the corresponding Vercel for [Github](https://vercel.com/docs/concepts/git/vercel-for-github), [Gitlab](https://vercel.com/docs/concepts/git/vercel-for-gitlab) or [Bitbucket](https://vercel.com/docs/concepts/git/vercel-for-bitbucket) plugins to be installed. (see [below for nested schema](#nestedatt--git_repository)) -- **id** (String) The ID of this resource. -- **install_command** (String) The install command for this project. If omitted, this value will be automatically detected. -- **output_directory** (String) The output directory of the project. When null is used this value will be automatically detected. -- **public_source** (Boolean) Specifies whether the source code and logs of the deployments for this project should be public or not. -- **root_directory** (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root. +- `build_command` (String) The build command for this project. If omitted, this value will be automatically detected. +- `dev_command` (String) The dev command for this project. If omitted, this value will be automatically detected. +- `environment` (Attributes Set) A list of environment variables that should be configured for the project. (see [below for nested schema](#nestedatt--environment)) +- `framework` (String) The framework that is being used for this project. If omitted, no framework is selected. +- `git_repository` (Attributes) The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed. This requires the corresponding Vercel for [Github](https://vercel.com/docs/concepts/git/vercel-for-github), [Gitlab](https://vercel.com/docs/concepts/git/vercel-for-gitlab) or [Bitbucket](https://vercel.com/docs/concepts/git/vercel-for-bitbucket) plugins to be installed. (see [below for nested schema](#nestedatt--git_repository)) +- `id` (String) The ID of this resource. +- `install_command` (String) The install command for this project. If omitted, this value will be automatically detected. +- `output_directory` (String) The output directory of the project. When null is used this value will be automatically detected. +- `public_source` (Boolean) Specifies whether the source code and logs of the deployments for this project should be public or not. +- `root_directory` (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root. ### Nested Schema for `environment` Read-Only: -- **id** (String) The ID of the environment variable -- **key** (String) The name of the environment variable. -- **target** (Set of String) The environments that the environment variable should be present on. Valid targets are either `production`, `preview`, or `development`. -- **value** (String) The value of the environment variable. +- `id` (String) The ID of the environment variable +- `key` (String) The name of the environment variable. +- `target` (Set of String) The environments that the environment variable should be present on. Valid targets are either `production`, `preview`, or `development`. +- `value` (String) The value of the environment variable. @@ -69,7 +69,7 @@ Read-Only: Read-Only: -- **repo** (String) The name of the git repository. For example: `vercel/next.js`. -- **type** (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. +- `repo` (String) The name of the git repository. For example: `vercel/next.js`. +- `type` (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. diff --git a/docs/data-sources/project_directory.md b/docs/data-sources/project_directory.md index 890fa484..eed9655f 100644 --- a/docs/data-sources/project_directory.md +++ b/docs/data-sources/project_directory.md @@ -52,11 +52,11 @@ resource "vercel_deployment" "example" { ### Required -- **path** (String) The path to the directory on your filesystem. Note that the path is relative to the root of the terraform files. +- `path` (String) The path to the directory on your filesystem. Note that the path is relative to the root of the terraform files. ### Read-Only -- **files** (Map of String) A map of filename to metadata about the file. The metadata contains the file size and hash, and allows a deployment to be created if the file changes. -- **id** (String) The ID of this resource. +- `files` (Map of String) A map of filename to metadata about the file. The metadata contains the file size and hash, and allows a deployment to be created if the file changes. +- `id` (String) The ID of this resource. diff --git a/docs/index.md b/docs/index.md index a6671196..832ba2ab 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "Vercel Provider" +page_title: "vercel Provider" subcategory: "" description: |- The Vercel provider is used to interact with resources supported by Vercel. @@ -8,7 +8,7 @@ description: |- Use the navigation to the left to read about the available resources. --- -# Vercel Provider +# vercel Provider The Vercel provider is used to interact with resources supported by Vercel. The provider needs to be configured with the proper credentials before it can be used. @@ -42,4 +42,4 @@ provider "vercel" { ### Optional -- **api_token** (String, Sensitive) The Vercel API Token to use. This can also be specified with the `VERCEL_API_TOKEN` shell environment variable. Tokens can be created from your [Vercel settings](https://vercel.com/account/tokens). +- `api_token` (String, Sensitive) The Vercel API Token to use. This can also be specified with the `VERCEL_API_TOKEN` shell environment variable. Tokens can be created from your [Vercel settings](https://vercel.com/account/tokens). diff --git a/docs/resources/deployment.md b/docs/resources/deployment.md index 77969305..470fb4dd 100644 --- a/docs/resources/deployment.md +++ b/docs/resources/deployment.md @@ -63,32 +63,43 @@ resource "vercel_deployment" "example" { ### Required -- **files** (Map of String) A map of files to be uploaded for the deployment. This should be provided by a `vercel_project_directory` or `vercel_file` data source. -- **project_id** (String) The project ID to add the deployment to. +- `project_id` (String) The project ID to add the deployment to. ### Optional -- **environment** (Map of String) A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the `vercel_project` resource. -- **path_prefix** (String) If specified then the `path_prefix` will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading `../`s will be stripped. -- **production** (Boolean) true if the deployment is a production deployment, meaning production aliases will be assigned. -- **project_settings** (Attributes) Project settings that will be applied to the deployment. (see [below for nested schema](#nestedatt--project_settings)) -- **team_id** (String) The team ID to add the deployment to. +- `environment` (Map of String) A map of environment variable names to values. These are specific to a Deployment, and can also be configured on the `vercel_project` resource. +- `files` (Map of String) A map of files to be uploaded for the deployment. This should be provided by a `vercel_project_directory` or `vercel_file` data source. +- `git_source` (Attributes) A map with the Git repo information (see [below for nested schema](#nestedatt--git_source)) +- `path_prefix` (String) If specified then the `path_prefix` will be stripped from the start of file paths as they are uploaded to Vercel. If this is omitted, then any leading `../`s will be stripped. +- `production` (Boolean) true if the deployment is a production deployment, meaning production aliases will be assigned. +- `project_settings` (Attributes) Project settings that will be applied to the deployment. (see [below for nested schema](#nestedatt--project_settings)) +- `team_id` (String) The team ID to add the deployment to. ### Read-Only -- **domains** (List of String) A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation. -- **id** (String) The ID of this resource. -- **url** (String) A unique URL that is automatically generated for a deployment. +- `domains` (List of String) A list of all the domains (default domains, staging domains and production domains) that were assigned upon deployment creation. +- `id` (String) The ID of this resource. +- `url` (String) A unique URL that is automatically generated for a deployment. + + +### Nested Schema for `git_source` + +Optional: + +- `ref` (String) Branch or commit hash +- `repo_id` (String) Frontend git repo ID +- `type` (String) Type of git repo, supported values are: github + ### Nested Schema for `project_settings` Optional: -- **build_command** (String) The build command for this deployment. If omitted, this value will be taken from the project or automatically detected -- **framework** (String) The framework that is being used for this deployment. If omitted, no framework is selected -- **install_command** (String) The install command for this deployment. If omitted, this value will be taken from the project or automatically detected -- **output_directory** (String) The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected -- **root_directory** (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root +- `build_command` (String) The build command for this deployment. If omitted, this value will be taken from the project or automatically detected +- `framework` (String) The framework that is being used for this deployment. If omitted, no framework is selected +- `install_command` (String) The install command for this deployment. If omitted, this value will be taken from the project or automatically detected +- `output_directory` (String) The output directory of the deployment. If omitted, this value will be taken from the project or automatically detected +- `root_directory` (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root diff --git a/docs/resources/project.md b/docs/resources/project.md index 9b97664c..972f36d0 100644 --- a/docs/resources/project.md +++ b/docs/resources/project.md @@ -69,34 +69,34 @@ resource "vercel_project" "example" { ### Required -- **name** (String) The desired name for the project. +- `name` (String) The desired name for the project. ### Optional -- **build_command** (String) The build command for this project. If omitted, this value will be automatically detected. -- **dev_command** (String) The dev command for this project. If omitted, this value will be automatically detected. -- **environment** (Attributes Set) A set of environment variables that should be configured for the project. (see [below for nested schema](#nestedatt--environment)) -- **framework** (String) The framework that is being used for this project. If omitted, no framework is selected. -- **git_repository** (Attributes) The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed. This requires the corresponding Vercel for [Github](https://vercel.com/docs/concepts/git/vercel-for-github), [Gitlab](https://vercel.com/docs/concepts/git/vercel-for-gitlab) or [Bitbucket](https://vercel.com/docs/concepts/git/vercel-for-bitbucket) plugins to be installed. (see [below for nested schema](#nestedatt--git_repository)) -- **install_command** (String) The install command for this project. If omitted, this value will be automatically detected. -- **output_directory** (String) The output directory of the project. When null is used this value will be automatically detected. -- **public_source** (Boolean) Specifies whether the source code and logs of the deployments for this project should be public or not. -- **root_directory** (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root. -- **team_id** (String) The team ID to add the project to. +- `build_command` (String) The build command for this project. If omitted, this value will be automatically detected. +- `dev_command` (String) The dev command for this project. If omitted, this value will be automatically detected. +- `environment` (Attributes Set) A set of environment variables that should be configured for the project. (see [below for nested schema](#nestedatt--environment)) +- `framework` (String) The framework that is being used for this project. If omitted, no framework is selected. +- `git_repository` (Attributes) The Git Repository that will be connected to the project. When this is defined, any pushes to the specified connected Git Repository will be automatically deployed. This requires the corresponding Vercel for [Github](https://vercel.com/docs/concepts/git/vercel-for-github), [Gitlab](https://vercel.com/docs/concepts/git/vercel-for-gitlab) or [Bitbucket](https://vercel.com/docs/concepts/git/vercel-for-bitbucket) plugins to be installed. (see [below for nested schema](#nestedatt--git_repository)) +- `install_command` (String) The install command for this project. If omitted, this value will be automatically detected. +- `output_directory` (String) The output directory of the project. When null is used this value will be automatically detected. +- `public_source` (Boolean) Specifies whether the source code and logs of the deployments for this project should be public or not. +- `root_directory` (String) The name of a directory or relative path to the source code of your project. When null is used it will default to the project root. +- `team_id` (String) The team ID to add the project to. ### Read-Only -- **id** (String) The ID of this resource. +- `id` (String) The ID of this resource. ### Nested Schema for `environment` Optional: -- **id** (String) The ID of the environment variable -- **key** (String) The name of the environment variable. -- **target** (Set of String) The environments that the environment variable should be present on. Valid targets are either `production`, `preview`, or `development`. -- **value** (String, Sensitive) The value of the environment variable. +- `id` (String) The ID of the environment variable +- `key` (String) The name of the environment variable. +- `target` (Set of String) The environments that the environment variable should be present on. Valid targets are either `production`, `preview`, or `development`. +- `value` (String, Sensitive) The value of the environment variable. @@ -104,8 +104,8 @@ Optional: Optional: -- **repo** (String) The name of the git repository. For example: `vercel/next.js`. -- **type** (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. +- `repo` (String) The name of the git repository. For example: `vercel/next.js`. +- `type` (String) The git provider of the repository. Must be either `github`, `gitlab`, or `bitbucket`. ## Import diff --git a/docs/resources/project_domain.md b/docs/resources/project_domain.md index e457ad59..5ded908a 100644 --- a/docs/resources/project_domain.md +++ b/docs/resources/project_domain.md @@ -46,19 +46,19 @@ resource "vercel_project_domain" "example_redirect" { ### Required -- **domain** (String) The domain name to associate with the project. -- **project_id** (String) The project ID to add the deployment to. +- `domain` (String) The domain name to associate with the project. +- `project_id` (String) The project ID to add the deployment to. ### Optional -- **git_branch** (String) Git branch to link to the project domain. Deployments from this git branch will be assigned the domain name. -- **redirect** (String) The domain name that serves as a target destination for redirects. -- **redirect_status_code** (Number) The HTTP status code to use when serving as a redirect. -- **team_id** (String) The ID of the team the project exists under. +- `git_branch` (String) Git branch to link to the project domain. Deployments from this git branch will be assigned the domain name. +- `redirect` (String) The domain name that serves as a target destination for redirects. +- `redirect_status_code` (Number) The HTTP status code to use when serving as a redirect. +- `team_id` (String) The ID of the team the project exists under. ### Read-Only -- **id** (String) The ID of this resource. +- `id` (String) The ID of this resource. ## Import diff --git a/go.mod b/go.mod index b17e926b..ee92708a 100644 --- a/go.mod +++ b/go.mod @@ -11,13 +11,19 @@ require ( ) require ( + github.com/Masterminds/goutils v1.1.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect + github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-cidr v1.0.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.7 // indirect + github.com/google/uuid v1.1.2 // 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 @@ -30,19 +36,25 @@ require ( github.com/hashicorp/hc-install v0.3.1 // indirect github.com/hashicorp/hcl/v2 v2.11.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.15.0 // indirect + github.com/hashicorp/terraform-exec v0.16.0 // indirect github.com/hashicorp/terraform-json v0.13.0 // indirect + github.com/hashicorp/terraform-plugin-docs v0.7.0 // indirect github.com/hashicorp/terraform-registry-address v0.0.0-20210816115301-cb2034eba045 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect + github.com/huandu/xstrings v1.3.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mitchellh/cli v1.1.2 // 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.4.3 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.1.0 // indirect + github.com/posener/complete v1.1.1 // indirect + github.com/russross/blackfriday v1.6.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.1 // indirect diff --git a/go.sum b/go.sum index c84fc4a3..0c2884ea 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,11 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= 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= @@ -62,6 +65,7 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/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 v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= @@ -69,6 +73,7 @@ github.com/aws/aws-sdk-go v1.25.3 h1:uM16hIw9BotjZKMZlX05SN2EFtaWfi/NonPKIARiBLQ github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -168,6 +173,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= @@ -219,8 +225,12 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.15.0 h1:cqjh4d8HYNQrDoEmlSGelHmg2DYDh5yayckvJ5bV18E= github.com/hashicorp/terraform-exec v0.15.0/go.mod h1:H4IG8ZxanU+NW0ZpDRNsvh9f0ul7C0nHP+rUR/CHs7I= +github.com/hashicorp/terraform-exec v0.16.0 h1:XUh9pJPcbfZsuhReVvmRarQTaiiCnYogFCCjOvEYuug= +github.com/hashicorp/terraform-exec v0.16.0/go.mod h1:wB5JHmjxZ/YVNZuv9npAXKmz5pGyxy8PSi0GRR0+YjA= github.com/hashicorp/terraform-json v0.13.0 h1:Li9L+lKD1FO5RVFRM1mMMIBDoUHslOniyEi5CM+FWGY= github.com/hashicorp/terraform-json v0.13.0/go.mod h1:y5OdLBCT+rxbwnpxZs9kGL7R9ExU76+cpdY8zHwoazk= +github.com/hashicorp/terraform-plugin-docs v0.7.0 h1:7XKAOYHAxghe7q4/vx468X43X9GikdQ2dxtmcu2gQv0= +github.com/hashicorp/terraform-plugin-docs v0.7.0/go.mod h1:57CICKfW7/KbW4lPhKOledyT6vu1LeAOzuvWXsVaxUE= github.com/hashicorp/terraform-plugin-framework v0.6.0 h1:XLqZllW47OjWqTxBN5wfqrl76sGSoekqg3keyNqBUwI= github.com/hashicorp/terraform-plugin-framework v0.6.0/go.mod h1:dgISV1z4CKDmi3uu/YpcvHeCSLtaKgena9Ix27tkKIQ= github.com/hashicorp/terraform-plugin-framework v0.6.1-0.20220311205704-e0e806bddeca h1:dbmK4XrlFOM23JGAljsRSw1qgzNg0t5qc+fZ5biRaNo= @@ -242,6 +252,7 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= 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/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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -288,6 +299,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky 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-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -319,10 +331,13 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4=