Closed johnmaguire closed 8 months ago
I have not created a ~/.config/incus/config.yml and my config looks like this:
~/.config/incus/config.yml
provider "incus" { generate_client_certificates = true accept_remote_certificate = true remote { name = "demeter" scheme = "https" address = "192.168.123.15" token = "<redacted>" default = true } //config_dir = "/Users/jmaguire/.config/incus" }
Running terraform apply creates a new keypair saved to $HOME/.config/incus directory structure in the local directory. Additionally, if I move the config directory to my home directory, it's ignored. This is because config.yml does not exist:
terraform apply
$HOME/.config/incus
config.yml
https://github.com/lxc/terraform-provider-incus/blob/68e8e4670989554e85a9b83d98215a2f4c9057dc/internal/provider/provider.go#L141-L154
Note that os.ExpandEnv is only applied to the complete config.yml file name, not the configDir var assigned to the new config struct.
os.ExpandEnv
configDir
❯ terraform version Terraform v1.6.6 on darwin_arm64 + provider registry.terraform.io/lxc/incus v0.0.2
I have not created a
~/.config/incus/config.yml
and my config looks like this:Running
terraform apply
creates a new keypair saved to$HOME/.config/incus
directory structure in the local directory. Additionally, if I move the config directory to my home directory, it's ignored. This is becauseconfig.yml
does not exist:https://github.com/lxc/terraform-provider-incus/blob/68e8e4670989554e85a9b83d98215a2f4c9057dc/internal/provider/provider.go#L141-L154
Note that
os.ExpandEnv
is only applied to the completeconfig.yml
file name, not theconfigDir
var assigned to the new config struct.