hashicorp / hashicorp/terraform-plugin-sdk
Windows "failed to create new working directory" Without Create Symbolic Link Permissions
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
### SDK version
```
v2.6.1
```
### Relevant provider source code
Any acceptance test.
### Terraform Configuration Files
Any acceptance test configuration.
### Debug Output
Will require Windows machine to provide (I do not currently have one, but reporting on behalf of another provider developer).
### Expected Behavior
Developers on Windows machines without "create symbolic links" permissions can run acceptance testing, whereas the acceptance testing framework falls back to file copying when receiving a symlink permissions error.
### Actual Behavior
```
=== CONT TestAccDataSourceAwsGlueConnection_basic
data_source_aws_glue_connection_test.go:18: failed to create new working directory: symlink C:\Users\danu165\development\terraform-providers\terraform-provider-aws\aws\internal C:\Users\danu165\AppData\Local\Temp\plugintest52906
1170\work132527849\internal: A required privilege is not held by the client.
--- FAIL: TestAccDataSourceAwsGlueConnection_basic (3.33s)
```
### Steps to Reproduce
1. `TF_ACC=1 go test -run=TestAccXXX -v ./aws`
### References
- https://github.com/hashicorp/terraform-provider-aws/pull/18802#issuecomment-829705893
- https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links
Contributor guide
Research direction
Start with the acceptance-test path exercised by `TF_ACC=1 go test -run=TestAccXXX -v ./aws` and trace where the new working directory is created. Reproduce the symlink privilege failure on Windows, then verify that acceptance tests fall back to copying and complete successfully without Create Symbolic Link permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100