in cmd/configure.go [306:415]
func init() {
// Add the configure command to the root command
RootCmd.AddCommand(configureCmd)
// Define and add flags for the configure command
configureCmd.Flags().
StringVarP(
&orgDomain,
"domain", "d", "", "GCP organization domain name",
)
configureCmd.Flags().
StringVarP(
&billingAccountId,
"billing-account", "b", "", "GCP billing account ID",
)
configureCmd.Flags().
StringVarP(
&location,
"location", "l", "US", "GCP multi-region location code",
)
configureCmd.Flags().
StringVar(
&fabricVer,
"fabric-version", "v32.0.0", "Cloud Foundation Fabric FAST version",
)
configureCmd.Flags().
BoolVarP(
&isInternal,
"internal", "G", false, "Internal use only",
)
configureCmd.Flags().
StringVarP(
&prefix,
"prefix", "p", "",
"Prefix for resources with unique names (max 9 characters)",
)
configureCmd.Flags().
StringVarP(
&group,
"group-owner", "g", "",
"Name of Cloud Identity group that owns the pastures",
)
configureCmd.Flags().
StringVar(
&orgAdminSa,
"org-admin-sa", "",
"Service account email of the internal environment administrator",
)
configureCmd.Flags().
BoolVar(
&rehydrate, "rehydrate", false,
"Restore previous Pastures configuration saved in GCS bucket",
)
configureCmd.Flags().
StringVar(
&seedVer, "seed-version", pastureVer,
"Version of pasture seed terraform modules to use",
)
configureCmd.Flags().
BoolVar(
&skipSeed, "skip-seed", false,
"Limits deployment to FAST foundation only",
)
// One of these flags is required
configureCmd.MarkFlagsOneRequired("domain", "rehydrate")
configureCmd.MarkFlagsMutuallyExclusive("domain", "rehydrate")
// New config flag group
configureCmd.MarkFlagsRequiredTogether(
"domain",
"billing-account",
"group-owner",
)
// Internal environment flag group
configureCmd.MarkFlagsRequiredTogether("internal", "org-admin-sa")
configureCmd.MarkFlagsMutuallyExclusive("rehydrate", "internal")
// These flags are always required
if err := configureCmd.MarkFlagRequired("prefix"); err != nil {
cobra.CheckErr(err)
}
// Hide the internal flags
if err := configureCmd.Flags().MarkHidden("internal"); err != nil {
cobra.CheckErr(err)
}
if err := configureCmd.Flags().MarkHidden("org-admin-sa"); err != nil {
cobra.CheckErr(err)
}
if err := configureCmd.Flags().MarkHidden("skip-seed"); err != nil {
cobra.CheckErr(err)
}
// if err := configureCmd.Flags().MarkHidden("fabric-version"); err != nil {
// cobra.CheckErr(err)
// }
}