kind-fireman-33438
10/30/2023, 6:24 PM├── infrastructure
│ ├── cloud
│ │ ├── aws
│ │ ├── azure
│ │ └── gcp
│ └── local
├── dependencies
│ ├── postgres-operator
│ ├── postgres-operator-ui
│ ├── monitoring (stuff)
├── applications
│ ├── dimo-identity
├── scripts
├── keys
├── README.md
├── Makefile
└── .gitignore
salmon-account-74572
11/01/2023, 8:36 PMkind-fireman-33438
11/01/2023, 8:43 PMsalmon-account-74572
11/01/2023, 8:47 PMkind-fireman-33438
11/01/2023, 8:48 PMsalmon-account-74572
11/01/2023, 8:51 PMkind-fireman-33438
11/01/2023, 8:53 PMsalmon-account-74572
11/01/2023, 9:07 PMkind-fireman-33438
11/01/2023, 11:03 PMsalmon-account-74572
11/02/2023, 3:57 PMkind-fireman-33438
11/02/2023, 8:00 PMfunc InstallDependencies(ctx *pulumi.Context) (err error) {
stackName := ctx.Stack()
stackRef, err := pulumi.NewStackReference(ctx, stackName, nil)
if err != nil {
return err
}
// Get kubeconfig from exported to context
kubeConfig := stackRef.GetOutput(pulumi.String("kubeConfig")) <---- is this the right way to get the variable?
//var getKubeConfig *remote.Command = stackRef.GetOutput(pulumi.String("getKubeConfig"))
kubeProvider, err := kubernetes.NewProvider(ctx, "k3s", &kubernetes.ProviderArgs{
Kubeconfig: kubeConfig.ApplyT(func(s string) string { <---- This fails!
return s
}).(pulumi.StringOutput),
}) // May want to make this do better checking to ensure that the node is all the way up
if err != nil {
return err
}
salmon-account-74572
11/09/2023, 5:20 AMkind-fireman-33438
11/09/2023, 4:24 PMsalmon-account-74572
11/09/2023, 4:58 PMvpcId
, publicSubnets
, and privateSubnets
outside of the vpc.go
file. So I declare them (see lines 12-14) outside of the buildInfrastructure
function (starting on line 17) that is called in main.go
. As a result, they are globally scoped, and can be referenced anywhere in the main
package (which all files are part of). Does that help, or am I not understanding your question/issue correctly?kind-fireman-33438
11/09/2023, 5:10 PMsalmon-account-74572
11/09/2023, 5:15 PMkind-fireman-33438
11/09/2023, 5:16 PM