Rebrand Terraform Cloud to HCP Terraform

This commit is contained in:
Sebastian Rivera 2024-04-22 15:21:52 -04:00
parent d1f9d3b13f
commit 015f795ff0
91 changed files with 536 additions and 471 deletions

View file

@ -200,7 +200,7 @@ go test ./internal/addrs
Terraform's unit test suite is self-contained, using mocks and local files to help ensure that it can run offline and is unlikely to be broken by changes to outside systems.
However, several Terraform components interact with external services, such as the automatic provider installation mechanism, the Terraform Registry, HCP Terraform, etc.
However, several Terraform components interact with external services, such as the automatic provider installation mechanism, the Terraform Registry, HCP Terraform, Terraform Enterprise, etc.
There are some optional tests in the Terraform CLI codebase that *do* interact with external services, which we collectively refer to as "acceptance tests". You can enable these by setting the environment variable `TF_ACC=1` when running the tests. We recommend focusing only on the specific package you are working on when enabling acceptance tests, both because it can help the test run to complete faster and because you are less likely to encounter failures due to drift in systems unrelated to your current goal:

View file

@ -5,7 +5,7 @@ blank_issues_enabled: false
contact_links:
- name: HCP Terraform and Terraform Enterprise Troubleshooting and Feature Requests
url: https://support.hashicorp.com/hc/en-us/requests/new
about: For issues and feature requests related to HCP Terraform and Terraform Enterprise, please submit a HashiCorp support request or email tf-cloud@hashicorp.support
about: For issues and feature requests related to HCP Terraform or Terraform Enterprise, please submit a HashiCorp support request or email tf-cloud@hashicorp.support
- name: AWS Terraform Provider Feedback and Questions
url: https://github.com/hashicorp/terraform-provider-aws
about: The AWS Terraform Provider has its own repository, any provider related issues or questions should be directed there.
@ -20,4 +20,4 @@ contact_links:
about: Plugin SDK has its own repository, any SDK and provider development related issues or questions should be directed there.
- name: Terraform Usage, Language, or Workflow Questions
url: https://discuss.hashicorp.com/c/terraform-core
about: Please ask and answer language or workflow related questions through the Terraform Core Community Forum.
about: Please ask and answer language or workflow related questions through the Terraform Core Community Forum.

8
go.mod
View file

