From 67f903e6043d272e198800266b3b0d6a93cbb3a2 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Thu, 29 Aug 2024 07:57:45 +1000 Subject: [PATCH] Pull default values from environment for kms encrypt --project and --key flags (#16) --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 72b86f6..1310558 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,11 @@ import ( project_map "github.com/dpc-sdp/bay-cli/cmd/project-map" ) +const ( + EnvLagoonProject = "LAGOON_PROJECT" + EnvLagoonEnvironmentType = "LAGOON_ENVIRONMENT_TYPE" +) + func main() { app := &cli.App{ Name: "bay", @@ -27,11 +32,13 @@ func main() { &cli.StringFlag{ Name: "project", Usage: "Name of lagoon project", + EnvVars: []string{EnvLagoonProject}, Required: true, }, &cli.StringFlag{ Name: "key", Usage: "Name of key", + EnvVars: []string{EnvLagoonEnvironmentType}, Required: true, }, },