mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 00:41:27 -06:00
k8s
This commit is contained in:
parent
44da5b5e3a
commit
e6d0a90db5
@ -23,7 +23,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
lockTagKey = "tencentcloud-terraform-lock"
|
||||
lockTagKey = "tencentcloud-opentf-lock"
|
||||
)
|
||||
|
||||
// RemoteClient implements the client of remote state
|
||||
|
@ -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 == "" {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user