@ -29,8 +29,8 @@ require (
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-plugin v1.6.0
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/hashicorp/go-slug v0.14.0
github.com/hashicorp/go-tfe v1.41.0
github.com/hashicorp/go-slug v0.15.0
github.com/hashicorp/go-tfe v1.51.0
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hcl v1.0.0
@ -75,7 +75,7 @@ require (
golang.org/x/mod v0.16.0
golang.org/x/net v0.22.0
golang.org/x/oauth2 v0.18.0
golang.org/x/sys v0.18.0
golang.org/x/sys v0.19.0
golang.org/x/term v0.18.0
golang.org/x/text v0.14.0
golang.org/x/tools v0.19.0
@ -255,7 +255,7 @@ require (
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect

20
go.sum
View file

@ -682,14 +682,14 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-tfe v1.41.0 h1:ieQrbFwH4KITMxqyBni7v5jTBkcvQqCbnPNsV2eh4TY=
github.com/hashicorp/go-tfe v1.41.0/go.mod h1:i29eWGEtI/glZaixaMTVUipNWxQFN6gw7hy3swKOC/A=
github.com/hashicorp/go-tfe v1.51.0 h1:nZIIMOGxzKJvL6fNO3wS/wpTdLVGHUMT6up82H9eJCE=
github.com/hashicorp/go-tfe v1.51.0/go.mod h1:yZ/FCqBsOZ/e75kL29JYqAsKctL1Tti2zYcIoQh69Ck=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@ -998,8 +998,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.588 h1:DYtBXB7sVc3EOW5horg8j55cLZynhsLYhHrvQ/jXKKM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.588/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
@ -1256,8 +1256,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -1354,8 +1354,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=

View file

@ -68,7 +68,7 @@ func Init(services *disco.Disco) {
"pg": func() backend.Backend { return backendPg.New() },
"s3": func() backend.Backend { return backendS3.New() },
// Terraform Cloud 'backend'
// HCP Terraform 'backend'
// This is an implementation detail only, used for the cloud package
"cloud": func() backend.Backend { return backendCloud.New(services) },
}

View file

@ -38,7 +38,7 @@ require (
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
@ -59,7 +59,7 @@ require (
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/appengine v1.6.7 // indirect

View file

@ -231,8 +231,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-uuid v1.0.2/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=
@ -437,8 +437,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -480,8 +480,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -23,7 +23,7 @@ require (
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-msgpack v0.5.4 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
@ -47,7 +47,7 @@ require (
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

View file

@ -200,8 +200,8 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
@ -435,8 +435,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -486,8 +486,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -19,7 +19,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
@ -37,7 +37,7 @@ require (
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

View file

@ -175,8 +175,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -372,8 +372,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -408,8 +408,8 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -30,7 +30,7 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
@ -45,8 +45,8 @@ require (
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect

View file

@ -186,8 +186,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -377,8 +377,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -416,8 +416,8 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -38,7 +38,7 @@ require (
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
@ -66,7 +66,7 @@ require (
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect

View file

@ -217,8 +217,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -437,8 +437,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -474,8 +474,8 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=

View file

@ -22,7 +22,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
@ -43,7 +43,7 @@ require (
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect

View file

@ -180,8 +180,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -381,8 +381,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -417,8 +417,8 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -16,7 +16,7 @@ require (
github.com/apparentlymart/go-versions v1.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
@ -31,7 +31,7 @@ require (
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

View file

@ -168,8 +168,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -352,8 +352,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -388,8 +388,8 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -47,7 +47,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
@ -66,7 +66,7 @@ require (
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

View file

@ -227,8 +227,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
@ -424,8 +424,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -466,8 +466,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -701,7 +701,7 @@ func (b *Remote) StateMgr(name string) (statemgr.Full, error) {
return &remote.State{
Client: client,
// client.runID will be set if we're running a the Terraform Cloud
// client.runID will be set if we're running in a HCP Terraform
// or Terraform Enterprise remote execution environment, in which
// case we'll disable intermediate snapshots to avoid extra storage
// costs for Terraform Enterprise customers.
@ -759,7 +759,7 @@ func (b *Remote) Operation(ctx context.Context, op *backendrun.Operation) (*back
// - Workspace configured for local operations, in which case the remote
// version is meaningless;
// - Forcing local operations with a remote backend, which should only
// happen in the Terraform Cloud worker, in which case the Terraform
// happen in the HCP Terraform worker, in which case the Terraform
// versions by definition match.
b.IgnoreVersionConflict()

View file

@ -291,7 +291,7 @@ func (v *remoteStoredVariableValue) ParseVariableValue(mode configs.VariablePars
Value: val,
// We mark these as "from input" with the rationale that entering
// variable values into the Terraform Cloud or Enterprise UI is,
// variable values into the HCP Terraform or Enterprise UI is,
// roughly speaking, a similar idea to entering variable values at
// the interactive CLI prompts. It's not a perfect correspondance,
// but it's closer than the other options.

View file

@ -91,7 +91,7 @@ func TestRemoteStoredVariableValue(t *testing.T) {
"HCL computation": {
// This (stored expressions containing computation) is not a case
// we intentionally supported, but it became possible for remote
// operations in Terraform 0.12 (due to Terraform Cloud/Enterprise
// operations in Terraform 0.12 (due to HCP Terraform and Terraform Enterprise
// just writing the HCL verbatim into generated `.tfvars` files).
// We support it here for consistency, and we continue to support
// it in both places for backward-compatibility. In practice,

View file

@ -47,7 +47,7 @@ const (
genericHostname = "localterraform.com"
)
// Cloud is an implementation of EnhancedBackend in service of the Terraform Cloud/Enterprise
// Cloud is an implementation of EnhancedBackend in service of the HCP Terraform or Terraform Enterprise
// integration for Terraform CLI. This backend is not intended to be surfaced at the user level and
// is instead an implementation detail of cloud.Cloud.
type Cloud struct {
@ -61,38 +61,42 @@ type Cloud struct {
// Operation. See Operation for more details.
ContextOpts *terraform.ContextOpts
// client is the Terraform Cloud/Enterprise API client.
// client is the HCP Terraform or Terraform Enterprise API client.
client *tfe.Client
// viewHooks implements functions integrating the tfe.Client with the CLI
// output.
viewHooks views.CloudHooks
// Hostname of Terraform Cloud or Terraform Enterprise
// Hostname of HCP Terraform or Terraform Enterprise
Hostname string
// Token for Terraform Cloud or Terraform Enterprise
// Token for HCP Terraform or Terraform Enterprise
Token string
// Organization is the Organization that contains the target workspaces.
Organization string
// WorkspaceMapping contains strategies for mapping CLI workspaces in the working directory
// to remote Terraform Cloud workspaces.
// to remote HCP Terraform workspaces.
WorkspaceMapping WorkspaceMapping
// ServicesHost is the full account of discovered Terraform services at the
// Terraform Cloud instance. It should include at least the tfe v2 API, and
// HCP Terraform instance. It should include at least the tfe v2 API, and
// possibly other services.
ServicesHost *disco.Host
// appName is the name of the instance the cloud backend is currently
// configured against
appName string
// services is used for service discovery
services *disco.Disco
// renderer is used for rendering JSON plan output and streamed logs.
renderer *jsonformat.Renderer
// local allows local operations, where Terraform Cloud serves as a state storage backend.
// local allows local operations, where HCP Terraform serves as a state storage backend.
local backendrun.OperationsBackend
// forceLocal, if true, will force the use of the local backend.
@ -331,21 +335,28 @@ func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics {
cfg.Headers.Set(tfversion.Header, tfversion.Version)
cfg.Headers.Set(headerSourceKey, headerSourceValue)
// Create the TFC/E API client.
// Create the HCP Terraform API client.
b.client, err = tfe.NewClient(cfg)
if err != nil {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Failed to create the Terraform Cloud/Enterprise client",
"Failed to create the HCP Terraform or Terraform Enterprise client",
fmt.Sprintf(
`Encountered an unexpected error while creating the `+
`Terraform Cloud/Enterprise client: %s.`, err,
`HCP Terraform or Terraform Enterprise client: %s.`, err,
),
))
return diags
}
}
// Read the app name header and if empty, provide a default
b.appName = b.client.AppName()
// Validate the header's value to ensure no tampering
if !isValidAppName(b.appName) {
b.appName = "HCP Terraform"
}
// Check if the organization exists by reading its entitlements.
entitlements, err := b.client.Organizations.ReadEntitlements(context.Background(), b.Organization)
if err != nil {
@ -394,7 +405,7 @@ func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics {
tfdiags.Sourceless(
tfdiags.Error,
"Unsupported Terraform Enterprise version",
cloudIntegrationUsedInUnsupportedTFE,
fmt.Sprintf(cloudIntegrationUsedInUnsupportedTFE, b.appName),
),
)
} else {
@ -419,6 +430,13 @@ func (b *Cloud) Configure(obj cty.Value) tfdiags.Diagnostics {
return diags
}
func (b *Cloud) AppName() string {
if isValidAppName(b.appName) {
return b.appName
}
return "HCP Terraform"
}
// resolveCloudConfig fills in a potentially incomplete cloud config block using
// environment variables and defaults. If the returned Diagnostics are clean,
// the resulting value is a logically valid cloud config. If the Diagnostics
@ -581,7 +599,7 @@ func (b *Cloud) Workspaces() ([]string, error) {
return names, nil
}
// Otherwise, multiple workspaces are being mapped. Query Terraform Cloud for all the remote
// Otherwise, multiple workspaces are being mapped. Query HCP Terraform for all the remote
// workspaces by the provided mapping strategy.
options := &tfe.WorkspaceListOptions{}
if b.WorkspaceMapping.Strategy() == WorkspaceTagsStrategy {
@ -719,7 +737,7 @@ func (b *Cloud) StateMgr(name string) (statemgr.Full, error) {
Name: b.WorkspaceMapping.Project,
}
// didn't find project, create it instead
log.Printf("[TRACE] cloud: Creating Terraform Cloud project %s/%s", b.Organization, b.WorkspaceMapping.Project)
log.Printf("[TRACE] cloud: Creating %s project %s/%s", b.appName, b.Organization, b.WorkspaceMapping.Project)
project, err := b.client.Projects.Create(context.Background(), b.Organization, createOpts)
if err != nil && err != tfe.ErrResourceNotFound {
return nil, fmt.Errorf("failed to create project %s: %v", b.WorkspaceMapping.Project, err)
@ -730,7 +748,7 @@ func (b *Cloud) StateMgr(name string) (statemgr.Full, error) {
}
// Create a workspace
log.Printf("[TRACE] cloud: Creating Terraform Cloud workspace %s/%s", b.Organization, name)
log.Printf("[TRACE] cloud: Creating %s workspace %s/%s", b.appName, b.Organization, name)
workspace, err = b.client.Workspaces.Create(context.Background(), b.Organization, workspaceCreateOptions)
if err != nil {
return nil, fmt.Errorf("error creating workspace %s: %v", name, err)
@ -753,9 +771,9 @@ func (b *Cloud) StateMgr(name string) (statemgr.Full, error) {
// object to do a nicely formatted message, so we're just assuming the
// issue was that the version wasn't available since that's probably what
// happened.
log.Printf("[TRACE] cloud: Attempted to select version %s for TFC workspace; unavailable, so %s will be used instead.", tfversion.String(), workspace.TerraformVersion)
log.Printf("[TRACE] cloud: Attempted to select version %s for this %s workspace; unavailable, so %s will be used instead.", tfversion.String(), b.appName, workspace.TerraformVersion)
if b.CLI != nil {
versionUnavailable := fmt.Sprintf(unavailableTerraformVersion, tfversion.String(), workspace.TerraformVersion)
versionUnavailable := fmt.Sprintf(unavailableTerraformVersion, tfversion.String(), b.appName, workspace.TerraformVersion)
b.CLI.Output(b.Colorize().Color(versionUnavailable))
}
}
@ -765,7 +783,7 @@ func (b *Cloud) StateMgr(name string) (statemgr.Full, error) {
options := tfe.WorkspaceAddTagsOptions{
Tags: b.WorkspaceMapping.tfeTags(),
}
log.Printf("[TRACE] cloud: Adding tags for Terraform Cloud workspace %s/%s", b.Organization, name)
log.Printf("[TRACE] cloud: Adding tags for %s workspace %s/%s", b.appName, b.Organization, name)
err = b.client.Workspaces.AddTags(context.Background(), workspace.ID, options)
if err != nil {
return nil, fmt.Errorf("Error updating workspace %s: %v", name, err)
@ -802,7 +820,7 @@ func (b *Cloud) Operation(ctx context.Context, op *backendrun.Operation) (*backe
// - Running remotely, in which case the local version is irrelevant;
// - Workspace configured for local operations, in which case the remote
// version is meaningless;
// - Forcing local operations, which should only happen in the Terraform Cloud worker, in
// - Forcing local operations, which should only happen in the HCP Terraform worker, in
// which case the Terraform versions by definition match.
b.IgnoreVersionConflict()
@ -837,7 +855,7 @@ func (b *Cloud) Operation(ctx context.Context, op *backendrun.Operation) (*backe
f = b.opApply
default:
return nil, fmt.Errorf(
"\n\nTerraform Cloud does not support the %q operation.", op.Type)
"\n\n%s does not support the %q operation.", b.appName, op.Type)
}
// Lock
@ -1161,14 +1179,15 @@ func (b *Cloud) fetchWorkspace(ctx context.Context, organization string, workspa
case tfe.ErrResourceNotFound:
return nil, fmt.Errorf(
"workspace %s not found\n\n"+
"For security, Terraform Cloud returns '404 Not Found' responses for resources\n"+
fmt.Sprintf("For security, %s returns '404 Not Found' responses for resources\n", b.appName)+
"for resources that a user doesn't have access to, in addition to resources that\n"+
"do not exist. If the resource does exist, please check the permissions of the provided token.",
workspace,
)
default:
err := fmt.Errorf(
"Terraform Cloud returned an unexpected error:\n\n%s",
"%s returned an unexpected error:\n\n%s",
b.appName,
err,
)
return nil, err
@ -1190,7 +1209,7 @@ func (b *Cloud) validWorkspaceEnvVar(ctx context.Context, organization, workspac
if err != nil && err != tfe.ErrResourceNotFound {
return tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud returned an unexpected error",
fmt.Sprintf("%s returned an unexpected error", b.appName),
err.Error(),
)
}
@ -1214,7 +1233,7 @@ func (b *Cloud) validWorkspaceEnvVar(ctx context.Context, organization, workspac
if err != nil {
return tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud returned an unexpected error",
fmt.Sprintf("%s returned an unexpected error", b.appName),
err.Error(),
)
}
@ -1275,7 +1294,7 @@ func generalError(msg string, err error) error {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
fmt.Sprintf("%s: %v", msg, err),
"For security, Terraform Cloud returns '404 Not Found' responses for resources\n"+
"For security, HCP Terraform and Terraform Enterprise return '404 Not Found' responses for resources\n"+
"for resources that a user doesn't have access to, in addition to resources that\n"+
"do not exist. If the resource does exist, please check the permissions of the provided token.",
))
@ -1284,7 +1303,7 @@ func generalError(msg string, err error) error {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
fmt.Sprintf("%s: %v", msg, err),
`Terraform Cloud returned an unexpected error. Sometimes `+
`HCP Terraform or Terraform Enterprise returned an unexpected error. Sometimes `+
`this is caused by network connection problems, in which case you could retry `+
`the command. If the issue persists please open a support ticket to get help `+
`resolving the problem.`,
@ -1304,12 +1323,12 @@ const operationNotCanceled = `
const refreshToApplyRefresh = `[bold][yellow]Proceeding with 'terraform apply -refresh-only -auto-approve'.[reset]`
const unavailableTerraformVersion = `
[reset][yellow]The local Terraform version (%s) is not available in Terraform Cloud, or your
[reset][yellow]The local Terraform version (%s) is not available in %s, or your
organization does not have access to it. The new workspace will use %s. You can
change this later in the workspace settings.[reset]`
const cloudIntegrationUsedInUnsupportedTFE = `
This version of Terraform Cloud/Enterprise does not support the state mechanism
This version of %s does not support the state mechanism
attempting to be used by the platform. This should never happen.
Please reach out to HashiCorp Support to resolve this issue.`
@ -1317,29 +1336,29 @@ Please reach out to HashiCorp Support to resolve this issue.`
var (
workspaceConfigurationHelp = fmt.Sprintf(
`The 'workspaces' block configures how Terraform CLI maps its workspaces for this single
configuration to workspaces within a Terraform Cloud organization. Two strategies are available:
configuration to workspaces within an HCP Terraform or Terraform Enterprise organization. Two strategies are available:
[bold]tags[reset] - %s
[bold]name[reset] - %s`, schemaDescriptionTags, schemaDescriptionName)
schemaDescriptionHostname = `The Terraform Enterprise hostname to connect to. This optional argument defaults to app.terraform.io
for use with Terraform Cloud.`
for use with HCP Terraform.`
schemaDescriptionOrganization = `The name of the organization containing the targeted workspace(s).`
schemaDescriptionToken = `The token used to authenticate with Terraform Cloud/Enterprise. Typically this argument should not
schemaDescriptionToken = `The token used to authenticate with HCP Terraform or Terraform Enterprise. Typically this argument should not
be set, and 'terraform login' used instead; your credentials will then be fetched from your CLI
configuration file or configured credential helper.`
schemaDescriptionTags = `A set of tags used to select remote Terraform Cloud workspaces to be used for this single
schemaDescriptionTags = `A set of tags used to select remote HCP Terraform or Terraform Enterprise workspaces to be used for this single
configuration. New workspaces will automatically be tagged with these tag values. Generally, this
is the primary and recommended strategy to use. This option conflicts with "name".`
schemaDescriptionName = `The name of a single Terraform Cloud workspace to be used with this configuration.
schemaDescriptionName = `The name of a single HCP Terraform or Terraform Enterprise workspace to be used with this configuration.
When configured, only the specified workspace can be used. This option conflicts with "tags"
and with the TF_WORKSPACE environment variable.`
schemaDescriptionProject = `The name of a Terraform Cloud project. Workspaces that need creating
schemaDescriptionProject = `The name of an HCP Terraform or Terraform Enterpise project. Workspaces that need creating
will be created within this project.`
)

View file

@ -51,8 +51,8 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backendrun.Opera
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Custom parallelism values are currently not supported",
`Terraform Cloud does not support setting a custom parallelism `+
`value at this time.`,
fmt.Sprintf("%s does not support setting a custom parallelism ", b.appName)+
"value at this time.",
))
}
@ -60,7 +60,7 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backendrun.Opera
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Applying a saved local plan is not supported",
`Terraform Cloud can apply a saved cloud plan, or create a new plan when `+
fmt.Sprintf("%s can apply a saved cloud plan, or create a new plan when ", b.appName)+
`configuration is present. It cannot apply a saved local plan.`,
))
}
@ -91,7 +91,7 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backendrun.Opera
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Saved plan is for a different hostname",
fmt.Sprintf("The given saved plan refers to a run on %s, but the currently configured Terraform Cloud or Terraform Enterprise instance is %s.", cp.Hostname, b.Hostname),
fmt.Sprintf("The given saved plan refers to a run on %s, but the currently configured %s instance is %s.", cp.Hostname, b.appName, b.Hostname),
))
return r, diags.Err()
}
@ -115,12 +115,12 @@ func (b *Cloud) opApply(stopCtx, cancelCtx context.Context, op *backendrun.Opera
if !r.Actions.IsConfirmable {
url := runURL(b.Hostname, b.Organization, op.Workspace, r.ID)
return r, unusableSavedPlanError(r.Status, url)
return r, unusableSavedPlanError(r.Status, url, b.appName)
}
// Since we're not calling plan(), we need to print a run header ourselves:
if b.CLI != nil {
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(applySavedHeader) + "\n"))
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(fmt.Sprintf(applySavedHeader, b.appName) + "\n")))
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(fmt.Sprintf(
runHeader, b.Hostname, b.Organization, r.Workspace.Name, r.ID)) + "\n"))
}
@ -276,7 +276,7 @@ func runURL(hostname, orgName, wsName, runID string) string {
return fmt.Sprintf("https://%s/app/%s/%s/runs/%s", hostname, orgName, wsName, runID)
}
func unusableSavedPlanError(status tfe.RunStatus, url string) error {
func unusableSavedPlanError(status tfe.RunStatus, url, appName string) error {
var diags tfdiags.Diagnostics
var summary, reason string
@ -289,10 +289,10 @@ func unusableSavedPlanError(status tfe.RunStatus, url string) error {
reason = "The given plan file is already being applied, and cannot be applied again."
case tfe.RunCanceled:
summary = "Saved plan is canceled"
reason = "The given plan file can no longer be applied because the run was canceled via the Terraform Cloud UI or API."
reason = fmt.Sprintf("The given plan file can no longer be applied because the run was canceled via the %s UI or API.", appName)
case tfe.RunDiscarded:
summary = "Saved plan is discarded"
reason = "The given plan file can no longer be applied; either another run was applied first, or a user discarded it via the Terraform Cloud UI or API."
reason = fmt.Sprintf("The given plan file can no longer be applied; either another run was applied first, or a user discarded it via the %s UI or API.", appName)
case tfe.RunErrored:
summary = "Saved plan is errored"
reason = "The given plan file refers to a plan that had errors and did not complete successfully. It cannot be applied."
@ -307,7 +307,7 @@ func unusableSavedPlanError(status tfe.RunStatus, url string) error {
reason = "The given plan file has soft policy failures, and cannot be applied until a user with appropriate permissions overrides the policy check."
default:
summary = "Saved plan cannot be applied"
reason = "Terraform Cloud cannot apply the given plan file. This may mean the plan and checks have not yet completed, or may indicate another problem."
reason = fmt.Sprintf("%s cannot apply the given plan file. This may mean the plan and checks have not yet completed, or may indicate another problem.", appName)
}
diags = diags.Append(tfdiags.Sourceless(
@ -319,7 +319,7 @@ func unusableSavedPlanError(status tfe.RunStatus, url string) error {
}
const applyDefaultHeader = `
[reset][yellow]Running apply in Terraform Cloud. Output will stream here. Pressing Ctrl-C
[reset][yellow]Running apply in %s. Output will stream here. Pressing Ctrl-C
will cancel the remote apply if it's still pending. If the apply started it
will stop streaming the logs, but will not stop the apply running remotely.[reset]
@ -327,7 +327,7 @@ Preparing the remote apply...
`
const applySavedHeader = `
[reset][yellow]Running apply in Terraform Cloud. Output will stream here. Pressing Ctrl-C
[reset][yellow]Running apply in %s. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the apply running remotely.[reset]
Preparing the remote apply...

View file

@ -103,8 +103,8 @@ func TestCloud_applyBasic(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -684,8 +684,8 @@ func TestCloud_applyWithRequiredVariables(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
}
@ -838,8 +838,8 @@ func TestCloud_applyAutoApprove(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -909,8 +909,8 @@ func TestCloud_applyApprovedExternally(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -983,8 +983,8 @@ func TestCloud_applyDiscardedExternally(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1052,8 +1052,8 @@ func TestCloud_applyWithAutoApprove(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1108,8 +1108,8 @@ func TestCloud_applyForceLocal(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -1171,8 +1171,8 @@ func TestCloud_applyWorkspaceWithoutOperations(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -1242,8 +1242,8 @@ func TestCloud_applyLockTimeout(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Lock timeout exceeded") {
t.Fatalf("expected lock timout error in output: %s", output)
@ -1291,8 +1291,8 @@ func TestCloud_applyDestroy(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "0 to add, 0 to change, 1 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1468,8 +1468,8 @@ func TestCloud_applyPolicyPass(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1521,8 +1521,8 @@ func TestCloud_applyPolicyHardFail(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1571,8 +1571,8 @@ func TestCloud_applyPolicySoftFail(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1720,8 +1720,8 @@ func TestCloud_applyPolicySoftFailAutoApprove(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running apply in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running apply in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summery in output: %s", output)
@ -1924,19 +1924,19 @@ func TestCloud_applyVersionCheck(t *testing.T) {
t.Fatalf("operation failed: %s", b.CLI.(*cli.MockUi).ErrorWriter.String())
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
hasRemote := strings.Contains(output, "Running apply in Terraform Cloud")
hasRemote := strings.Contains(output, "Running apply in HCP Terraform")
hasSummary := strings.Contains(output, "1 added, 0 changed, 0 destroyed")
hasResources := run.State.HasManagedResourceInstanceObjects()
if !tc.forceLocal && !isLocalExecutionMode(tc.executionMode) {
if !hasRemote {
t.Errorf("missing TFC header in output: %s", output)
t.Errorf("missing HCP Terraform header in output: %s", output)
}
if !hasSummary {
t.Errorf("expected apply summary in output: %s", output)
}
} else {
if hasRemote {
t.Errorf("unexpected TFC header in output: %s", output)
t.Errorf("unexpected HCP Terraform header in output: %s", output)
}
if !hasResources {
t.Errorf("expected resources in state")

View file

@ -645,3 +645,7 @@ func decodeErrorPayload(r *http.Response) ([]string, error) {
return errs, nil
}
func isValidAppName(name string) bool {
return name == "HCP Terraform" || name == "Terraform Enterprise"
}

View file

@ -287,7 +287,7 @@ func (v *remoteStoredVariableValue) ParseVariableValue(mode configs.VariablePars
Value: val,
// We mark these as "from input" with the rationale that entering
// variable values into the Terraform Cloud or Enterprise UI is,
// variable values into the HCP Terraform or Enterprise UI is,
// roughly speaking, a similar idea to entering variable values at
// the interactive CLI prompts. It's not a perfect correspondance,
// but it's closer than the other options.

View file

@ -90,7 +90,7 @@ func TestRemoteStoredVariableValue(t *testing.T) {
"HCL computation": {
// This (stored expressions containing computation) is not a case
// we intentionally supported, but it became possible for remote
// operations in Terraform 0.12 (due to Terraform Cloud/Enterprise
// operations in Terraform 0.12 (due to HCP Terraform and Terraform Enterprise
// just writing the HCL verbatim into generated `.tfvars` files).
// We support it here for consistency, and we continue to support
// it in both places for backward-compatibility. In practice,

View file

@ -62,8 +62,8 @@ func (b *Cloud) opPlan(stopCtx, cancelCtx context.Context, op *backendrun.Operat
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Custom parallelism values are currently not supported",
`Terraform Cloud does not support setting a custom parallelism `+
`value at this time.`,
fmt.Sprintf("%s does not support setting a custom parallelism ", b.appName)+
"value at this time.",
))
}
@ -71,8 +71,8 @@ func (b *Cloud) opPlan(stopCtx, cancelCtx context.Context, op *backendrun.Operat
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Displaying a saved plan is currently not supported",
`Terraform Cloud currently requires configuration to be present and `+
`does not accept an existing saved plan as an argument at this time.`,
fmt.Sprintf("%s currently requires configuration to be present and ", b.appName)+
"does not accept an existing saved plan as an argument at this time.",
))
}
@ -120,9 +120,9 @@ func (b *Cloud) opPlan(stopCtx, cancelCtx context.Context, op *backendrun.Operat
func (b *Cloud) plan(stopCtx, cancelCtx context.Context, op *backendrun.Operation, w *tfe.Workspace) (*tfe.Run, error) {
if b.CLI != nil {
header := planDefaultHeader
header := fmt.Sprintf(planDefaultHeader, b.appName)
if op.Type == backendrun.OperationTypeApply || op.Type == backendrun.OperationTypeRefresh {
header = applyDefaultHeader
header = fmt.Sprintf(applyDefaultHeader, b.appName)
}
b.CLI.Output(b.Colorize().Color(strings.TrimSpace(header) + "\n"))
}
@ -247,7 +247,7 @@ in order to capture the filesystem context the remote workspace expects:
// field.
return nil, generalError(
"Invalid plan mode",
fmt.Errorf("Terraform Cloud doesn't support %s", op.PlanMode),
fmt.Errorf("%s doesn't support %s", b.appName, op.PlanMode),
)
}
@ -420,15 +420,15 @@ func (b *Cloud) AssertImportCompatible(config *configs.Config) error {
// Second, check the agent version is high enough.
agentEnv, isSet := os.LookupEnv("TFC_AGENT_VERSION")
if !isSet {
return fmt.Errorf("Error reading TFC agent version. To proceed, please remove any import blocks from your config. Please report the following error to the Terraform team: TFC_AGENT_VERSION not present.")
return fmt.Errorf("Error reading Terraform Cloud agent version. To proceed, please remove any import blocks from your config. Please report the following error to the Terraform team: TFC_AGENT_VERSION not present.")
}
currentAgentVersion, err := version.NewVersion(agentEnv)
if err != nil {
return fmt.Errorf("Error parsing TFC agent version. To proceed, please remove any import blocks from your config. Please report the following error to the Terraform team: %s", err)
return fmt.Errorf("Error parsing Terraform Cloud agent version. To proceed, please remove any import blocks from your config. Please report the following error to the Terraform team: %s", err)
}
desiredAgentVersion, _ := version.NewVersion("1.10")
if currentAgentVersion.LessThan(desiredAgentVersion) {
return fmt.Errorf("Import blocks are not supported in this version of the Terraform Cloud Agent. You are using agent version %s, but this feature requires version %s. Please remove any import blocks from your config or upgrade your agent.", currentAgentVersion, desiredAgentVersion)
return fmt.Errorf("Import blocks are not supported in this version of the HCP Terraform Agent. You are using agent version %s, but this feature requires version %s. Please remove any import blocks from your config or upgrade your agent.", currentAgentVersion, desiredAgentVersion)
}
}
return nil
@ -631,7 +631,7 @@ func shouldGenerateConfig(out string, run *tfe.Run) bool {
}
const planDefaultHeader = `
[reset][yellow]Running plan in Terraform Cloud. Output will stream here. Pressing Ctrl-C
[reset][yellow]Running plan in %s. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.[reset]
Preparing the remote plan...

View file

@ -90,8 +90,8 @@ func TestCloud_planBasic(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -204,8 +204,8 @@ func TestCloud_planLongLine(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -388,8 +388,8 @@ func TestCloud_planWithPath(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -673,8 +673,8 @@ func TestCloud_planWithRequiredVariables(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
}
@ -774,8 +774,8 @@ func TestCloud_planForceLocal(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -810,8 +810,8 @@ func TestCloud_planWithoutOperationsEntitlement(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -860,8 +860,8 @@ func TestCloud_planWorkspaceWithoutOperations(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("unexpected TFC header in output: %s", output)
if strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("unexpected HCP Terraform header in output: %s", output)
}
if output := done(t).Stdout(); !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -928,8 +928,8 @@ func TestCloud_planLockTimeout(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Lock timeout exceeded") {
t.Fatalf("expected lock timout error in output: %s", output)
@ -1026,8 +1026,8 @@ func TestCloud_planWithWorkingDirectory(t *testing.T) {
if !strings.Contains(output, "The remote workspace is configured to work with configuration") {
t.Fatalf("expected working directory warning: %s", output)
}
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -1082,8 +1082,8 @@ func TestCloud_planWithWorkingDirectoryFromCurrentPath(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "1 to add, 0 to change, 0 to destroy") {
t.Fatalf("expected plan summary in output: %s", output)
@ -1114,8 +1114,8 @@ func TestCloud_planCostEstimation(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Resources: 1 of 1 estimated") {
t.Fatalf("expected cost estimate result in output: %s", output)
@ -1149,8 +1149,8 @@ func TestCloud_planPolicyPass(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Sentinel Result: true") {
t.Fatalf("expected policy check result in output: %s", output)
@ -1189,8 +1189,8 @@ func TestCloud_planPolicyHardFail(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Sentinel Result: false") {
t.Fatalf("expected policy check result in output: %s", output)
@ -1229,8 +1229,8 @@ func TestCloud_planPolicySoftFail(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "Sentinel Result: false") {
t.Fatalf("expected policy check result in output: %s", output)
@ -1264,8 +1264,8 @@ func TestCloud_planWithRemoteError(t *testing.T) {
}
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Running plan in Terraform Cloud") {
t.Fatalf("expected TFC header in output: %s", output)
if !strings.Contains(output, "Running plan in HCP Terraform") {
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
if !strings.Contains(output, "null_resource.foo: 1 error") {
t.Fatalf("expected plan error in output: %s", output)
@ -1329,7 +1329,7 @@ func TestCloud_planOtherError(t *testing.T) {
}
if !strings.Contains(err.Error(),
"Terraform Cloud returned an unexpected error:\n\nI'm a little teacup") {
"HCP Terraform returned an unexpected error:\n\nI'm a little teacup") {
t.Fatalf("expected error message, got: %s", err.Error())
}
}
@ -1461,12 +1461,12 @@ func TestCloud_planInvalidGenConfigOutPath(t *testing.T) {
}
func TestCloud_planShouldRenderSRO(t *testing.T) {
t.Run("when instance is TFC", func(t *testing.T) {
t.Run("when instance is HCP Terraform", func(t *testing.T) {
handlers := map[string]func(http.ResponseWriter, *http.Request){
"/api/v2/ping": func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("TFP-API-Version", "2.5")
w.Header().Set("TFP-AppName", "Terraform Cloud")
w.Header().Set("TFP-AppName", "HCP Terraform")
},
}
b, bCleanup := testBackendWithHandlers(t, handlers)
@ -1550,6 +1550,7 @@ func TestCloud_planShouldRenderSRO(t *testing.T) {
handlers := map[string]func(http.ResponseWriter, *http.Request){
"/api/v2/ping": func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("TFP-AppName", "Terraform Enterprise")
w.Header().Set("TFP-API-Version", "2.5")
},
}

View file

@ -72,7 +72,7 @@ func TestCloud_refreshBasicActuallyRunsApplyRefresh(t *testing.T) {
output := b.CLI.(*cli.MockUi).OutputWriter.String()
if !strings.Contains(output, "Proceeding with 'terraform apply -refresh-only -auto-approve'") {
t.Fatalf("expected TFC header in output: %s", output)
t.Fatalf("expected HCP Terraform header in output: %s", output)
}
stateMgr, _ := b.StateMgr(testBackendSingleWorkspaceName)

View file

@ -17,7 +17,7 @@ import (
// `terraform show cloudplan.tfplan` relies on the correctness of the following
// behaviors:
//
// 1. TFC API returns redacted or unredacted plan JSON on request, if permission
// 1. HCP Terraform API returns redacted or unredacted plan JSON on request, if permission
// requirements are met and the run is in a condition where that JSON exists.
// 2. Cloud.ShowPlanForRun() makes correct API calls, calculates metadata
// properly given a tfe.Run, and returns either a cloudplan.RemotePlanJSON or an err.

View file

@ -641,7 +641,7 @@ func TestCloud_configVerifyMinimumTFEVersionInAutomation(t *testing.T) {
t.Fatalf("expected configure to error")
}
expected := `This version of Terraform Cloud/Enterprise does not support the state mechanism
expected := `This version of HCP Terraform does not support the state mechanism
attempting to be used by the platform. This should never happen.`
if !strings.Contains(confDiags.Err().Error(), expected) {
t.Fatalf("expected configure to error with %q, got %q", expected, confDiags.Err().Error())
@ -650,7 +650,7 @@ attempting to be used by the platform. This should never happen.`
func TestCloud_setUnavailableTerraformVersion(t *testing.T) {
// go-tfe returns an error IRL if you try to set a Terraform version that's
// not available in your TFC instance. To test this, tfe_client_mock errors if
// not available in your HCP Terraform instance. To test this, tfe_client_mock errors if
// you try to set any Terraform version for this specific workspace name.
workspaceName := "unavailable-terraform-version"

View file

@ -16,7 +16,7 @@ import (
)
// IntegrationOutputWriter is an interface used to to write output tailored for
// Terraform Cloud integrations
// HCP Terraform integrations
type IntegrationOutputWriter interface {
End()
OutputElapsed(message string, maxMessage int)
@ -24,7 +24,7 @@ type IntegrationOutputWriter interface {
SubOutput(str string)
}
// IntegrationContext is a set of data that is useful when performing Terraform Cloud integration operations
// IntegrationContext is a set of data that is useful when performing HCP Terraform integration operations
type IntegrationContext struct {
B *Cloud
StopContext context.Context

View file

@ -31,7 +31,7 @@ type RemotePlanJSON struct {
// Unchanged/errored. Required by (jsonformat.Renderer).RenderHumanPlan.
Qualities []plans.Quality
// A human-readable header with a link to view the associated run in the
// Terraform Cloud UI.
// HCP Terraform UI.
RunHeader string
// A human-readable footer with information relevant to the likely next
// actions for this plan.

View file

@ -35,7 +35,7 @@ func Test_terraform_apply_autoApprove(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply"},
@ -75,7 +75,7 @@ func Test_terraform_apply_autoApprove(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply"},
@ -115,7 +115,7 @@ func Test_terraform_apply_autoApprove(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -153,7 +153,7 @@ func Test_terraform_apply_autoApprove(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},

View file

@ -23,7 +23,7 @@ func Test_apply_no_input_flag(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-input=false"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized`,
expectedCmdOutput: `HCP Terraform has been successfully initialized`,
},
{
command: []string{"apply", "-input=false"},
@ -45,7 +45,7 @@ func Test_apply_no_input_flag(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-input=false"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized`,
expectedCmdOutput: `HCP Terraform has been successfully initialized`,
},
{
command: []string{"apply", "-auto-approve", "-input=false"},

View file

@ -24,7 +24,7 @@ func Test_backend_apply_before_init(t *testing.T) {
commands: []tfCommand{
{
command: []string{"apply"},
expectedCmdOutput: `Terraform Cloud initialization required: please run "terraform init"`,
expectedCmdOutput: `HCP Terraform initialization required: please run "terraform init"`,
expectError: true,
},
},
@ -58,7 +58,7 @@ func Test_backend_apply_before_init(t *testing.T) {
commands: []tfCommand{
{
command: []string{"apply"},
expectedCmdOutput: `Terraform Cloud initialization required: please run "terraform init"`,
expectedCmdOutput: `HCP Terraform initialization required: please run "terraform init"`,
expectError: true,
},
},

View file

@ -31,7 +31,7 @@ func Test_cloud_organization_env_var(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -78,7 +78,7 @@ func Test_cloud_workspace_name_env_var(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -94,7 +94,7 @@ func Test_cloud_workspace_name_env_var(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"workspace", "show"},
@ -159,7 +159,7 @@ func Test_cloud_workspace_tags_env_var(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -175,7 +175,7 @@ func Test_cloud_workspace_tags_env_var(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"workspace", "show"},
@ -232,7 +232,7 @@ func Test_cloud_null_config(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -248,7 +248,7 @@ func Test_cloud_null_config(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"workspace", "show"},

View file

@ -251,10 +251,10 @@ func writeMainTF(t *testing.T, block string, dir string) {
f.Close()
}
// The e2e tests rely on the fact that the terraform version in TFC/E is able to
// run the `cloud` configuration block, which is available in 1.1 and will
// continue to be available in later versions. So this function checks that
// there is a version that is >= 1.1.
// The e2e tests rely on the fact that the terraform version in HCP Terraform
// is able to run the `cloud` configuration block, which is available in 1.1
// and will continue to be available in later versions. So this function checks
// that there is a version that is >= 1.1.
func skipWithoutRemoteTerraformVersion(t *testing.T) {
version := tfversion.Version
baseVersion, err := goversion.NewVersion(version)

View file

@ -26,7 +26,7 @@ func Test_init_with_empty_tags(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `There are no workspaces with the configured tags`,
userInput: []string{"emptytag-prod"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
},
},

View file

@ -60,7 +60,7 @@ func Test_migrate_multi_to_tfc_cloud_name_strategy(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `Do you want to copy only your current workspace?`,
userInput: []string{"yes"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -125,7 +125,7 @@ func Test_migrate_multi_to_tfc_cloud_name_strategy(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `Do you want to copy only your current workspace?`,
userInput: []string{"yes"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "list"},
@ -191,7 +191,7 @@ func Test_migrate_multi_to_tfc_cloud_name_strategy(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `Do you want to copy only your current workspace?`,
userInput: []string{"yes"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "select", "default"},
@ -286,12 +286,12 @@ func Test_migrate_multi_to_tfc_cloud_tags_strategy(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud requires all workspaces to be given an explicit name.`,
expectedCmdOutput: `HCP Terraform requires all workspaces to be given an explicit name.`,
userInput: []string{"dev", "1", "app-*"},
postInputOutput: []string{
`Would you like to rename your workspaces?`,
"How would you like to rename your workspaces?",
"Terraform Cloud has been successfully initialized!"},
"HCP Terraform has been successfully initialized!"},
},
{
command: []string{"workspace", "select", "app-dev"},
@ -391,12 +391,12 @@ func Test_migrate_multi_to_tfc_cloud_tags_strategy(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud requires all workspaces to be given an explicit name.`,
expectedCmdOutput: `HCP Terraform requires all workspaces to be given an explicit name.`,
userInput: []string{"dev", "1", "app-*"},
postInputOutput: []string{
`Would you like to rename your workspaces?`,
"How would you like to rename your workspaces?",
"Terraform Cloud has been successfully initialized!"},
"HCP Terraform has been successfully initialized!"},
},
{
command: []string{"workspace", "select", "app-billing"},

View file

@ -17,7 +17,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
ctx := context.Background()
cases := testCases{
"migrate remote backend name to tfc name": {
"migrate remote backend name to HCP Terraform name": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -45,11 +45,11 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -69,7 +69,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend name to tfc same name": {
"migrate remote backend name to HCP Terraform same name": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -97,11 +97,11 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -121,7 +121,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend name to tfc tags": {
"migrate remote backend name to HCP Terraform tags": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -153,12 +153,12 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "cloud-workspace", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud requires all workspaces to be given an explicit name.`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform requires all workspaces to be given an explicit name.`,
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -183,7 +183,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend prefix to tfc name strategy single workspace": {
"migrate remote backend prefix to HCP Terraform name strategy single workspace": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -212,11 +212,11 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -236,7 +236,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend prefix to tfc name strategy multi workspace": {
"migrate remote backend prefix to HCP Terraform name strategy multi workspace": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -279,7 +279,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
expectedCmdOutput: `Do you want to copy only your current workspace?`,
userInput: []string{"yes"},
postInputOutput: []string{
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -318,7 +318,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend prefix to tfc tags strategy single workspace": {
"migrate remote backend prefix to HCP Terraform tags strategy single workspace": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -347,12 +347,12 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "cloud-workspace", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud requires all workspaces to be given an explicit name.`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform requires all workspaces to be given an explicit name.`,
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "list"},
@ -372,7 +372,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
}
},
},
"migrate remote backend prefix to tfc tags strategy multi workspace": {
"migrate remote backend prefix to HCP Terraform tags strategy multi workspace": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -417,7 +417,7 @@ func Test_migrate_remote_backend_single_org(t *testing.T) {
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Do you wish to proceed?`,
userInput: []string{"yes"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -468,7 +468,7 @@ func Test_migrate_remote_backend_multi_org(t *testing.T) {
ctx := context.Background()
cases := testCases{
"migrate remote backend name to tfc name": {
"migrate remote backend name to HCP Terraform name": {
operations: []operationSets{
{
prep: func(t *testing.T, orgName, dir string) {
@ -496,11 +496,11 @@ func Test_migrate_remote_backend_multi_org(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Migrating from backend "remote" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "remote" to HCP Terraform.`,
userInput: []string{"yes", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},

View file

@ -45,11 +45,11 @@ func Test_migrate_single_to_tfc(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Migrating from backend "local" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "local" to HCP Terraform.`,
userInput: []string{"yes", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "list"},
@ -96,12 +96,12 @@ func Test_migrate_single_to_tfc(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Migrating from backend "local" to Terraform Cloud.`,
expectedCmdOutput: `Migrating from backend "local" to HCP Terraform.`,
userInput: []string{"yes", "new-workspace", "yes"},
postInputOutput: []string{
`Should Terraform migrate your existing state?`,
`Terraform Cloud requires all workspaces to be given an explicit name.`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform requires all workspaces to be given an explicit name.`,
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "list"},

View file

@ -23,7 +23,7 @@ func Test_migrate_tfc_to_other(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
},
},
@ -35,7 +35,7 @@ func Test_migrate_tfc_to_other(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Migrating state from Terraform Cloud to another backend is not yet implemented.`,
expectedCmdOutput: `Migrating state from HCP Terraform to another backend is not yet implemented.`,
expectError: true,
},
},

View file

@ -38,7 +38,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"workspace", "show"},
@ -63,7 +63,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -98,7 +98,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -119,7 +119,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
userInput: []string{"new-workspace"},
postInputOutput: []string{
`Terraform can create a properly tagged workspace for you now.`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"workspace", "show"},
@ -156,7 +156,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"apply", "-auto-approve"},
@ -184,7 +184,7 @@ func Test_migrate_tfc_to_tfc_single_workspace(t *testing.T) {
userInput: []string{"new-workspace"},
postInputOutput: []string{
`Terraform can create a properly tagged workspace for you now.`,
`Terraform Cloud has been successfully initialized!`},
`HCP Terraform has been successfully initialized!`},
},
},
},
@ -237,7 +237,7 @@ func Test_migrate_tfc_to_tfc_multiple_workspace(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `The currently selected workspace (default) does not exist.`,
userInput: []string{"1"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"apply"},
@ -275,7 +275,7 @@ func Test_migrate_tfc_to_tfc_multiple_workspace(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
postInputOutput: []string{`tag_val = "service"`},
},
{
@ -318,7 +318,7 @@ func Test_migrate_tfc_to_tfc_multiple_workspace(t *testing.T) {
command: []string{"init"},
expectedCmdOutput: `The currently selected workspace (default) does not exist.`,
userInput: []string{"1"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
{
command: []string{"apply", "-auto-approve"},
@ -345,7 +345,7 @@ func Test_migrate_tfc_to_tfc_multiple_workspace(t *testing.T) {
command: []string{"init", "-ignore-remote-version"},
expectedCmdOutput: `There are no workspaces with the configured tags (billing)`,
userInput: []string{"new-app-prod"},
postInputOutput: []string{`Terraform Cloud has been successfully initialized!`},
postInputOutput: []string{`HCP Terraform has been successfully initialized!`},
},
},
},

View file

@ -64,7 +64,7 @@ func Test_cloud_run_variables(t *testing.T) {
commands: []tfCommand{
{
command: []string{"init"},
expectedCmdOutput: `Terraform Cloud has been successfully initialized!`,
expectedCmdOutput: `HCP Terraform has been successfully initialized!`,
},
{
command: []string{"plan", "-var", "foo=bar"},

View file

@ -39,9 +39,9 @@ const (
)
// State implements the State interfaces in the state package to handle
// reading and writing the remote state to TFC. This State on its own does no
// local caching so every persist will go to the remote storage and local
// writes will go to memory.
// reading and writing the remote state to HCP Terraform. This State on
// its own does no local caching so every persist will go to the remote
// storage and local writes will go to memory.
type State struct {
mu sync.Mutex
@ -160,7 +160,7 @@ func (s *State) WriteState(state *states.State) error {
return nil
}
// PersistState uploads a snapshot of the latest state as a StateVersion to Terraform Cloud
// PersistState uploads a snapshot of the latest state as a StateVersion to HCP Terraform
func (s *State) PersistState(schemas *schemarepo.Schemas) error {
s.mu.Lock()
defer s.mu.Unlock()
@ -514,7 +514,7 @@ func (s *State) Delete(force bool) error {
return nil
}
// GetRootOutputValues fetches output values from Terraform Cloud
// GetRootOutputValues fetches output values from HCP Terraform
func (s *State) GetRootOutputValues() (map[string]*states.OutputValue, error) {
ctx := context.Background()

View file

@ -96,6 +96,10 @@ type TestSuiteRunner struct {
View views.Test
Streams *terminal.Streams
// appName is the name of the instance this test suite runner is configured
// against. Can be "HCP Terraform" or "Terraform Enterprise"
appName string
// clientOverride allows tests to specify the client instead of letting the
// system initialise one itself.
clientOverride *tfe.Client
@ -145,7 +149,7 @@ func (runner *TestSuiteRunner) Test() (moduletest.Status, tfdiags.Diagnostics) {
diags = diags.Append(tfdiags.AttributeValue(
tfdiags.Error,
"Module source points to the public registry",
"Terraform Cloud can only execute tests for modules held within private registries.",
"HCP Terraform and Terraform Enterprise can only execute tests for modules held within private registries.",
cty.Path{cty.GetAttrStep{Name: "source"}}))
return moduletest.Error, diags
}
@ -188,9 +192,9 @@ func (runner *TestSuiteRunner) Test() (moduletest.Status, tfdiags.Diagnostics) {
// the test run tidies up any state properly. This means, we'll send the
// cancellation signals and then still wait for and process the logs.
//
// This also means that all calls to TFC will use context.Background()
// This also means that all calls to HCP Terraform will use context.Background()
// instead of the stopped or cancelled context as we want them to finish and
// the run to be cancelled by TFC properly.
// the run to be cancelled by HCP Terraform properly.
opts := tfe.TestRunCreateOptions{
Filters: runner.Filters,
@ -386,10 +390,10 @@ func (runner *TestSuiteRunner) client(addr tfaddr.Module, id tfe.RegistryModuleI
if client, err = tfe.NewClient(cfg); err != nil {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Failed to create the Terraform Cloud/Enterprise client",
"Failed to create the HCP Terraform or Terraform Enterprise client",
fmt.Sprintf(
`Encountered an unexpected error while creating the `+
`Terraform Cloud/Enterprise client: %s.`, err,
`HCP Terraform or Terraform Enterprise client: %s.`, err,
),
))
return nil, nil, diags
@ -413,6 +417,11 @@ func (runner *TestSuiteRunner) client(addr tfaddr.Module, id tfe.RegistryModuleI
// Enable retries for server errors.
client.RetryServerErrors(true)
runner.appName = client.AppName()
if isValidAppName(runner.appName) {
runner.appName = "HCP Terraform"
}
// Aaaaand I'm done.
return client, module, diags
}
@ -425,13 +434,13 @@ func (runner *TestSuiteRunner) wait(ctx context.Context, client *tfe.Client, run
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Could not cancel the test run",
fmt.Sprintf("Terraform could not cancel the test run, you will have to navigate to the Terraform Cloud console and cancel the test run manually.\n\nThe error message received when cancelling the test run was %s", err)))
fmt.Sprintf("Terraform could not cancel the test run, you will have to navigate to the %s console and cancel the test run manually.\n\nThe error message received when cancelling the test run was %s", client.AppName(), err)))
return
}
// At this point we've requested a force cancel, and we know that
// Terraform locally is just going to quit after some amount of time so
// we'll just wait for that to happen or for TFC to finish, whichever
// we'll just wait for that to happen or for HCP Terraform to finish, whichever
// happens first.
<-ctx.Done()
}
@ -441,11 +450,11 @@ func (runner *TestSuiteRunner) wait(ctx context.Context, client *tfe.Client, run
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Could not stop the test run",
fmt.Sprintf("Terraform could not stop the test run, you will have to navigate to the Terraform Cloud console and cancel the test run manually.\n\nThe error message received when stopping the test run was %s", err)))
fmt.Sprintf("Terraform could not stop the test run, you will have to navigate to the %s console and cancel the test run manually.\n\nThe error message received when stopping the test run was %s", client.AppName(), err)))
return
}
// We've request a cancel, we're happy to just wait for TFC to cancel
// We've request a cancel, we're happy to just wait for HCP Terraform to cancel
// the run appropriately.
select {
case <-runner.CancelledCtx.Done():

File diff suppressed because one or more lines are too long

View file

@ -53,7 +53,7 @@ var (
"/api/v2/ping": func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("TFP-API-Version", "2.5")
w.Header().Set("TFP-AppName", "Terraform Cloud")
w.Header().Set("TFP-AppName", "HCP Terraform")
},
}
)

View file

@ -510,6 +510,10 @@ func (m *MockOrganizations) ReadRunQueue(ctx context.Context, name string, optio
return rq, nil
}
func (m *MockOrganizations) ReadDataRetentionPolicyChoice(ctx context.Context, organization string) (*tfe.DataRetentionPolicyChoice, error) {
panic("not implemented")
}
func (m *MockOrganizations) DeleteDataRetentionPolicy(context.Context, string) error {
panic("not implemented")
}
@ -522,6 +526,14 @@ func (m *MockOrganizations) SetDataRetentionPolicy(ctx context.Context, organiza
panic("not implemented")
}
func (m *MockOrganizations) SetDataRetentionPolicyDeleteOlder(ctx context.Context, organization string, options tfe.DataRetentionPolicyDeleteOlderSetOptions) (*tfe.DataRetentionPolicyDeleteOlder, error) {
panic("not implemented")
}
func (m *MockOrganizations) SetDataRetentionPolicyDontDelete(ctx context.Context, organization string, options tfe.DataRetentionPolicyDontDeleteSetOptions) (*tfe.DataRetentionPolicyDontDelete, error) {
panic("not implemented")
}
type MockRedactedPlans struct {
client *MockClient
redactedPlans map[string][]byte
@ -1173,6 +1185,10 @@ func (m *MockRegistryModules) DeleteVersion(ctx context.Context, moduleID tfe.Re
panic("implement me")
}
func (m *MockRegistryModules) DeleteByName(ctx context.Context, moduleID tfe.RegistryModuleID) error {
panic("implement me")
}
func (m *MockRegistryModules) Update(ctx context.Context, moduleID tfe.RegistryModuleID, options tfe.RegistryModuleUpdateOptions) (*tfe.RegistryModule, error) {
//TODO implement me
panic("implement me")
@ -1997,7 +2013,7 @@ func (m *MockWorkspaces) List(ctx context.Context, organization string, options
func (m *MockWorkspaces) Create(ctx context.Context, organization string, options tfe.WorkspaceCreateOptions) (*tfe.Workspace, error) {
// for TestCloud_setUnavailableTerraformVersion
if *options.Name == "unavailable-terraform-version" && options.TerraformVersion != nil {
return nil, fmt.Errorf("requested Terraform version not available in this TFC instance")
return nil, fmt.Errorf("requested Terraform version not available in this HCP Terraform instance")
}
if strings.HasSuffix(*options.Name, "no-operations") {
options.Operations = tfe.Bool(false)
@ -2119,7 +2135,7 @@ func (m *MockWorkspaces) UpdateByID(ctx context.Context, workspaceID string, opt
func updateMockWorkspaceAttributes(w *tfe.Workspace, options tfe.WorkspaceUpdateOptions) error {
// for TestCloud_setUnavailableTerraformVersion
if w.Name == "unavailable-terraform-version" && options.TerraformVersion != nil {
return fmt.Errorf("requested Terraform version not available in this TFC instance")
return fmt.Errorf("requested Terraform version not available in this HCP Terraform instance")
}
if options.Operations != nil {
@ -2302,6 +2318,18 @@ func (s *MockWorkspaces) DeleteDataRetentionPolicy(ctx context.Context, workspac
panic("not implemented")
}
func (s *MockWorkspaces) ReadDataRetentionPolicyChoice(ctx context.Context, workspaceID string) (*tfe.DataRetentionPolicyChoice, error) {
panic("not implemented")
}
func (s *MockWorkspaces) SetDataRetentionPolicyDeleteOlder(ctx context.Context, workspaceID string, options tfe.DataRetentionPolicyDeleteOlderSetOptions) (*tfe.DataRetentionPolicyDeleteOlder, error) {
panic("not implemented")
}
func (s *MockWorkspaces) SetDataRetentionPolicyDontDelete(ctx context.Context, workspaceID string, options tfe.DataRetentionPolicyDontDeleteSetOptions) (*tfe.DataRetentionPolicyDontDelete, error) {
panic("not implemented")
}
const alphanumeric = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
func GenerateID(s string) string {

View file

@ -51,7 +51,7 @@ const (
// BinaryManager initializes a new BinaryManager to broker data between the
// specified directory location containing cloudplugin package data and a
// Terraform Cloud backend URL.
// HCP Terraform backend URL.
func NewBinaryManager(ctx context.Context, cloudPluginDataDir, overridePath string, serviceURL *url.URL, goos, arch string) (*BinaryManager, error) {
client, err := NewCloudPluginClient(ctx, serviceURL)
if err != nil {

View file

@ -182,7 +182,7 @@ func NewCloudPluginClient(ctx context.Context, serviceURL *url.URL) (*CloudPlugi
}, nil
}
// FetchManifest retrieves the cloudplugin manifest from Terraform Cloud,
// FetchManifest retrieves the cloudplugin manifest from HCP Terraform,
// but returns a nil manifest if a 304 response is received, depending
// on the lastModified time.
func (c CloudPluginClient) FetchManifest(lastModified time.Time) (*Release, error) {

View file

@ -28,7 +28,7 @@ const (
)
// CommandRequest is used to request the execution of a specific command with
// provided flags. It is the raw args from the terraform cloud command.
// provided flags. It is the raw args from the HCP Terraform command.
type CommandRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache

View file

@ -7,7 +7,7 @@ package cloudproto1;
option go_package = "github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1";
// CommandRequest is used to request the execution of a specific command with
// provided flags. It is the raw args from the terraform cloud command.
// provided flags. It is the raw args from the HCP Terraform command.
message CommandRequest {
repeated string args = 1;
}

View file

@ -9,7 +9,7 @@ import (
)
var (
// ErrCloudPluginNotSupported is the error returned when the upstream Terraform Cloud does not
// ErrCloudPluginNotSupported is the error returned when the upstream HCP Terraform does not
// have a manifest.
ErrCloudPluginNotSupported = errors.New("cloud plugin is not supported by the remote version of Terraform Enterprise")
@ -37,7 +37,7 @@ type ErrCloudPluginNotVerified struct {
// Error returns a string representation of ErrQueryFailed
func (e ErrQueryFailed) Error() string {
return fmt.Sprintf("failed to fetch cloud plugin from Terraform Cloud: %s", e.inner)
return fmt.Sprintf("failed to fetch cloud plugin from HCP Terraform: %s", e.inner)
}
// Unwrap returns the inner error of ErrQueryFailed

View file

@ -25,10 +25,10 @@ type Init struct {
// ViewType specifies which init format to use: human or JSON.
ViewType ViewType
// Backend specifies whether to disable backend or Terraform Cloud initialization.
// Backend specifies whether to disable backend or HCP Terraform initialization.
Backend bool
// Cloud specifies whether to disable backend or Terraform Cloud initialization.
// Cloud specifies whether to disable backend or HCP Terraform initialization.
Cloud bool
// Get specifies whether to disable downloading modules for this configuration

View file

@ -11,7 +11,7 @@ import (
// Test represents the command-line arguments for the test command.
type Test struct {
// CloudRunSource specifies the remote private module that this test run
// should execute against in a remote Terraform Cloud run.
// should execute against in a remote HCP Terraform run.
CloudRunSource string
// Filter contains a list of test files to execute. If empty, all test files

View file

@ -50,7 +50,7 @@ const (
// cannot be downloaded.
ExitPluginError = 98
// The regular TFC API service that the go-tfe client relies on.
// The regular HCP Terraform API service that the go-tfe client relies on.
tfeServiceID = "tfe.v2"
// The cloud plugin release download service that the BinaryManager relies
// on to fetch the plugin.
@ -165,7 +165,7 @@ func (c *CloudCommand) discoverAndConfigure() tfdiags.Diagnostics {
if err != nil {
return diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud API service not found",
"HCP Terraform API service not found",
err.Error(),
))
}
@ -279,11 +279,11 @@ func (c *CloudCommand) Help() string {
// Synopsis returns a short summary of the cloud command.
func (c *CloudCommand) Synopsis() string {
return "Manage Terraform Cloud settings and metadata"
return "Manage HCP Terraform settings and metadata"
}
// CloudPluginConfig is everything the cloud plugin needs to know to configure a
// client and talk to TFC.
// client and talk to HCP Terraform.
type CloudPluginConfig struct {
// Maybe someday we can use struct tags to automate grabbing these out of
// the metadata headers! And verify client-side that we're sending the right

View file

@ -165,7 +165,7 @@ func TestCloud_withBackendConfig(t *testing.T) {
}
output := ui.OutputWriter.String()
expected := "Terraform Cloud Plugin v0.1.0\n\n"
expected := "HCP Terraform Plugin v0.1.0\n\n"
if output != expected {
t.Fatalf("the output did not equal the expected string:\n%s", cmp.Diff(expected, output))
}
@ -202,7 +202,7 @@ func TestCloud_withENVConfig(t *testing.T) {
}
output := ui.OutputWriter.String()
expected := "Terraform Cloud Plugin v0.1.0\n\n"
expected := "HCP Terraform Plugin v0.1.0\n\n"
if output != expected {
t.Fatalf("the output did not equal the expected string:\n%s", cmp.Diff(expected, output))
}

View file

@ -1090,8 +1090,8 @@ func testView(t *testing.T) (*views.View, func(*testing.T) *terminal.TestOutput)
// checkGoldenReference compares the given test output with a known "golden" output log
// located under the specified fixture path.
//
// If any of these tests fail, please communicate with Terraform Cloud folks before resolving,
// as changes to UI output may also affect the behavior of Terraform Cloud's structured run output.
// If any of these tests fail, please communicate with HCP Terraform folks before resolving,
// as changes to UI output may also affect the behavior of HCP Terraform's structured run output.
func checkGoldenReference(t *testing.T, output *terminal.TestOutput, fixturePathName string) {
t.Helper()
@ -1119,8 +1119,8 @@ func checkGoldenReference(t *testing.T, output *terminal.TestOutput, fixturePath
if len(gotLines) != len(wantLines) {
t.Errorf("unexpected number of log lines: got %d, want %d\n"+
"NOTE: This failure may indicate a UI change affecting the behavior of structured run output on TFC.\n"+
"Please communicate with Terraform Cloud team before resolving", len(gotLines), len(wantLines))
"NOTE: This failure may indicate a UI change affecting the behavior of structured run output on HCP Terraform.\n"+
"Please communicate with HCP Terraform team before resolving", len(gotLines), len(wantLines))
}
// Verify that the log starts with a version message
@ -1172,6 +1172,6 @@ func checkGoldenReference(t *testing.T, output *terminal.TestOutput, fixturePath
if diff := cmp.Diff(wantLineMaps, gotLineMaps); diff != "" {
t.Errorf("wrong output lines\n%s\n"+
"NOTE: This failure may indicate a UI change affecting the behavior of structured run output on TFC.\n"+
"Please communicate with Terraform Cloud team before resolving", diff)
"Please communicate with HCP Terraform team before resolving", diff)
}
}

View file

@ -9,7 +9,7 @@
#
# For this test in particular we're using the "vendor" directory that is
# the documented way to include provider plugins directly inside a
# configuration uploaded to Terraform Cloud, but this functionality applies
# configuration uploaded to HCP Terraform, but this functionality applies
# to all of the implicit local filesystem search directories.
terraform {

View file

@ -9,7 +9,7 @@
#
# For this test in particular we're using the "vendor" directory that is
# the documented way to include provider plugins directly inside a
# configuration uploaded to Terraform Cloud, but this functionality applies
# configuration uploaded to HCP Terraform, but this functionality applies
# to all of the implicit local filesystem search directories.
terraform {

View file

@ -12,7 +12,7 @@ const failedToLoadSchemasMessage = `
Warning: Failed to update data for external integrations
Terraform was unable to generate a description of the updated
state for use with external integrations in Terraform Cloud.
state for use with external integrations in HCP Terraform or Terraform Enterprise.
Any integrations configured for this workspace which depend on
information from the state may not work correctly when using the
result of this action.

View file

@ -389,7 +389,7 @@ func (c *InitCommand) getModules(ctx context.Context, path, testsDir string, ear
}
func (c *InitCommand) initCloud(ctx context.Context, root *configs.Module, extraConfig arguments.FlagNameValueSlice, viewType arguments.ViewType, view views.Init) (be backend.Backend, output bool, diags tfdiags.Diagnostics) {
ctx, span := tracer.Start(ctx, "initialize Terraform Cloud")
ctx, span := tracer.Start(ctx, "initialize HCP Terraform")
_ = ctx // prevent staticcheck from complaining to avoid a maintenence hazard of having the wrong ctx in scope here
defer span.End()
@ -399,7 +399,7 @@ func (c *InitCommand) initCloud(ctx context.Context, root *configs.Module, extra
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Invalid command-line option",
"The -backend-config=... command line option is only for state backends, and is not applicable to Terraform Cloud-based configurations.\n\nTo change the set of workspaces associated with this configuration, edit the Cloud configuration block in the root module.",
"The -backend-config=... command line option is only for state backends, and is not applicable to HCP Terraform-based configurations.\n\nTo change the set of workspaces associated with this configuration, edit the Cloud configuration block in the root module.",
))
return nil, true, diags
}
@ -432,7 +432,7 @@ func (c *InitCommand) initBackend(ctx context.Context, root *configs.Module, ext
diags = diags.Append(&hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Unsupported backend type",
Detail: fmt.Sprintf("There is no explicit backend type named %q. To configure Terraform Cloud, declare a 'cloud' block instead.", backendType),
Detail: fmt.Sprintf("There is no explicit backend type named %q. To configure HCP Terraform, declare a 'cloud' block instead.", backendType),
Subject: &root.Backend.TypeRange,
})
return nil, true, diags
@ -1098,7 +1098,7 @@ Usage: terraform [global options] init [options]
Options:
-backend=false Disable backend or Terraform Cloud initialization
-backend=false Disable backend or HCP Terraform initialization
for this configuration and use what was previously
initialized instead.
@ -1156,12 +1156,12 @@ Options:
-lockfile=MODE Set a dependency lockfile mode.
Currently only "readonly" is valid.
-ignore-remote-version A rare option used for Terraform Cloud and the remote backend
-ignore-remote-version A rare option used for HCP Terraform and the remote backend
only. Set this to ignore checking that the local and remote
Terraform versions use compatible state representations, making
an operation proceed even when there is a potential mismatch.
See the documentation on configuring Terraform with
Terraform Cloud for more information.
HCP Terraform or Terraform Enterprise for more information.
-test-directory=path Set the Terraform test directory, defaults to "tests".

View file

@ -987,7 +987,7 @@ func TestInit_backendReinitConfigToExtra(t *testing.T) {
func TestInit_backendCloudInvalidOptions(t *testing.T) {
// There are various "terraform init" options that are only for
// traditional backends and not applicable to Terraform Cloud mode.
// traditional backends and not applicable to HCP Terraform mode.
// For those, we want to return an explicit error rather than
// just silently ignoring them, so that users will be aware that
// Cloud mode has more of an expected "happy path" than the
@ -1037,7 +1037,7 @@ func TestInit_backendCloudInvalidOptions(t *testing.T) {
// certain settings of backends that tend to vary depending on
// where Terraform is running, such as AWS authentication profiles
// that are naturally local only to the machine where Terraform is
// running. Those needs don't apply to Terraform Cloud, because
// running. Those needs don't apply to HCP Terraform, because
// the remote workspace encapsulates all of the details of how
// operations and state work in that case, and so the Cloud
// configuration is only about which workspaces we'll be working
@ -1060,7 +1060,7 @@ func TestInit_backendCloudInvalidOptions(t *testing.T) {
Error: Invalid command-line option
The -backend-config=... command line option is only for state backends, and
is not applicable to Terraform Cloud-based configurations.
is not applicable to HCP Terraform-based configurations.
To change the set of workspaces associated with this configuration, edit the
Cloud configuration block in the root module.
@ -1076,7 +1076,7 @@ Cloud configuration block in the root module.
// skipping state migration when migrating between backends, but it
// has a historical flaw that it doesn't work properly when the
// initial situation is the implicit local backend with a state file
// present. The Terraform Cloud migration path has some additional
// present. The HCP Terraform migration path has some additional
// steps to take care of more details automatically, and so
// -reconfigure doesn't really make sense in that context, particularly
// with its design bug with the handling of the implicit local backend.
@ -1098,9 +1098,9 @@ Cloud configuration block in the root module.
Error: Invalid command-line option
The -reconfigure option is for in-place reconfiguration of state backends
only, and is not needed when changing Terraform Cloud settings.
only, and is not needed when changing HCP Terraform settings.
When using Terraform Cloud, initialization automatically activates any new
When using HCP Terraform, initialization automatically activates any new
Cloud configuration settings.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {
@ -1111,7 +1111,7 @@ Cloud configuration settings.
defer setupTempDir(t)()
// We have a slightly different error message for the case where we
// seem to be trying to migrate to Terraform Cloud with existing
// seem to be trying to migrate to HCP Terraform with existing
// state or explicit backend already present.
if err := os.WriteFile("terraform.tfstate", fakeStateBytes, 0644); err != nil {
@ -1135,8 +1135,8 @@ Cloud configuration settings.
wantStderr := `
Error: Invalid command-line option
The -reconfigure option is unsupported when migrating to Terraform Cloud,
because activating Terraform Cloud involves some additional steps.
The -reconfigure option is unsupported when migrating to HCP Terraform,
because activating HCP Terraform involves some additional steps.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {
t.Errorf("wrong error output\n%s", diff)
@ -1166,9 +1166,9 @@ because activating Terraform Cloud involves some additional steps.
Error: Invalid command-line option
The -migrate-state option is for migration between state backends only, and
is not applicable when using Terraform Cloud.
is not applicable when using HCP Terraform.
State storage is handled automatically by Terraform Cloud and so the state
State storage is handled automatically by HCP Terraform and so the state
storage location is not configurable.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {
@ -1179,7 +1179,7 @@ storage location is not configurable.
defer setupTempDir(t)()
// We have a slightly different error message for the case where we
// seem to be trying to migrate to Terraform Cloud with existing
// seem to be trying to migrate to HCP Terraform with existing
// state or explicit backend already present.
if err := os.WriteFile("terraform.tfstate", fakeStateBytes, 0644); err != nil {
@ -1204,9 +1204,9 @@ storage location is not configurable.
Error: Invalid command-line option
The -migrate-state option is for migration between state backends only, and
is not applicable when using Terraform Cloud.
is not applicable when using HCP Terraform.
Terraform Cloud migration has additional steps, configured by interactive
HCP Terraform migrations have additional steps, configured by interactive
prompts.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {
@ -1237,9 +1237,9 @@ prompts.
Error: Invalid command-line option
The -force-copy option is for migration between state backends only, and is
not applicable when using Terraform Cloud.
not applicable when using HCP Terraform.
State storage is handled automatically by Terraform Cloud and so the state
State storage is handled automatically by HCP Terraform and so the state
storage location is not configurable.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {
@ -1250,7 +1250,7 @@ storage location is not configurable.
defer setupTempDir(t)()
// We have a slightly different error message for the case where we
// seem to be trying to migrate to Terraform Cloud with existing
// seem to be trying to migrate to HCP Terraform with existing
// state or explicit backend already present.
if err := os.WriteFile("terraform.tfstate", fakeStateBytes, 0644); err != nil {
@ -1277,9 +1277,9 @@ storage location is not configurable.
Error: Invalid command-line option
The -force-copy option is for migration between state backends only, and is
not applicable when using Terraform Cloud.
not applicable when using HCP Terraform.
Terraform Cloud migration has additional steps, configured by interactive
HCP Terraform migrations have additional steps, configured by interactive
prompts.
`
if diff := cmp.Diff(wantStderr, gotStderr); diff != "" {

View file

@ -113,7 +113,7 @@ value was set to null in a collection.
*Quick note on the go-cty Value and Type objects:* The `Before` and `After`
fields are actually go-cty values, but we cannot convert them directly because
of the Terraform Cloud redacted endpoint. The redacted endpoint turns sensitive
of the HCP Terraform redacted endpoint. The redacted endpoint turns sensitive
values into strings regardless of their types. Because of this, we cannot just
do a direct conversion using the ctyjson package. We would have to iterate
through the schema first, find the sensitive values and their mapped types,

View file

@ -26,7 +26,7 @@ import (
// functions.
//
// The Before and After fields are actually go-cty values, but we cannot convert
// them directly because of the Terraform Cloud redacted endpoint. The redacted
// them directly because of the HCP Terraform redacted endpoint. The redacted
// endpoint turns sensitive values into strings regardless of their types.
// Because of this, we cannot just do a direct conversion using the ctyjson
// package. We would have to iterate through the schema first, find the

View file

@ -189,8 +189,8 @@ func (c *LoginCommand) Run(args []string) int {
// We prefer an OAuth code grant if the server supports it.
oauthToken, tokenDiags = c.interactiveGetTokenByCode(hostname, credsCtx, clientConfig)
case clientConfig.SupportedGrantTypes.Has(disco.OAuthOwnerPasswordGrant) && hostname == svchost.Hostname("app.terraform.io"):
// The password grant type is allowed only for Terraform Cloud SaaS.
// Note this case is purely theoretical at this point, as TFC currently uses
// The password grant type is allowed only for HCP Terraform SaaS.
// Note this case is purely theoretical at this point, as HCP Terraform currently uses
// its own bespoke login protocol (tfe)
oauthToken, tokenDiags = c.interactiveGetTokenByPassword(hostname, credsCtx, clientConfig)
default:
@ -228,7 +228,7 @@ func (c *LoginCommand) Run(args []string) int {
}
c.Ui.Output("\n---------------------------------------------------------------------------------\n")
if hostname == "app.terraform.io" { // Terraform Cloud
if hostname == "app.terraform.io" { // HCP Terraform
var motd struct {
Message string `json:"msg"`
Errors []interface{} `json:"errors"`
@ -316,12 +316,12 @@ func (c *LoginCommand) outputDefaultTFELoginSuccess(dispHostname string) {
func (c *LoginCommand) outputDefaultTFCLoginSuccess() {
c.Ui.Output(c.Colorize().Color(strings.TrimSpace(`
[green][bold]Success![reset] [bold]Logged in to Terraform Cloud[reset]
[green][bold]Success![reset] [bold]Logged in to HCP Terraform[reset]
` + "\n")))
}
func (c *LoginCommand) logMOTDError(err error) {
log.Printf("[TRACE] login: An error occurred attempting to fetch a message of the day for Terraform Cloud: %s", err)
log.Printf("[TRACE] login: An error occurred attempting to fetch a message of the day for HCP Terraform: %s", err)
}
// Help implements cli.Command.
@ -344,7 +344,7 @@ Usage: terraform [global options] login [hostname]
automatic login, and saves it in a credentials file in your home directory.
If no hostname is provided, the default hostname is app.terraform.io, to
log in to Terraform Cloud.
log in to HCP Terraform.
If not overridden by credentials helper settings in the CLI configuration,
the credentials will be written to the following local file:

View file

@ -74,7 +74,7 @@ func TestLogin(t *testing.T) {
},
})
svcs.ForceHostServices(svchost.Hostname("app.terraform.io"), map[string]interface{}{
// This represents Terraform Cloud, which does not yet support the
// This represents HCP Terraform, which does not yet support the
// login API, but does support its own bespoke tokens API.
"tfe.v2": ts.URL + "/api/v2",
"tfe.v2.1": ts.URL + "/api/v2",
@ -124,7 +124,7 @@ func TestLogin(t *testing.T) {
if got, want := creds.Token(), "good-token"; got != want {
t.Errorf("wrong token %q; want %q", got, want)
}
if got, want := ui.OutputWriter.String(), "Welcome to Terraform Cloud!"; !strings.Contains(got, want) {
if got, want := ui.OutputWriter.String(), "Welcome to HCP Terraform!"; !strings.Contains(got, want) {
t.Errorf("expected output to contain %q, but was:\n%s", want, got)
}
}))

View file

@ -239,7 +239,7 @@ func (m *Meta) selectWorkspace(b backend.Backend) error {
if name == "" {
return fmt.Errorf("Couldn't create initial workspace: no name provided")
}
log.Printf("[TRACE] Meta.selectWorkspace: selecting the new TFC workspace requested by the user (%s)", name)
log.Printf("[TRACE] Meta.selectWorkspace: selecting the new HCP Terraform workspace requested by the user (%s)", name)
return m.SetWorkspace(name)
} else {
return fmt.Errorf(strings.TrimSpace(errBackendNoExistingWorkspaces))
@ -619,10 +619,10 @@ func (m *Meta) backendFromConfig(opts *BackendOpts) (backend.Backend, tfdiags.Di
log.Printf("[TRACE] Meta.Backend: moving from default local state only to %q backend", c.Type)
if !opts.Init {
if c.Type == "cloud" {
initReason := "Initial configuration of Terraform Cloud"
initReason := "Initial configuration of HCP Terraform or Terraform Enterprise"
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud initialization required: please run \"terraform init\"",
"HCP Terraform or Terraform Enterprise initialization required: please run \"terraform init\"",
fmt.Sprintf(strings.TrimSpace(errBackendInitCloud), initReason),
))
} else {
@ -720,11 +720,11 @@ func (m *Meta) determineInitReason(previousBackendType string, currentBackendTyp
initReason := ""
switch cloudMode {
case cloud.ConfigMigrationIn:
initReason = fmt.Sprintf("Changed from backend %q to Terraform Cloud", previousBackendType)
initReason = fmt.Sprintf("Changed from backend %q to HCP Terraform", previousBackendType)
case cloud.ConfigMigrationOut:
initReason = fmt.Sprintf("Changed from Terraform Cloud to backend %q", previousBackendType)
initReason = fmt.Sprintf("Changed from HCP Terraform to backend %q", previousBackendType)
case cloud.ConfigChangeInPlace:
initReason = "Terraform Cloud configuration block has changed"
initReason = "HCP Terraform configuration block has changed"
default:
switch {
case previousBackendType != currentBackendType:
@ -739,13 +739,13 @@ func (m *Meta) determineInitReason(previousBackendType string, currentBackendTyp
case cloud.ConfigChangeInPlace:
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud initialization required: please run \"terraform init\"",
"HCP Terraform or Terraform Enterprise initialization required: please run \"terraform init\"",
fmt.Sprintf(strings.TrimSpace(errBackendInitCloud), initReason),
))
case cloud.ConfigMigrationIn:
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Terraform Cloud initialization required: please run \"terraform init\"",
"HCP Terraform or Terraform Enterprise initialization required: please run \"terraform init\"",
fmt.Sprintf(strings.TrimSpace(errBackendInitCloud), initReason),
))
default:
@ -881,7 +881,7 @@ func (m *Meta) backend_c_r_S(
backendType := s.Backend.Type
if cloudMode == cloud.ConfigMigrationOut {
m.Ui.Output("Migrating from Terraform Cloud to local state.")
m.Ui.Output("Migrating from HCP Terraform or Terraform Enterprise to local state.")
} else {
m.Ui.Output(fmt.Sprintf(strings.TrimSpace(outputBackendMigrateLocal), s.Backend.Type))
}
@ -1093,7 +1093,7 @@ func (m *Meta) backend_C_r_s(c *configs.Backend, cHash int, sMgr *clistate.Local
return nil, diags
}
// By now the backend is successfully configured. If using Terraform Cloud, the success
// By now the backend is successfully configured. If using HCP Terraform, the success
// message is handled as part of the final init message
if _, ok := b.(*cloud.Cloud); !ok {
m.Ui.Output(m.Colorize().Color(fmt.Sprintf(
@ -1127,11 +1127,11 @@ func (m *Meta) backend_C_r_S_changed(c *configs.Backend, cHash int, sMgr *clista
// Notify the user
switch cloudMode {
case cloud.ConfigChangeInPlace:
m.Ui.Output("Terraform Cloud configuration has changed.")
m.Ui.Output("HCP Terraform configuration has changed.")
case cloud.ConfigMigrationIn:
m.Ui.Output(fmt.Sprintf("Migrating from backend %q to Terraform Cloud.", s.Backend.Type))
m.Ui.Output(fmt.Sprintf("Migrating from backend %q to HCP Terraform.", s.Backend.Type))
case cloud.ConfigMigrationOut:
m.Ui.Output(fmt.Sprintf("Migrating from Terraform Cloud to backend %q.", c.Type))
m.Ui.Output(fmt.Sprintf("Migrating from HCP Terraform to backend %q.", c.Type))
default:
if s.Backend.Type != c.Type {
output := fmt.Sprintf(outputBackendMigrateChange, s.Backend.Type, c.Type)
@ -1153,9 +1153,9 @@ func (m *Meta) backend_C_r_S_changed(c *configs.Backend, cHash int, sMgr *clista
return nil, diags
}
// If this is a migration into, out of, or irrelevant to Terraform Cloud
// If this is a migration into, out of, or irrelevant to HCP Terraform
// mode then we will do state migration here. Otherwise, we just update
// the working directory initialization directly, because Terraform Cloud
// the working directory initialization directly, because HCP Terraform
// doesn't have configurable state storage anyway -- we're only changing
// which workspaces are relevant to this configuration, not where their
// state lives.
@ -1226,7 +1226,7 @@ func (m *Meta) backend_C_r_S_changed(c *configs.Backend, cHash int, sMgr *clista
}
if output {
// By now the backend is successfully configured. If using Terraform Cloud, the success
// By now the backend is successfully configured. If using HCP Terraform, the success
// message is handled as part of the final init message
if _, ok := b.(*cloud.Cloud); !ok {
m.Ui.Output(m.Colorize().Color(fmt.Sprintf(
@ -1489,19 +1489,19 @@ func (m *Meta) remoteVersionCheck(b backend.Backend, workspace string) tfdiags.D
func (m *Meta) assertSupportedCloudInitOptions(mode cloud.ConfigChangeMode) tfdiags.Diagnostics {
var diags tfdiags.Diagnostics
if mode.InvolvesCloud() {
log.Printf("[TRACE] Meta.Backend: Terraform Cloud mode initialization type: %s", mode)
log.Printf("[TRACE] Meta.Backend: HCP Terraform or Terraform Enterprise mode initialization type: %s", mode)
if m.reconfigure {
if mode.IsCloudMigration() {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Invalid command-line option",
"The -reconfigure option is unsupported when migrating to Terraform Cloud, because activating Terraform Cloud involves some additional steps.",
"The -reconfigure option is unsupported when migrating to HCP Terraform, because activating HCP Terraform involves some additional steps.",
))
} else {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Invalid command-line option",
"The -reconfigure option is for in-place reconfiguration of state backends only, and is not needed when changing Terraform Cloud settings.\n\nWhen using Terraform Cloud, initialization automatically activates any new Cloud configuration settings.",
"The -reconfigure option is for in-place reconfiguration of state backends only, and is not needed when changing HCP Terraform settings.\n\nWhen using HCP Terraform, initialization automatically activates any new Cloud configuration settings.",
))
}
}
@ -1518,13 +1518,13 @@ func (m *Meta) assertSupportedCloudInitOptions(mode cloud.ConfigChangeMode) tfdi
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Invalid command-line option",
fmt.Sprintf("The %s option is for migration between state backends only, and is not applicable when using Terraform Cloud.\n\nTerraform Cloud migration has additional steps, configured by interactive prompts.", name),
fmt.Sprintf("The %s option is for migration between state backends only, and is not applicable when using HCP Terraform.\n\nHCP Terraform migrations have additional steps, configured by interactive prompts.", name),
))
} else {
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Invalid command-line option",
fmt.Sprintf("The %s option is for migration between state backends only, and is not applicable when using Terraform Cloud.\n\nState storage is handled automatically by Terraform Cloud and so the state storage location is not configurable.", name),
fmt.Sprintf("The %s option is for migration between state backends only, and is not applicable when using HCP Terraform.\n\nState storage is handled automatically by HCP Terraform and so the state storage location is not configurable.", name),
))
}
}
@ -1618,7 +1618,7 @@ configuration or state have been made.
const errBackendInitCloud = `
Reason: %s.
Changes to the Terraform Cloud configuration block require reinitialization, to discover any changes to the available workspaces.
Changes to the HCP Terraform configuration block require reinitialization, to discover any changes to the available workspaces.
To re-initialize, run:
terraform init
@ -1652,11 +1652,11 @@ has changed. Terraform will now check for existing state in the backends.
const inputCloudInitCreateWorkspace = `
There are no workspaces with the configured tags (%s)
in your Terraform Cloud organization. To finish initializing, Terraform needs at
in your HCP Terraform organization. To finish initializing, Terraform needs at
least one workspace available.
Terraform can create a properly tagged workspace for you now. Please enter a
name to create a new Terraform Cloud workspace.
name to create a new HCP Terraform workspace.
`
const successBackendUnset = `

View file

@ -73,7 +73,7 @@ func (m *Meta) backendMigrateState(opts *backendMigrateOpts) error {
opts.force = m.forceInitCopy
// Disregard remote Terraform version for the state source backend. If it's a
// Terraform Cloud remote backend, we don't care about the remote version,
// HCP Terraform remote backend, we don't care about the remote version,
// as we are migrating away and will not break a remote workspace.
m.ignoreRemoteVersionConflict(opts.Source)
@ -82,7 +82,7 @@ func (m *Meta) backendMigrateState(opts *backendMigrateOpts) error {
m.ignoreRemoteVersionConflict(opts.Destination)
} else {
// Check the remote Terraform version for the state destination backend. If
// it's a Terraform Cloud remote backend, we want to ensure that we don't
// it's an HCP Terraform remote backend, we want to ensure that we don't
// break the workspace by uploading an incompatible state file.
for _, workspace := range destinationWorkspaces {
diags := m.remoteVersionCheck(opts.Destination, workspace)
@ -92,7 +92,7 @@ func (m *Meta) backendMigrateState(opts *backendMigrateOpts) error {
}
// If there are no specified destination workspaces, perform a remote
// backend version check with the default workspace.
// Ensure that we are not dealing with Terraform Cloud migrations, as it
// Ensure that we are not dealing with HCP Terraform migrations, as it
// does not support the default name.
if len(destinationWorkspaces) == 0 && !destinationTFC {
diags := m.remoteVersionCheck(opts.Destination, backend.DefaultStateName)
@ -450,7 +450,7 @@ func (m *Meta) backendMigrateState_s_s(opts *backendMigrateOpts) error {
// The backend is currently handled before providers are installed during init,
// so requiring schemas here could lead to a catch-22 where it requires some manual
// intervention to proceed far enough for provider installation. To avoid this,
// when migrating to TFC backend, the initial JSON varient of state won't be generated and stored.
// when migrating to HCP Terraform backend, the initial JSON varient of state won't be generated and stored.
if err := destinationState.PersistState(nil); err != nil {
return fmt.Errorf(strings.TrimSpace(errBackendStateCopy),
opts.SourceType, opts.DestinationType, err)
@ -465,7 +465,7 @@ func (m *Meta) backendMigrateEmptyConfirm(source, destination statemgr.Full, opt
if opts.DestinationType == "cloud" {
inputOpts = &terraform.InputOpts{
Id: "backend-migrate-copy-to-empty-cloud",
Query: "Do you want to copy existing state to Terraform Cloud?",
Query: "Do you want to copy existing state to HCP Terraform?",
Description: fmt.Sprintf(strings.TrimSpace(inputBackendMigrateEmptyCloud), opts.SourceType),
}
} else {
@ -515,7 +515,7 @@ func (m *Meta) backendMigrateNonEmptyConfirm(
if opts.DestinationType == "cloud" {
inputOpts = &terraform.InputOpts{
Id: "backend-migrate-to-tfc",
Query: "Do you want to copy existing state to Terraform Cloud?",
Query: "Do you want to copy existing state to HCP Terraform?",
Description: fmt.Sprintf(
strings.TrimSpace(inputBackendMigrateNonEmptyCloud),
opts.SourceType, sourcePath, destinationPath),
@ -565,23 +565,22 @@ func (m *Meta) backendMigrateTFC(opts *backendMigrateOpts) error {
return err
}
// from TFC to non-TFC backend
// from HCP Terraform to non-TFC backend
if sourceTFC && !destinationTFC {
// From Terraform Cloud to another backend. This is not yet implemented, and
// we recommend people to use the TFC API.
// From HCP Terraform to another backend. This is not yet implemented, and
// we recommend people to use the HCP Terraform API.
return fmt.Errorf(strings.TrimSpace(errTFCMigrateNotYetImplemented))
}
// Everything below, by the above two conditionals, now assumes that the
// destination is always Terraform Cloud (TFC).
// destination is always HCP Terraform.
sourceSingle := sourceSingleState || (len(sourceWorkspaces) == 1)
if sourceSingle {
if cloudBackendDestination.WorkspaceMapping.Strategy() == cloud.WorkspaceNameStrategy {
// If we know the name via WorkspaceNameStrategy, then set the
// destinationWorkspace to the new Name and skip the user prompt. Here the
// destinationWorkspace is not set to `default` thereby we will create it
// in TFC if it does not exist.
// in HCP Terraform if it does not exist.
opts.destinationWorkspace = cloudBackendDestination.WorkspaceMapping.Name
}
@ -659,7 +658,7 @@ func (m *Meta) backendMigrateTFC(opts *backendMigrateOpts) error {
return nil
}
// migrates a multi-state backend to Terraform Cloud
// migrates a multi-state backend to HCP Terraform
func (m *Meta) backendMigrateState_S_TFC(opts *backendMigrateOpts, sourceWorkspaces []string) error {
log.Print("[TRACE] backendMigrateState: migrating all named workspaces")
@ -701,17 +700,17 @@ func (m *Meta) backendMigrateState_S_TFC(opts *backendMigrateOpts, sourceWorkspa
}
}
// Fetch the pattern that will be used to rename the workspaces for Terraform Cloud.
// Fetch the pattern that will be used to rename the workspaces for HCP Terraform or Terraform Enterprise.
//
// * For the general case, this will be a pattern provided by the user.
//
// * Specifically for a migration from the "remote" backend using 'prefix', we will
// instead 'migrate' the workspaces using a pattern based on the old prefix+name,
// not allowing a user to accidentally input the wrong pattern to line up with
// what the remote backend was already using before (which presumably already
// meets the naming considerations for Terraform Cloud).
// what the the remote backend was already using before (which presumably already
// meets the naming considerations for HCP Terraform).
// In other words, this is a fast-track migration path from the remote backend, retaining
// how things already are in Terraform Cloud with no user intervention needed.
// how things already are in HCP Terraform with no user intervention needed.
pattern := ""
if remoteBackend, ok := opts.Source.(*remote.Remote); ok {
if err := m.promptRemotePrefixToCloudTagsMigration(opts); err != nil {
@ -883,7 +882,7 @@ func (m *Meta) promptNewWorkspaceName(destinationType string) (string, error) {
log.Print("[TRACE] backendMigrateState: can't prompt for input, so aborting migration")
return "", errors.New(strings.TrimSpace(errInteractiveInputDisabled))
}
message = `[reset][bold][yellow]Terraform Cloud requires all workspaces to be given an explicit name.[reset]`
message = `[reset][bold][yellow]HCP Terraform and Terraform Enterprise require all workspaces to be given an explicit name.[reset]`
}
name, err := m.UIInput().Input(context.Background(), &terraform.InputOpts{
Id: "new-state-name",
@ -982,7 +981,8 @@ the error above and try again.
`
const errTFCMigrateNotYetImplemented = `
Migrating state from Terraform Cloud to another backend is not yet implemented.
Migrating state from HCP Terraform or Terraform Enterprise to another backend is not
yet implemented.
Please use the API to do this: https://www.terraform.io/docs/cloud/api/state-versions.html
`
@ -1003,21 +1003,22 @@ For example, if a workspace is currently named 'prod', the pattern 'app-*' would
const tfcInputBackendMigrateMultiToMulti = `
Unlike typical Terraform workspaces representing an environment associated with a particular
configuration (e.g. production, staging, development), Terraform Cloud workspaces are named uniquely
across all configurations used within an organization. A typical strategy to start with is
<COMPONENT>-<ENVIRONMENT>-<REGION> (e.g. networking-prod-us-east, networking-staging-us-east).
configuration (e.g. production, staging, development), HCP Terraform and Terraform Enterprise
workspaces are named uniquely across all configurations used within an organization. A typical
strategy to start with is <COMPONENT>-<ENVIRONMENT>-<REGION> (e.g. networking-prod-us-east,
networking-staging-us-east).
For more information on workspace naming, see https://www.terraform.io/docs/cloud/workspaces/naming.html
When migrating existing workspaces from the backend %[1]q to Terraform Cloud, would you like to
rename your workspaces? Enter 1 or 2.
When migrating existing workspaces from the backend %[1]q to HCP Terraform or Terraform Enterprise,
would you like to rename your workspaces? Enter 1 or 2.
1. Yes, I'd like to rename all workspaces according to a pattern I will provide.
2. No, I would not like to rename my workspaces. Migrate them as currently named.
`
const tfcInputBackendMigrateMultiToSingle = `
The previous backend %[1]q has multiple workspaces, but Terraform Cloud has
The previous backend %[1]q has multiple workspaces, but HCP Terraform has
been configured to use a single workspace (%[2]q). By continuing, you will
only migrate your current workspace. If you wish to migrate all workspaces
from the previous backend, you may cancel this operation and use the 'tags'
@ -1027,27 +1028,28 @@ Enter "yes" to proceed or "no" to cancel.
`
const tfcInputBackendMigrateStateSingleToCloudSingle = `
As part of migrating to Terraform Cloud, Terraform can optionally copy your
current workspace state to the configured Terraform Cloud workspace.
As part of migrating to HCP Terraform or Terraform Enterprise, Terraform can
optionally copy your current workspace state to the configured HCP workspace.
Answer "yes" to copy the latest state snapshot to the configured
Terraform Cloud workspace.
HCP Terraform or Terraform Enterprise workspace.
Answer "no" to ignore the existing state and just activate the configured
Terraform Cloud workspace with its existing state, if any.
HCP Terraform or Terraform Enterprise workspace with its existing state, if any.
Should Terraform migrate your existing state?
`
const tfcInputBackendMigrateRemoteMultiToCloud = `
When migrating from the 'remote' backend to Terraform's native integration
with Terraform Cloud, Terraform will automatically create or use existing
workspaces based on the previous backend configuration's 'prefix' value.
with HCP Terraform and Terraform Enterprise, Terraform will automatically
create or use existing workspaces based on the previous backend configuration's
'prefix' value.
When the migration is complete, workspace names in Terraform will match the
fully qualified Terraform Cloud workspace name. If necessary, the workspace
tags configured in the 'cloud' option block will be added to the associated
Terraform Cloud workspaces.
fully qualified HCP Terraform or Terraform Enterprise workspace name. If necessary,
the workspace tags configured in the 'cloud' option block will be added to the
associated HCP Terraform or Terraform Enterprise workspaces.
Enter "yes" to proceed or "no" to cancel.
`
@ -1060,8 +1062,8 @@ backend? Enter "yes" to copy and "no" to start with an empty state.
`
const inputBackendMigrateEmptyCloud = `
Pre-existing state was found while migrating the previous %q backend to Terraform Cloud.
No existing state was found in Terraform Cloud. Do you want to copy this state to Terraform Cloud?
Pre-existing state was found while migrating the previous %q backend to HCP Terraform.
No existing state was found in HCP Terraform. Do you want to copy this state to HCP Terraform?
Enter "yes" to copy and "no" to start with an empty state.
`
@ -1081,15 +1083,15 @@ configured %[2]q backend.
const inputBackendMigrateNonEmptyCloud = `
Pre-existing state was found while migrating the previous %q backend to
Terraform Cloud. An existing non-empty state already exists in Terraform Cloud.
HCP Terraform. An existing non-empty state already exists in HCP Terraform.
The two states have been saved to temporary files that will be removed after
responding to this query.
Previous (type %[1]q): %[2]s
New (Terraform Cloud): %[3]s
New (HCP Terraform): %[3]s
Do you want to overwrite the state in Terraform Cloud with the previous state?
Enter "yes" to copy and "no" to start with the existing state in Terraform Cloud.
Do you want to overwrite the state in HCP Terraform with the previous state?
Enter "yes" to copy and "no" to start with the existing state in HCP Terraform.
`
const inputBackendMigrateMultiToSingle = `

View file

@ -285,7 +285,8 @@ func (c *ShowCommand) getDataFromCloudPlan(plan *cloudplan.SavedPlanBookmark, re
// Cloud plans only work if we're cloud.
cl, ok := b.(*cloud.Cloud)
if !ok {
return nil, errUnusable(fmt.Errorf("can't show a saved cloud plan unless the current root module is connected to Terraform Cloud"), "cloud plan")
errMessage := fmt.Sprintf("can't show a saved cloud plan unless the current root module is connected to %s", cl.AppName())
return nil, errUnusable(fmt.Errorf(errMessage), "cloud plan")
}
result, err := cl.ShowPlanForRun(context.Background(), plan.RunID, plan.Hostname, redacted)

View file

@ -42,12 +42,13 @@ Usage: terraform [global options] test [options]
Options:
-cloud-run=source If specified, Terraform will execute this test run
remotely using Terraform Cloud. You must specify the
source of a module registered in a private module
registry as the argument to this flag. This allows
Terraform to associate the cloud run with the correct
Terraform Cloud module and organization.
-cloud-run=source If specified, Terraform will execute this test run
remotely using HCP Terraform or Terraform Enterpise.
You must specify the source of a module registered in
a private module registry as the argument to this flag.
This allows Terraform to associate the cloud run with
the correct HCP Terraform or Terraform Enterprise module
and organization.
-filter=testfile If specified, Terraform will only execute the test files
specified by this flag. You can use this option multiple

View file

@ -1,6 +1,6 @@
# This is a simple configuration with Terraform Cloud mode minimally
# This is a simple configuration with HCP Terraform mode minimally
# activated, but it's suitable only for testing things that we can exercise
# without actually accessing Terraform Cloud, such as checking of invalid
# without actually accessing HCP Terraform, such as checking of invalid
# command-line options to "terraform init".
terraform {

View file

@ -11,14 +11,14 @@ import (
const (
goodToken = "good-token"
accountDetails = `{"data":{"id":"user-abc123","type":"users","attributes":{"username":"testuser","email":"testuser@example.com"}}}`
MOTD = `{"msg":"Welcome to Terraform Cloud!"}`
MOTD = `{"msg":"Welcome to HCP Terraform!"}`
)
// Handler is an implementation of net/http.Handler that provides a stub
// TFE API server implementation with the following endpoints:
//
// /ping - API existence endpoint
// /account/details - current user endpoint
// /ping - API existence endpoint
// /account/details - current user endpoint
var Handler http.Handler
type handler struct{}

View file

@ -49,7 +49,7 @@ func (hooks *CloudHooks) RetryLogHook(attemptNum int, resp *http.Response, color
// The newline in this error is to make it look good in the CLI!
const initialRetryError = `
There was an error connecting to Terraform Cloud. Please do not exit
There was an error connecting to HCP Terraform. Please do not exit
Terraform to prevent data loss! Trying to restore the connection...
`

View file

@ -175,8 +175,8 @@ var MessageRegistry map[InitMessageCode]InitMessage = map[InitMessageCode]InitMe
JSONValue: "Initializing modules...",
},
"initializing_terraform_cloud_message": {
HumanValue: "\n[reset][bold]Initializing Terraform Cloud...",
JSONValue: "Initializing Terraform Cloud...",
HumanValue: "\n[reset][bold]Initializing HCP Terraform...",
JSONValue: "Initializing HCP Terraform...",
},
"initializing_backend_message": {
HumanValue: "\n[reset][bold]Initializing the backend...",
@ -297,11 +297,11 @@ Terraform has been successfully initialized!
`
const outputInitSuccessCloud = `
[reset][bold][green]Terraform Cloud has been successfully initialized![reset][green]
[reset][bold][green]HCP Terraform has been successfully initialized![reset][green]
`
const outputInitSuccessCloudJSON = `
Terraform Cloud has been successfully initialized!
HCP Terraform has been successfully initialized!
`
const outputInitSuccessCLI = `[reset][green]
@ -325,7 +325,7 @@ commands will detect it and remind you to do so if necessary.
`
const outputInitSuccessCLICloud = `[reset][green]
You may now begin working with Terraform Cloud. Try running "terraform plan" to
You may now begin working with HCP Terraform. Try running "terraform plan" to
see any changes that are required for your infrastructure.
If you ever set or change modules or Terraform Settings, run "terraform init"
@ -333,7 +333,7 @@ again to reinitialize your working directory.
`
const outputInitSuccessCLICloudJSON = `
You may now begin working with Terraform Cloud. Try running "terraform plan" to
You may now begin working with HCP Terraform. Try running "terraform plan" to
see any changes that are required for your infrastructure.
If you ever set or change modules or Terraform Settings, run "terraform init"

View file

@ -22,7 +22,7 @@ type ChangeSummary struct {
}
// The summary strings for apply and plan are accidentally a public interface
// used by Terraform Cloud and Terraform Enterprise, so the exact formats of
// used by HCP Terraform and Terraform Enterprise, so the exact formats of
// these strings are important.
func (cs *ChangeSummary) String() string {
switch cs.Operation {

View file

@ -223,8 +223,8 @@ func (m *Module) appendFile(file *File) hcl.Diagnostics {
if m.CloudConfig != nil {
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Duplicate Terraform Cloud configurations",
Detail: fmt.Sprintf("A module may have only one 'cloud' block configuring Terraform Cloud. Terraform Cloud was previously configured at %s.", m.CloudConfig.DeclRange),
Summary: "Duplicate HCP Terraform configurations",
Detail: fmt.Sprintf("A module may have only one 'cloud' block configuring HCP Terraform or Terraform Enterprise. The 'cloud' block was previously configured at %s.", m.CloudConfig.DeclRange),
Subject: &c.DeclRange,
})
continue
@ -236,8 +236,8 @@ func (m *Module) appendFile(file *File) hcl.Diagnostics {
if m.Backend != nil && m.CloudConfig != nil {
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Both a backend and Terraform Cloud configuration are present",
Detail: fmt.Sprintf("A module may declare either one 'cloud' block configuring Terraform Cloud OR one 'backend' block configuring a state backend. Terraform Cloud is configured at %s; a backend is configured at %s. Remove the backend block to configure Terraform Cloud.", m.CloudConfig.DeclRange, m.Backend.DeclRange),
Summary: "Both a backend and cloud configuration are present",
Detail: fmt.Sprintf("A module may declare either one 'cloud' block OR one 'backend' block configuring a state backend. The 'cloud' block is configured at %s; a backend is configured at %s. Remove the backend block to configure HCP Terraform or Terraform Enteprise.", m.CloudConfig.DeclRange, m.Backend.DeclRange),
Subject: &m.Backend.DeclRange,
})
}
@ -498,8 +498,8 @@ func (m *Module) mergeFile(file *File) hcl.Diagnostics {
// though it can override cloud/backend blocks from _other_ files.
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Duplicate Terraform Cloud configurations",
Detail: fmt.Sprintf("A module may have only one 'cloud' block configuring Terraform Cloud. Terraform Cloud was previously configured at %s.", file.CloudConfigs[0].DeclRange),
Summary: "Duplicate HCP Terraform configurations",
Detail: fmt.Sprintf("A module may have only one 'cloud' block configuring HCP Terraform or Terraform Enterprise. The 'cloud' block was previously configured at %s.", file.CloudConfigs[0].DeclRange),
Subject: &file.CloudConfigs[1].DeclRange,
})
}

View file

@ -411,7 +411,7 @@ func TestModule_cloud_override(t *testing.T) {
func TestModule_cloud_duplicate_overrides(t *testing.T) {
_, diags := testModuleFromDir("testdata/invalid-modules/override-cloud-duplicates")
want := `Duplicate Terraform Cloud configurations`
want := `Duplicate HCP Terraform configurations`
if got := diags.Error(); !strings.Contains(got, want) {
t.Fatalf("expected module error to contain %q\nerror was:\n%s", want, got)
}

View file

@ -18,7 +18,7 @@ require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/apparentlymart/go-versions v1.0.1 // indirect
github.com/hashicorp/go-slug v0.14.0 // indirect
github.com/hashicorp/go-slug v0.15.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
@ -27,7 +27,7 @@ require (
github.com/spf13/afero v1.9.3 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)

View file

@ -167,8 +167,8 @@ github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-slug v0.14.0 h1:/aZdUDjR74TSlsQp3hA9nqhCQkQHAUr2jjtuUfWqI9E=
github.com/hashicorp/go-slug v0.14.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
github.com/hashicorp/go-slug v0.15.0 h1:AhMnE6JIyW0KoDJlmRDwv4xd52a5ZK3VdioQ7SMmZhI=
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
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/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@ -341,8 +341,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -377,8 +377,8 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View file

@ -41,7 +41,7 @@ Usage: terraform [global options] rpcapi
Starts a gRPC server for programmatic access to Terraform Core from
wrapping automation.
This interface is currently intended only for Terraform Cloud and is
This interface is currently intended only for HCP Terraform and is
subject to breaking changes even in patch releases. Do not use this.
`
return strings.TrimSpace(helpText)
@ -77,11 +77,11 @@ func (c cliCommand) Run(args []string) int {
if err == ErrNotPluginClient {
// TODO:
//
// The following message says that this interface is for Terraform
// Cloud only because we're using Terraform Cloud's integration
// The following message says that this interface is for HCP
// Terraform only because we're using HCP Terraform's integration
// with it to try to prove out the API/protocol design. By focusing
// only on Terraform Cloud as a client first, we can accommodate
// any necessary breaking changes by ensuring that Terraform Cloud's
// only on HCP Terraform as a client first, we can accommodate
// any necessary breaking changes by ensuring that HCP Terraform's
// client is updated before releasing an updated RPC API server
// implementation.
//
@ -96,7 +96,7 @@ func (c cliCommand) Run(args []string) int {
fmt.Fprintf(
os.Stderr,
`
This subcommand is for use by Terraform Cloud and is not intended for direct use.
This subcommand is for use by HCP Terraform and is not intended for direct use.
Its behavior is not subject to Terraform compatibility promises. To interact
with Terraform using the CLI workflow, refer to the main set of subcommands by
running the following command:

View file

@ -18,10 +18,10 @@ import (
// An embedded stack exists only as a child of another stack and doesn't have
// its own independent identity outside of that calling stack.
//
// Terraform Cloud offers a related concept of "linked stacks" where the
// HCP Terraform offers a related concept of "linked stacks" where the
// deployment configuration for one stack can refer to the outputs of another,
// while the other stack retains its own independent identity and lifecycle,
// but that concept only makes sense in an environment like Terraform Cloud
// but that concept only makes sense in an environment like HCP Terraform
// where the stack outputs can be published for external consumption.
type EmbeddedStack struct {
Name string

View file

@ -1400,7 +1400,7 @@ func TestContext2Plan_preventDestroy_bad(t *testing.T) {
// The plan should still include the proposal to replace the object
// that cannot be destroyed, since the change is valid in isolation,
// and this then allows Terraform CLI and Terraform Cloud to still
// and this then allows Terraform CLI and HCP Terraform to still
// show the problematic change that caused the error as additional
// context.
changes := plan.Changes

View file

@ -93,7 +93,7 @@ func implicitProviderSource(services *disco.Disco) getproviders.Source {
// The local search directories we use for implicit configuration are:
// - The "terraform.d/plugins" directory in the current working directory,
// which we've historically documented as a place to put plugins as a
// way to include them in bundles uploaded to Terraform Cloud, where
// way to include them in bundles uploaded to HCP Terraform, where
// there has historically otherwise been no way to use custom providers.
// - The "plugins" subdirectory of the CLI config search directory.
// (thats ~/.terraform.d/plugins on Unix systems, equivalents elsewhere)

View file

@ -18,7 +18,7 @@ to this need:
current Terraform configuration, serving a similar (though not identical)
purpose than `terraform-bundle` had served.
For those using Terraform CLI alone, without HCP Terraform, we recommend
For those using Terraform CLI alone, without HCP Terraform or Terraform Enterprise, we recommend
planning to transition to the above features instead of using
`terraform-bundle`.