From 05b0bdac99f6f680345525d7a5b5f6ed4c9cd14f Mon Sep 17 00:00:00 2001 From: Jamie Finnigan Date: Wed, 20 Dec 2023 03:04:10 -0800 Subject: [PATCH] adopt hashicorp/cli fork of mitchellh/cli (#34429) --- commands.go | 2 +- go.mod | 10 +++---- go.sum | 26 ++++++++----------- help.go | 2 +- internal/backend/cli.go | 2 +- internal/backend/remote/backend.go | 2 +- internal/backend/remote/backend_apply_test.go | 2 +- internal/backend/remote/backend_plan_test.go | 2 +- internal/backend/remote/testing.go | 2 +- .../local-exec/resource_provisioner_test.go | 2 +- .../remote-exec/resource_provisioner_test.go | 2 +- internal/cloud/backend.go | 2 +- internal/cloud/backend_apply_test.go | 2 +- internal/cloud/backend_plan_test.go | 2 +- internal/cloud/backend_refresh_test.go | 2 +- internal/cloud/backend_run_warning_test.go | 2 +- internal/cloud/cloud_integration.go | 2 +- internal/cloud/testing.go | 2 +- internal/command/apply_destroy_test.go | 2 +- internal/command/apply_test.go | 2 +- internal/command/autocomplete_test.go | 2 +- internal/command/cli_ui.go | 2 +- internal/command/cli_ui_test.go | 2 +- internal/command/cloud_test.go | 2 +- internal/command/console.go | 2 +- internal/command/console_interactive.go | 2 +- .../command/console_interactive_solaris.go | 2 +- internal/command/console_test.go | 2 +- internal/command/fmt.go | 2 +- internal/command/fmt_test.go | 2 +- internal/command/format/trivia.go | 2 +- internal/command/get_test.go | 2 +- internal/command/graph_test.go | 2 +- internal/command/hook_module_install.go | 2 +- internal/command/import_test.go | 2 +- internal/command/init_test.go | 2 +- internal/command/login_test.go | 2 +- internal/command/logout_test.go | 2 +- internal/command/meta.go | 4 +-- internal/command/meta_backend_test.go | 2 +- internal/command/meta_test.go | 2 +- internal/command/metadata_command.go | 2 +- internal/command/metadata_functions_test.go | 2 +- internal/command/providers_lock_test.go | 2 +- internal/command/providers_mirror_test.go | 2 +- internal/command/providers_schema_test.go | 2 +- internal/command/providers_test.go | 2 +- internal/command/refresh_test.go | 2 +- internal/command/show_test.go | 2 +- internal/command/state_command.go | 2 +- internal/command/state_list.go | 2 +- internal/command/state_list_test.go | 2 +- internal/command/state_mv.go | 2 +- internal/command/state_mv_test.go | 2 +- internal/command/state_pull_test.go | 2 +- internal/command/state_push.go | 2 +- internal/command/state_push_test.go | 2 +- internal/command/state_replace_provider.go | 2 +- .../command/state_replace_provider_test.go | 2 +- internal/command/state_rm.go | 2 +- internal/command/state_rm_test.go | 2 +- internal/command/state_show.go | 2 +- internal/command/taint_test.go | 2 +- internal/command/test_test.go | 2 +- internal/command/unlock.go | 2 +- internal/command/unlock_test.go | 2 +- internal/command/untaint_test.go | 2 +- internal/command/validate_test.go | 2 +- internal/command/version_test.go | 2 +- internal/command/workspace_command.go | 2 +- internal/command/workspace_command_test.go | 2 +- internal/command/workspace_delete.go | 2 +- internal/command/workspace_new.go | 2 +- internal/command/workspace_select.go | 2 +- internal/rpcapi/cli.go | 4 +-- main.go | 2 +- main_test.go | 2 +- 77 files changed, 93 insertions(+), 97 deletions(-) diff --git a/commands.go b/commands.go index 1237bfe49a..6796091e33 100644 --- a/commands.go +++ b/commands.go @@ -8,11 +8,11 @@ import ( "os" "os/signal" + "github.com/hashicorp/cli" "github.com/hashicorp/go-plugin" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/auth" "github.com/hashicorp/terraform-svchost/disco" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/command" diff --git a/go.mod b/go.mod index 5553a10d5f..3678a9ab69 100644 --- a/go.mod +++ b/go.mod @@ -34,6 +34,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.3.1 github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.45 + github.com/hashicorp/cli v1.1.6 github.com/hashicorp/consul/api v1.13.0 github.com/hashicorp/consul/sdk v0.8.0 github.com/hashicorp/copywrite v0.16.3 @@ -60,9 +61,8 @@ require ( github.com/lib/pq v1.10.3 github.com/manicminer/hamilton v0.44.0 github.com/masterzen/winrm v0.0.0-20200615185753-c42b5136ff88 - github.com/mattn/go-isatty v0.0.19 + github.com/mattn/go-isatty v0.0.20 github.com/mattn/go-shellwords v1.0.4 - github.com/mitchellh/cli v1.1.5 github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db github.com/mitchellh/copystructure v1.2.0 github.com/mitchellh/go-homedir v1.1.0 @@ -132,8 +132,8 @@ require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d // indirect 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/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect @@ -176,7 +176,7 @@ require ( github.com/dimchansky/utfbom v1.1.1 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/go.sum b/go.sum index 57ecbd5af5..d727fa88ab 100644 --- a/go.sum +++ b/go.sum @@ -243,11 +243,10 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= -github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= -github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= @@ -450,8 +449,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= @@ -634,6 +633,8 @@ github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslC github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.45 h1:esKaa1l2oJiARVIa20DPxgID9V7FyFfert7X1FWg1HU= github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.45/go.mod h1:roO9Btzl+fvOFhvDN7CuPf6n60K6Yh0ykzwxhwbMK90= +github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8= +github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4= github.com/hashicorp/consul/api v1.13.0 h1:2hnLQ0GjQvw7f3O61jMO8gbasZviZTrt9R8WzgiirHc= github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= @@ -732,8 +733,6 @@ github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -828,8 +827,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -846,8 +845,6 @@ github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= -github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -1102,9 +1099,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -1115,6 +1110,7 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= diff --git a/help.go b/help.go index 30b9d588ce..4eb9c89832 100644 --- a/help.go +++ b/help.go @@ -10,7 +10,7 @@ import ( "sort" "strings" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // helpFunc is a cli.HelpFunc that can be used to output the help CLI instructions for Terraform. diff --git a/internal/backend/cli.go b/internal/backend/cli.go index f53c4ee8f6..97bca35d64 100644 --- a/internal/backend/cli.go +++ b/internal/backend/cli.go @@ -4,7 +4,7 @@ package backend import ( - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/mitchellh/colorstring" "github.com/hashicorp/terraform/internal/terminal" diff --git a/internal/backend/remote/backend.go b/internal/backend/remote/backend.go index 35d0a3f2b1..b4a04dfcab 100644 --- a/internal/backend/remote/backend.go +++ b/internal/backend/remote/backend.go @@ -15,6 +15,7 @@ import ( "sync" "time" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" version "github.com/hashicorp/go-version" svchost "github.com/hashicorp/terraform-svchost" @@ -27,7 +28,6 @@ import ( "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" tfversion "github.com/hashicorp/terraform/version" - "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "github.com/zclconf/go-cty/cty" diff --git a/internal/backend/remote/backend_apply_test.go b/internal/backend/remote/backend_apply_test.go index 21b0ccc8de..33bc7c3036 100644 --- a/internal/backend/remote/backend_apply_test.go +++ b/internal/backend/remote/backend_apply_test.go @@ -13,9 +13,9 @@ import ( "time" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" version "github.com/hashicorp/go-version" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" diff --git a/internal/backend/remote/backend_plan_test.go b/internal/backend/remote/backend_plan_test.go index 58577b99dc..ff81dcd1a7 100644 --- a/internal/backend/remote/backend_plan_test.go +++ b/internal/backend/remote/backend_plan_test.go @@ -13,8 +13,8 @@ import ( "time" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" diff --git a/internal/backend/remote/testing.go b/internal/backend/remote/testing.go index 103099bfa2..a1f2166734 100644 --- a/internal/backend/remote/testing.go +++ b/internal/backend/remote/testing.go @@ -13,6 +13,7 @@ import ( "testing" "time" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/auth" @@ -27,7 +28,6 @@ import ( "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" "github.com/hashicorp/terraform/version" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" backendLocal "github.com/hashicorp/terraform/internal/backend/local" diff --git a/internal/builtin/provisioners/local-exec/resource_provisioner_test.go b/internal/builtin/provisioners/local-exec/resource_provisioner_test.go index a4c8588042..86d672481a 100644 --- a/internal/builtin/provisioners/local-exec/resource_provisioner_test.go +++ b/internal/builtin/provisioners/local-exec/resource_provisioner_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/provisioners" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/builtin/provisioners/remote-exec/resource_provisioner_test.go b/internal/builtin/provisioners/remote-exec/resource_provisioner_test.go index 0445f65bfb..e19bf9946d 100644 --- a/internal/builtin/provisioners/remote-exec/resource_provisioner_test.go +++ b/internal/builtin/provisioners/remote-exec/resource_provisioner_test.go @@ -14,10 +14,10 @@ import ( "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/communicator" "github.com/hashicorp/terraform/internal/communicator/remote" "github.com/hashicorp/terraform/internal/provisioners" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/cloud/backend.go b/internal/cloud/backend.go index ad0f6ba84a..6eea6d9880 100644 --- a/internal/cloud/backend.go +++ b/internal/cloud/backend.go @@ -15,11 +15,11 @@ import ( "strings" "sync" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" version "github.com/hashicorp/go-version" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/disco" - "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/gocty" diff --git a/internal/cloud/backend_apply_test.go b/internal/cloud/backend_apply_test.go index 57c15b33e3..33eabcd609 100644 --- a/internal/cloud/backend_apply_test.go +++ b/internal/cloud/backend_apply_test.go @@ -15,10 +15,10 @@ import ( gomock "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" mocks "github.com/hashicorp/go-tfe/mocks" version "github.com/hashicorp/go-version" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" diff --git a/internal/cloud/backend_plan_test.go b/internal/cloud/backend_plan_test.go index 7cd08c94f7..2229b0632a 100644 --- a/internal/cloud/backend_plan_test.go +++ b/internal/cloud/backend_plan_test.go @@ -15,8 +15,8 @@ import ( "time" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" diff --git a/internal/cloud/backend_refresh_test.go b/internal/cloud/backend_refresh_test.go index bba0e64a27..976d3a8296 100644 --- a/internal/cloud/backend_refresh_test.go +++ b/internal/cloud/backend_refresh_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/arguments" diff --git a/internal/cloud/backend_run_warning_test.go b/internal/cloud/backend_run_warning_test.go index 5e11d6cf67..4e096ff052 100644 --- a/internal/cloud/backend_run_warning_test.go +++ b/internal/cloud/backend_run_warning_test.go @@ -10,9 +10,9 @@ import ( "time" "github.com/golang/mock/gomock" + "github.com/hashicorp/cli" "github.com/hashicorp/go-tfe" tfemocks "github.com/hashicorp/go-tfe/mocks" - "github.com/mitchellh/cli" ) func MockAllRunEvents(t *testing.T, client *tfe.Client) (fullRunID string, emptyRunID string) { diff --git a/internal/cloud/cloud_integration.go b/internal/cloud/cloud_integration.go index b320d99ba3..d51751cbb8 100644 --- a/internal/cloud/cloud_integration.go +++ b/internal/cloud/cloud_integration.go @@ -9,9 +9,9 @@ import ( "strconv" "time" + "github.com/hashicorp/cli" "github.com/hashicorp/go-tfe" "github.com/hashicorp/terraform/internal/backend" - "github.com/mitchellh/cli" ) // IntegrationOutputWriter is an interface used to to write output tailored for diff --git a/internal/cloud/testing.go b/internal/cloud/testing.go index c05ffdf79d..ab782e02e7 100644 --- a/internal/cloud/testing.go +++ b/internal/cloud/testing.go @@ -17,11 +17,11 @@ import ( "testing" "time" + "github.com/hashicorp/cli" tfe "github.com/hashicorp/go-tfe" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/auth" "github.com/hashicorp/terraform-svchost/disco" - "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "github.com/zclconf/go-cty/cty" diff --git a/internal/command/apply_destroy_test.go b/internal/command/apply_destroy_test.go index e611ca9fbe..a6bc4be96e 100644 --- a/internal/command/apply_destroy_test.go +++ b/internal/command/apply_destroy_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" diff --git a/internal/command/apply_test.go b/internal/command/apply_test.go index 66cf23a77e..b67cdabc18 100644 --- a/internal/command/apply_test.go +++ b/internal/command/apply_test.go @@ -18,7 +18,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" diff --git a/internal/command/autocomplete_test.go b/internal/command/autocomplete_test.go index 1cd311fcc6..35e364fc9e 100644 --- a/internal/command/autocomplete_test.go +++ b/internal/command/autocomplete_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/posener/complete" ) diff --git a/internal/command/cli_ui.go b/internal/command/cli_ui.go index 1021fff094..4fbfa677c2 100644 --- a/internal/command/cli_ui.go +++ b/internal/command/cli_ui.go @@ -6,7 +6,7 @@ package command import ( "fmt" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/mitchellh/colorstring" ) diff --git a/internal/command/cli_ui_test.go b/internal/command/cli_ui_test.go index 5460df88ee..e56d1372b0 100644 --- a/internal/command/cli_ui_test.go +++ b/internal/command/cli_ui_test.go @@ -6,7 +6,7 @@ package command import ( "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestColorizeUi_impl(t *testing.T) { diff --git a/internal/command/cloud_test.go b/internal/command/cloud_test.go index 2edd8f2bcf..833f66b4b1 100644 --- a/internal/command/cloud_test.go +++ b/internal/command/cloud_test.go @@ -15,6 +15,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/auth" "github.com/hashicorp/terraform-svchost/disco" @@ -23,7 +24,6 @@ import ( backendCloud "github.com/hashicorp/terraform/internal/cloud" "github.com/hashicorp/terraform/internal/httpclient" "github.com/hashicorp/terraform/version" - "github.com/mitchellh/cli" ) func newCloudPluginManifestHTTPTestServer(t *testing.T) *httptest.Server { diff --git a/internal/command/console.go b/internal/command/console.go index bac18bcb92..6ebdcc92cf 100644 --- a/internal/command/console.go +++ b/internal/command/console.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // ConsoleCommand is a Command implementation that starts an interactive diff --git a/internal/command/console_interactive.go b/internal/command/console_interactive.go index 0151344b23..2eda1c33c0 100644 --- a/internal/command/console_interactive.go +++ b/internal/command/console_interactive.go @@ -17,7 +17,7 @@ import ( "github.com/hashicorp/terraform/internal/repl" "github.com/chzyer/readline" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func (c *ConsoleCommand) modeInteractive(session *repl.Session, ui cli.Ui) int { diff --git a/internal/command/console_interactive_solaris.go b/internal/command/console_interactive_solaris.go index 0023637eca..49c3468c8b 100644 --- a/internal/command/console_interactive_solaris.go +++ b/internal/command/console_interactive_solaris.go @@ -9,8 +9,8 @@ package command import ( "fmt" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/repl" - "github.com/mitchellh/cli" ) func (c *ConsoleCommand) modeInteractive(session *repl.Session, ui cli.Ui) int { diff --git a/internal/command/console_test.go b/internal/command/console_test.go index 74012c7669..5fd4eccf6f 100644 --- a/internal/command/console_test.go +++ b/internal/command/console_test.go @@ -10,9 +10,9 @@ import ( "strings" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/fmt.go b/internal/command/fmt.go index 38d03694f0..4628337e4c 100644 --- a/internal/command/fmt.go +++ b/internal/command/fmt.go @@ -14,10 +14,10 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/hashicorp/hcl/v2/hclwrite" - "github.com/mitchellh/cli" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/tfdiags" diff --git a/internal/command/fmt_test.go b/internal/command/fmt_test.go index 053f95ba40..903bdbe58f 100644 --- a/internal/command/fmt_test.go +++ b/internal/command/fmt_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestFmt_TestFiles(t *testing.T) { diff --git a/internal/command/format/trivia.go b/internal/command/format/trivia.go index aa969b1ec8..17852d33f9 100644 --- a/internal/command/format/trivia.go +++ b/internal/command/format/trivia.go @@ -16,7 +16,7 @@ import ( // If the given colorize has colors enabled, the rule will also be given a // dark grey color to attempt to visually de-emphasize it for sighted users. // -// This is intended for printing to the UI via mitchellh/cli.UI.Output, or +// This is intended for printing to the UI via hashicorp/cli.UI.Output, or // similar, which will automatically append a trailing newline too. func HorizontalRule(color *colorstring.Colorize, width int) string { if width <= 1 { diff --git a/internal/command/get_test.go b/internal/command/get_test.go index 69306450d2..0f2222cb83 100644 --- a/internal/command/get_test.go +++ b/internal/command/get_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestGet(t *testing.T) { diff --git a/internal/command/graph_test.go b/internal/command/graph_test.go index f131e8a6aa..5357a7fb0c 100644 --- a/internal/command/graph_test.go +++ b/internal/command/graph_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" diff --git a/internal/command/hook_module_install.go b/internal/command/hook_module_install.go index 93008f4609..a795ac6380 100644 --- a/internal/command/hook_module_install.go +++ b/internal/command/hook_module_install.go @@ -6,9 +6,9 @@ package command import ( "fmt" + "github.com/hashicorp/cli" version "github.com/hashicorp/go-version" "github.com/hashicorp/terraform/internal/initwd" - "github.com/mitchellh/cli" ) type uiModuleInstallHooks struct { diff --git a/internal/command/import_test.go b/internal/command/import_test.go index 2ca7a112b4..4a53a67cbd 100644 --- a/internal/command/import_test.go +++ b/internal/command/import_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/configs/configschema" diff --git a/internal/command/init_test.go b/internal/command/init_test.go index c78264aa39..2422b31968 100644 --- a/internal/command/init_test.go +++ b/internal/command/init_test.go @@ -14,7 +14,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/go-version" diff --git a/internal/command/login_test.go b/internal/command/login_test.go index 05392cda1b..cbb89bd45a 100644 --- a/internal/command/login_test.go +++ b/internal/command/login_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terraform-svchost/disco" diff --git a/internal/command/logout_test.go b/internal/command/logout_test.go index 5aaa22e81c..464a7653e9 100644 --- a/internal/command/logout_test.go +++ b/internal/command/logout_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" svchost "github.com/hashicorp/terraform-svchost" svcauth "github.com/hashicorp/terraform-svchost/auth" diff --git a/internal/command/meta.go b/internal/command/meta.go index 0a0e6f1c60..2ca3f027a6 100644 --- a/internal/command/meta.go +++ b/internal/command/meta.go @@ -17,9 +17,9 @@ import ( "strings" "time" + "github.com/hashicorp/cli" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/terraform-svchost/disco" - "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "github.com/hashicorp/terraform/internal/addrs" @@ -442,7 +442,7 @@ func (m *Meta) InterruptibleContext(base context.Context) (context.Context, cont // // This method is just a substitute for passing a context directly to the // "Run" method of a command, which we can't do because that API is owned by -// mitchellh/cli rather than by Terraform. Use this only in situations +// hashicorp/cli rather than by Terraform. Use this only in situations // comparable to the context having been passed in as an argument to Run. // // If the caller (e.g. "package main") provided a context when it instantiated diff --git a/internal/command/meta_backend_test.go b/internal/command/meta_backend_test.go index ab777fb263..e0a08750cc 100644 --- a/internal/command/meta_backend_test.go +++ b/internal/command/meta_backend_test.go @@ -13,6 +13,7 @@ import ( "strings" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs" @@ -21,7 +22,6 @@ import ( "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/states/statemgr" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" backendInit "github.com/hashicorp/terraform/internal/backend/init" diff --git a/internal/command/meta_test.go b/internal/command/meta_test.go index d37950adec..b75b864164 100644 --- a/internal/command/meta_test.go +++ b/internal/command/meta_test.go @@ -14,10 +14,10 @@ import ( "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/backend/local" "github.com/hashicorp/terraform/internal/terraform" - "github.com/mitchellh/cli" ) func TestMetaColorize(t *testing.T) { diff --git a/internal/command/metadata_command.go b/internal/command/metadata_command.go index a8609fc59b..b4fa2522b2 100644 --- a/internal/command/metadata_command.go +++ b/internal/command/metadata_command.go @@ -6,7 +6,7 @@ package command import ( "strings" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // MetadataCommand is a Command implementation that just shows help for diff --git a/internal/command/metadata_functions_test.go b/internal/command/metadata_functions_test.go index bccfbd12f5..f5d0bdc24a 100644 --- a/internal/command/metadata_functions_test.go +++ b/internal/command/metadata_functions_test.go @@ -7,7 +7,7 @@ import ( "encoding/json" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestMetadataFunctions_error(t *testing.T) { diff --git a/internal/command/providers_lock_test.go b/internal/command/providers_lock_test.go index 1a4d6588b9..dba0650cf9 100644 --- a/internal/command/providers_lock_test.go +++ b/internal/command/providers_lock_test.go @@ -11,10 +11,10 @@ import ( "strings" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/depsfile" "github.com/hashicorp/terraform/internal/getproviders" - "github.com/mitchellh/cli" ) func TestProvidersLock(t *testing.T) { diff --git a/internal/command/providers_mirror_test.go b/internal/command/providers_mirror_test.go index 6c1e884a7f..68637e65a1 100644 --- a/internal/command/providers_mirror_test.go +++ b/internal/command/providers_mirror_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // More thorough tests for providers mirror can be found in the e2etest diff --git a/internal/command/providers_schema_test.go b/internal/command/providers_schema_test.go index 77d2631da5..963efcf3fb 100644 --- a/internal/command/providers_schema_test.go +++ b/internal/command/providers_schema_test.go @@ -12,10 +12,10 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" "github.com/hashicorp/terraform/internal/terraform" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/providers_test.go b/internal/command/providers_test.go index c9509683e8..56f5c0fd7e 100644 --- a/internal/command/providers_test.go +++ b/internal/command/providers_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestProviders(t *testing.T) { diff --git a/internal/command/refresh_test.go b/internal/command/refresh_test.go index 4d7fd8bc09..403d97ca40 100644 --- a/internal/command/refresh_test.go +++ b/internal/command/refresh_test.go @@ -16,7 +16,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" diff --git a/internal/command/show_test.go b/internal/command/show_test.go index 4c0cdf1ff4..eeb8872028 100644 --- a/internal/command/show_test.go +++ b/internal/command/show_test.go @@ -12,6 +12,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/plans" @@ -20,7 +21,6 @@ import ( "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/version" - "github.com/mitchellh/cli" "github.com/zclconf/go-cty/cty" ) diff --git a/internal/command/state_command.go b/internal/command/state_command.go index cf4bf94f21..5ef4cec8a3 100644 --- a/internal/command/state_command.go +++ b/internal/command/state_command.go @@ -6,7 +6,7 @@ package command import ( "strings" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // StateCommand is a Command implementation that just shows help for diff --git a/internal/command/state_list.go b/internal/command/state_list.go index 4a8b38e3f7..02fd6b2ab9 100644 --- a/internal/command/state_list.go +++ b/internal/command/state_list.go @@ -7,10 +7,10 @@ import ( "fmt" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // StateListCommand is a Command implementation that lists the resources diff --git a/internal/command/state_list_test.go b/internal/command/state_list_test.go index b1eb1fd1de..fc3dadcd9a 100644 --- a/internal/command/state_list_test.go +++ b/internal/command/state_list_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestStateList(t *testing.T) { diff --git a/internal/command/state_mv.go b/internal/command/state_mv.go index 17c0463630..d6db480c0c 100644 --- a/internal/command/state_mv.go +++ b/internal/command/state_mv.go @@ -7,6 +7,7 @@ import ( "fmt" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/arguments" @@ -15,7 +16,6 @@ import ( "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // StateMvCommand is a Command implementation that shows a single resource. diff --git a/internal/command/state_mv_test.go b/internal/command/state_mv_test.go index 07f801f7a7..0dcec8f62b 100644 --- a/internal/command/state_mv_test.go +++ b/internal/command/state_mv_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" diff --git a/internal/command/state_pull_test.go b/internal/command/state_pull_test.go index 0c2146666d..0a589b0a93 100644 --- a/internal/command/state_pull_test.go +++ b/internal/command/state_pull_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestStatePull(t *testing.T) { diff --git a/internal/command/state_push.go b/internal/command/state_push.go index c0c1e5d810..7ea04e51eb 100644 --- a/internal/command/state_push.go +++ b/internal/command/state_push.go @@ -9,6 +9,7 @@ import ( "os" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" @@ -16,7 +17,6 @@ import ( "github.com/hashicorp/terraform/internal/states/statemgr" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // StatePushCommand is a Command implementation that shows a single resource. diff --git a/internal/command/state_push_test.go b/internal/command/state_push_test.go index 7303e9a659..57cbb7df40 100644 --- a/internal/command/state_push_test.go +++ b/internal/command/state_push_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/backend/remote-state/inmem" "github.com/hashicorp/terraform/internal/states" - "github.com/mitchellh/cli" ) func TestStatePush_empty(t *testing.T) { diff --git a/internal/command/state_replace_provider.go b/internal/command/state_replace_provider.go index d474781579..53796adedc 100644 --- a/internal/command/state_replace_provider.go +++ b/internal/command/state_replace_provider.go @@ -7,6 +7,7 @@ import ( "fmt" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" @@ -14,7 +15,6 @@ import ( "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // StateReplaceProviderCommand is a Command implementation that allows users diff --git a/internal/command/state_replace_provider_test.go b/internal/command/state_replace_provider_test.go index 84caedc5e8..b3397e2fce 100644 --- a/internal/command/state_replace_provider_test.go +++ b/internal/command/state_replace_provider_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" diff --git a/internal/command/state_rm.go b/internal/command/state_rm.go index f7b1e6bd7d..3313bbc634 100644 --- a/internal/command/state_rm.go +++ b/internal/command/state_rm.go @@ -7,13 +7,13 @@ import ( "fmt" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // StateRmCommand is a Command implementation that shows a single resource. diff --git a/internal/command/state_rm_test.go b/internal/command/state_rm_test.go index 6708a239af..5afcf60b24 100644 --- a/internal/command/state_rm_test.go +++ b/internal/command/state_rm_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" diff --git a/internal/command/state_show.go b/internal/command/state_show.go index 1e3e4e6169..852eb06268 100644 --- a/internal/command/state_show.go +++ b/internal/command/state_show.go @@ -8,6 +8,7 @@ import ( "os" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/command/arguments" @@ -16,7 +17,6 @@ import ( "github.com/hashicorp/terraform/internal/command/jsonstate" "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/states/statefile" - "github.com/mitchellh/cli" ) // StateShowCommand is a Command implementation that shows a single resource. diff --git a/internal/command/taint_test.go b/internal/command/taint_test.go index a3e93faaa2..364cb84e56 100644 --- a/internal/command/taint_test.go +++ b/internal/command/taint_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" diff --git a/internal/command/test_test.go b/internal/command/test_test.go index 7f420f9617..96142baab6 100644 --- a/internal/command/test_test.go +++ b/internal/command/test_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/addrs" diff --git a/internal/command/unlock.go b/internal/command/unlock.go index 3f328422b8..86a6481aa2 100644 --- a/internal/command/unlock.go +++ b/internal/command/unlock.go @@ -10,9 +10,9 @@ import ( "github.com/hashicorp/terraform/internal/states/statemgr" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/terraform" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" ) // UnlockCommand is a cli.Command implementation that manually unlocks diff --git a/internal/command/unlock_test.go b/internal/command/unlock_test.go index 386b205c9f..f0871ef0ee 100644 --- a/internal/command/unlock_test.go +++ b/internal/command/unlock_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/backend/remote-state/inmem" - "github.com/mitchellh/cli" legacy "github.com/hashicorp/terraform/internal/legacy/terraform" ) diff --git a/internal/command/untaint_test.go b/internal/command/untaint_test.go index 3237feac84..ae008287d5 100644 --- a/internal/command/untaint_test.go +++ b/internal/command/untaint_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/states" - "github.com/mitchellh/cli" ) func TestUntaint(t *testing.T) { diff --git a/internal/command/validate_test.go b/internal/command/validate_test.go index 93f73c053d..cc960fb87b 100644 --- a/internal/command/validate_test.go +++ b/internal/command/validate_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" "github.com/zclconf/go-cty/cty" testing_command "github.com/hashicorp/terraform/internal/command/testing" diff --git a/internal/command/version_test.go b/internal/command/version_test.go index 0c29718256..8b835e65f6 100644 --- a/internal/command/version_test.go +++ b/internal/command/version_test.go @@ -8,10 +8,10 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/depsfile" "github.com/hashicorp/terraform/internal/getproviders" - "github.com/mitchellh/cli" ) func TestVersionCommand_implements(t *testing.T) { diff --git a/internal/command/workspace_command.go b/internal/command/workspace_command.go index 3648e383e9..a895af53d9 100644 --- a/internal/command/workspace_command.go +++ b/internal/command/workspace_command.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // WorkspaceCommand is a Command Implementation that manipulates workspaces, diff --git a/internal/command/workspace_command_test.go b/internal/command/workspace_command_test.go index 553cd2b80b..88a707242a 100644 --- a/internal/command/workspace_command_test.go +++ b/internal/command/workspace_command_test.go @@ -10,13 +10,13 @@ import ( "strings" "testing" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/backend/local" "github.com/hashicorp/terraform/internal/backend/remote-state/inmem" "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/states/statemgr" - "github.com/mitchellh/cli" legacy "github.com/hashicorp/terraform/internal/legacy/terraform" ) diff --git a/internal/command/workspace_delete.go b/internal/command/workspace_delete.go index 93b202c365..625124e9eb 100644 --- a/internal/command/workspace_delete.go +++ b/internal/command/workspace_delete.go @@ -8,12 +8,12 @@ import ( "strings" "time" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" "github.com/posener/complete" ) diff --git a/internal/command/workspace_new.go b/internal/command/workspace_new.go index 17d2d5bac3..f4a4c153f2 100644 --- a/internal/command/workspace_new.go +++ b/internal/command/workspace_new.go @@ -9,12 +9,12 @@ import ( "strings" "time" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/command/clistate" "github.com/hashicorp/terraform/internal/command/views" "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" "github.com/posener/complete" ) diff --git a/internal/command/workspace_select.go b/internal/command/workspace_select.go index 692420caf0..26038e980d 100644 --- a/internal/command/workspace_select.go +++ b/internal/command/workspace_select.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" + "github.com/hashicorp/cli" "github.com/hashicorp/terraform/internal/tfdiags" - "github.com/mitchellh/cli" "github.com/posener/complete" ) diff --git a/internal/rpcapi/cli.go b/internal/rpcapi/cli.go index 7ad7f851c1..aaffca310d 100644 --- a/internal/rpcapi/cli.go +++ b/internal/rpcapi/cli.go @@ -9,11 +9,11 @@ import ( "os" "strings" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) // CLICommand is a command initialization callback for use with -// github.com/mitchellh/cli, allowing Terraform's "package main" to +// github.com/hashicorp/cli, allowing Terraform's "package main" to // jump straight into the RPC plugin server without any interference // from the usual Terraform CLI machinery in package "command", which // is irrelevant here because this RPC API exists to bypass the diff --git a/main.go b/main.go index a8c81c2f9d..f78e5c1e3f 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( "strings" "github.com/apparentlymart/go-shquot/shquot" + "github.com/hashicorp/cli" "github.com/hashicorp/go-plugin" "github.com/hashicorp/terraform-svchost/disco" "github.com/hashicorp/terraform/internal/addrs" @@ -26,7 +27,6 @@ import ( "github.com/hashicorp/terraform/internal/terminal" "github.com/hashicorp/terraform/version" "github.com/mattn/go-shellwords" - "github.com/mitchellh/cli" "github.com/mitchellh/colorstring" "go.opentelemetry.io/otel/trace" diff --git a/main_test.go b/main_test.go index bdf3e09bb9..4921640014 100644 --- a/main_test.go +++ b/main_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - "github.com/mitchellh/cli" + "github.com/hashicorp/cli" ) func TestMain_cliArgsFromEnv(t *testing.T) {