Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robpomeroy/96161fd561e6a109947b636fcd522567 to your computer and use it in GitHub Desktop.
Save robpomeroy/96161fd561e6a109947b636fcd522567 to your computer and use it in GitHub Desktop.
Terraform debug output caused when running in Windows on a WSL UNC path
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\AlmaLinux9\mnt\wsl\repos\[REDACTED]\Terraform> terraform init
2024-06-14T15:46:03.588+0100 [INFO] Terraform version: 1.8.5
2024-06-14T15:46:03.588+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.51.0
2024-06-14T15:46:03.588+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0
2024-06-14T15:46:03.588+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-06-14T15:46:03.588+0100 [DEBUG] using github.com/zclconf/go-cty v1.14.3
2024-06-14T15:46:03.589+0100 [INFO] Go runtime version: go1.22.1
2024-06-14T15:46:03.589+0100 [INFO] CLI args: []string{"C:\\Commands\\terraform.exe", "init"}
2024-06-14T15:46:03.589+0100 [TRACE] Stdout is a terminal of width 236
2024-06-14T15:46:03.589+0100 [TRACE] Stderr is a terminal of width 236
2024-06-14T15:46:03.589+0100 [TRACE] Stdin is a terminal
2024-06-14T15:46:03.593+0100 [DEBUG] Attempting to open CLI config file: C:\Users\rob\AppData\Roaming\terraform.rc
2024-06-14T15:46:03.593+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-06-14T15:46:03.595+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-06-14T15:46:03.595+0100 [DEBUG] ignoring non-existing provider search directory C:\Users\rob\AppData\Roaming\terraform.d\plugins
2024-06-14T15:46:03.596+0100 [DEBUG] ignoring non-existing provider search directory C:\Users\rob\AppData\Roaming\HashiCorp\Terraform\plugins
2024-06-14T15:46:03.596+0100 [INFO] CLI command args: []string{"init"}
Initializing the backend...
2024-06-14T15:46:03.633+0100 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 191734013
2024-06-14T15:46:03.634+0100 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2024-06-14T15:46:03.634+0100 [DEBUG] New state was assigned lineage "affb80a5-9332-4259-03f7-76e67e55d6c4"
2024-06-14T15:46:03.634+0100 [TRACE] Meta.Backend: moving from default local state only to "s3" backend
2024-06-14T15:46:03.636+0100 [DEBUG] checking for provisioner in "."
2024-06-14T15:46:03.636+0100 [DEBUG] checking for provisioner in "C:\\Commands"
2024-06-14T15:46:03.637+0100 [TRACE] backend/local: state manager for workspace "default" will:
- read initial snapshot from terraform.tfstate
- write new snapshots to terraform.tfstate
- create any backup at terraform.tfstate.backup
2024-06-14T15:46:03.637+0100 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2024-06-14T15:46:03.638+0100 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2024-06-14T15:46:03.638+0100 [TRACE] statemgr.Filesystem: read nil snapshot
2024-06-14T15:46:03.638+0100 [TRACE] Meta.Backend: ignoring local "default" workspace because its state is empty
2024-06-14T15:46:03.638+0100 [TRACE] backend-s3.aws-base: Resolving AWS configuration: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.638+0100 [DEBUG] backend-s3.aws-base: Resolving credentials provider: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.639+0100 [TRACE] backend-s3.aws-base: Building default HTTP client: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.639+0100 [DEBUG] backend-s3.aws-base: Loading configuration: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.639+0100 [DEBUG] backend-s3.aws-base: Retrieving credentials: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
'\\wsl.localhost\AlmaLinux9\mnt\wsl\repos\[REDACTED]\Terraform'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
2024-06-14T15:46:03.750+0100 [INFO] backend-s3.aws-base: Retrieved credentials: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate tf_aws.credentials_source=ProcessProvider
2024-06-14T15:46:03.750+0100 [TRACE] backend-s3.aws-base: Building default HTTP client: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.750+0100 [DEBUG] backend-s3.aws-base: Loading configuration: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.751+0100 [DEBUG] backend-s3.aws-base: Retrieving caller identity from STS: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.751+0100 [DEBUG] backend-s3.aws-base: HTTP Request Sent: aws.region=eu-west-2 rpc.method=GetCallerIdentity rpc.service=STS rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate http.request.header.x_amz_date=20240614T144603Z http.request.header.content_type=application/x-www-form-urlencoded http.request.header.amz_sdk_invocation_id=30cd93f6-64f2-46f6-89e8-82c2f5dd8f2f
http.request.body=
| Action=GetCallerIdentity&Version=2011-06-15
http.method=POST net.peer.name=sts.eu-west-2.amazonaws.com http.request_content_length=43 http.request.header.amz_sdk_request="attempt=1; max=5" http.url=https://sts.eu-west-2.amazonaws.com/ http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.8.5 (+https://www.terraform.io) aws-sdk-go-v2/1.25.3 os/windows lang/go#1.22.1 md/GOOS#windows md/GOARCH#386 api/sts#1.28.4" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=[REDACTED]/20240614/eu-west-2/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" http.request.header.x_amz_security_token="*****"
2024-06-14T15:46:03.895+0100 [DEBUG] backend-s3.aws-base: HTTP Response Received: aws.region=eu-west-2 rpc.method=GetCallerIdentity rpc.service=STS rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate http.status_code=200 http.response_content_length=421 http.response.header.date="Fri, 14 Jun 2024 14:46:03 GMT" http.response.header.x_amzn_requestid=0baff172-31f2-48d4-b928-7a076d2ddc81 http.response.header.content_type=text/xml
http.response.body=
| <GetCallerIdentityResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
| <GetCallerIdentityResult>
| <Arn>arn:aws:iam::[REDACTED]:user/[REDACTED]</Arn>
| <UserId>[REDACTED]</UserId>
| <Account>[REDACTED]</Account>
| </GetCallerIdentityResult>
| <ResponseMetadata>
| <RequestId>0baff172-31f2-48d4-b928-7a076d2ddc81</RequestId>
| </ResponseMetadata>
| </GetCallerIdentityResponse>
http.duration=142
2024-06-14T15:46:03.895+0100 [INFO] backend-s3.aws-base: Retrieved caller identity from STS: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.895+0100 [DEBUG] backend-s3.aws-base: Retrieving caller identity from STS: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
2024-06-14T15:46:03.896+0100 [DEBUG] backend-s3.aws-base: HTTP Request Sent: aws.region=eu-west-2 rpc.method=GetCallerIdentity rpc.service=STS rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate http.request.header.amz_sdk_request="attempt=1; max=5" http.request.header.x_amz_date=20240614T144603Z
http.request.body=
| Action=GetCallerIdentity&Version=2011-06-15
net.peer.name=sts.eu-west-2.amazonaws.com http.request.header.x_amz_security_token="*****" http.request.header.amz_sdk_invocation_id=6fcc7c05-2854-40ac-886a-5cc1644bcf98 http.request_content_length=43 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=[REDACTED]/20240614/eu-west-2/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" http.request.header.content_type=application/x-www-form-urlencoded http.method=POST http.url=https://sts.eu-west-2.amazonaws.com/ http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.8.5 (+https://www.terraform.io) aws-sdk-go-v2/1.25.3 os/windows lang/go#1.22.1 md/GOOS#windows md/GOARCH#386 api/sts#1.28.4"
2024-06-14T15:46:03.909+0100 [DEBUG] backend-s3.aws-base: HTTP Response Received: aws.region=eu-west-2 rpc.method=GetCallerIdentity rpc.service=STS rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate http.response.header.date="Fri, 14 Jun 2024 14:46:04 GMT" http.response.header.x_amzn_requestid=5f3205cb-04bf-478d-b025-b61f2bcd9260
http.response.body=
| <GetCallerIdentityResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
| <GetCallerIdentityResult>
| <Arn>arn:aws:iam::[REDACTED]:user/[REDACTED]</Arn>
| <UserId>[REDACTED]</UserId>
| <Account>[REDACTED]</Account>
| </GetCallerIdentityResult>
| <ResponseMetadata>
| <RequestId>5f3205cb-04bf-478d-b025-b61f2bcd9260</RequestId>
| </ResponseMetadata>
| </GetCallerIdentityResponse>
http.duration=12 http.status_code=200 http.response_content_length=421 http.response.header.content_type=text/xml
2024-06-14T15:46:03.909+0100 [INFO] backend-s3.aws-base: Retrieved caller identity from STS: tf_backend.operation=Configure tf_backend.req_id=e44b7921-6b99-94f6-8812-bbc51afd0d46 tf_backend.s3.bucket=[REDACTED] tf_backend.s3.path=[REDACTED][REDACTED]/terraform.tfstate
│ Error: Error locking state: [{%!s(tfdiags.Severity=69) Error acquiring the state lock Error message: 2 errors occurred:
│ * Incorrect function.
│ * open .terraform\.terraform.tfstate.lock.info: The system cannot find the file specified.
│ Terraform acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the "-lock=false"
│ flag, but this is not recommended. }]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment