Panfactum / stack

The Panfactum Stack
https://panfactum.com
Other
16 stars 5 forks source link

[Bug]: kube_core_dns module pf-providers-enable adding vault #61

Closed wesbragagt closed 5 months ago

wesbragagt commented 5 months ago

Prior Search

What happened?

When I was bootstrapping the stack for the first time the documentation in the edge.2024-06-20 release recommends running pf-providers-enable in order to create a module.yaml file. The file created contains vault as a provider which is not yet provisioned when performing that step for the first time, causing an error during terragrunt apply.

TLDR: I'm unblocked as I've copied the module.yaml without vault as a provider from the reference repository.

providers:
  - kubernetes
  - random
  - aws

Steps to Reproduce

Create a new directory adjacent to your aws_eks module called kube_core_dns. Add a terragrunt.hcl to that directory that looks like this. If you used our recommendation of 172.20.0.0/16 for the service_cidr in the cluster setup docs, you should use a service_ip of 172.20.0.10 as this is the well-known DNS IP in Kubernetes. Run pf-providers-enable to enable the required providers. Run terragrunt apply.

Reference https://panfactum.com/docs/edge/guides/bootstrapping/internal-cluster-networking#deploy-the-coredns-module

Version

main (development branch)

Relevant log output

Error: Vault provider is enabled by vault_addr is not set.
ERRO[0001] Error: Error in function call

ERRO[0001]   on /Users/wesbragagt/dev/work/implentio/infrastructure-v2/environments/panfactum.hcl line 95, in locals:
ERRO[0001]   95:   vault_token = run_cmd(
ERRO[0001]   96:     "--terragrunt-global-cache", "--terragrunt-quiet",
ERRO[0001]   97:     "pf-get-vault-token",
ERRO[0001]   98:     "--address", local.vault_address,
ERRO[0001]   99:     local.enable_vault ? "" : "--noop"
ERRO[0001]  100:   )
ERRO[0001]
ERRO[0001] with
ERRO[0001] local.enable_vault as true
ERRO[0001] ,
ERRO[0001]
ERRO[0001] local.vault_address as "@@TERRAGRUNT_INVALID@@"
ERRO[0001] .

ERRO[0001] Call to function "run_cmd" failed:
[/Users/wesbragagt/dev/work/implentio/infrastructure-v2/environments/production/us-west-2/kube_core_dns] exit status 1.

ERRO[0001] /Users/wesbragagt/dev/work/implentio/infrastructure-v2/environments/panfactum.hcl:95,17-25: Error in function call; Call to function "run_cmd" failed: [/Users/wesbragagt/dev/work/implentio/infrastructure-v2/environments/production/us-west-2/kube_core_dns] exit status 1.
ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
fullykubed commented 5 months ago

I found the issue and this will be resolved in the next release.