This commit is contained in:
Elbaz 2023-08-21 18:22:37 +03:00
parent 44da5b5e3a
commit e6d0a90db5
4 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ import (
)
const (
lockTagKey = "tencentcloud-terraform-lock"
lockTagKey = "tencentcloud-opentf-lock"
)
// RemoteClient implements the client of remote state

View File

@ -16,7 +16,7 @@ import (
const REQUEST_CLIENT = "TENCENTCLOUD_API_REQUEST_CLIENT"
var ReqClient = "Terraform-latest"
var ReqClient = "OpenTF-latest"
func SetReqClient(name string) {
if name == "" {

View File

@ -242,7 +242,7 @@ func (b *Backend) configure(ctx context.Context) error {
}
// Overriding with static configuration
cfg.UserAgent = fmt.Sprintf("HashiCorp/1.0 Terraform/%s", version.String())
cfg.UserAgent = fmt.Sprintf("placeholderplaceholderplaceholder/1.0 OpenTF/%s", version.String())
if v, ok := data.GetOk("host"); ok {
cfg.Host = v.(string)
@ -397,7 +397,7 @@ func tryLoadingConfigFile(d *schema.ResourceData) (*restclient.Config, error) {
func expandStringSlice(s []interface{}) []string {
result := make([]string, len(s), len(s))
for k, v := range s {
// Handle the Terraform parser bug which turns empty strings in lists to nil.
// Handle the OpenTF parser bug which turns empty strings in lists to nil.
if v == nil {
result[k] = ""
} else {

View File

@ -196,7 +196,7 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) {
lockErr := &statemgr.LockError{
Info: currentLockInfo,
Err: errors.New("the state is already locked by another terraform client"),
Err: errors.New("the state is already locked by another opentf client"),
}
return "", lockErr
}
@ -269,7 +269,7 @@ func (c *RemoteClient) getLabels() map[string]string {
tfstateKey: "true",
tfstateSecretSuffixKey: c.nameSuffix,
tfstateWorkspaceKey: c.workspace,
managedByKey: "terraform",
managedByKey: "opentf",
}
if len(c.labels) != 0 {