You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to create a new bootstrap resource following e.g. examples/github-via-ssh, on Windows (11) where my TF files are on a different drive (V:) to my TMP folder (C:), fails with an error
Steps to reproduce
On a Windows system with more than one drive configured:
Determine the location of the default temp directory, e.g. $env:TMP in PowerShell
Create a new folder on a different drive to the temp directory, and copy the github-via-ssh example in there, and configure the variables
Run terraform/tofu apply
Observe the error, e.g.:
flux_bootstrap_git.this: Creating...
╷
│ Error: Bootstrap run error
│
│ with flux_bootstrap_git.this,
│ on main.tf line 63, in resource "flux_bootstrap_git" "this":
│ 63: resource "flux_bootstrap_git" "this" {
│
│ component manifest generation failed: Rel: can't make C:\Users\XXXX\AppData\Local\Temp\flux-manifests-1341206813
│ relative to V:\MyProject\tofu
Expected behavior
For the flux_bootstrap_git resource to be created successfully
passing "" as the first parameter ultimately causes Go to use the os.TempDir function (https://pkg.go.dev/os#TempDir)
A workaround is to set TMP to a folder on the same drive as the project, e.g. $env:TMP = 'V:\Temp' - this causes the apply command to complete successfully.
Code of Conduct
I agree to follow this project's Code of Conduct
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to create a new bootstrap resource following e.g. examples/github-via-ssh, on Windows (11) where my TF files are on a different drive (V:) to my TMP folder (C:), fails with an error
Steps to reproduce
On a Windows system with more than one drive configured:
$env:TMP
in PowerShellObserve the error, e.g.:
Expected behavior
For the
flux_bootstrap_git
resource to be created successfullyScreenshots and recordings
No response
Terraform and provider versions
Terraform provider configurations
provider "flux" {
kubernetes = {
host = kind_cluster.this.endpoint
client_certificate = kind_cluster.this.client_certificate
client_key = kind_cluster.this.client_key
cluster_ca_certificate = kind_cluster.this.cluster_ca_certificate
}
git = {
url = "https://github.com/${var.github_org}/${var.github_repository}.git"
http = {
username = "git" # This can be any string when using a personal access token
password = var.github_token
}
}
}
provider "github" {
owner = var.github_org
token = var.github_token
}
provider "kind" {}
flux_bootstrap_git resource
resource "flux_bootstrap_git" "this" {
depends_on = [github_repository_deploy_key.this]
embedded_manifests = true
path = "clusters/my-cluster"
}
Flux version
v2.3.0
Additional context
I think the source of the problem is that in:
terraform-provider-flux/internal/provider/resource_bootstrap_git.go
Line 721 in dd1624b
passing "" as the first parameter ultimately causes Go to use the os.TempDir function (https://pkg.go.dev/os#TempDir)
A workaround is to set TMP to a folder on the same drive as the project, e.g.
$env:TMP = 'V:\Temp'
- this causes the apply command to complete successfully.Code of Conduct
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: