func DeployEnvStage()

in helpers/foundation-deployer/stages/apply.go [245:267]


func DeployEnvStage(t testing.TB, s steps.Steps, tfvars GlobalTFVars, outputs BootstrapOutputs, c CommonConf) error {

	envsTfvars := EnvsTfvars{
		RemoteStateBucket: outputs.RemoteStateBucket,
	}
	err := utils.WriteTfvars(filepath.Join(c.FoundationPath, EnvironmentsStep, "terraform.tfvars"), envsTfvars)
	if err != nil {
		return err
	}

	conf := utils.CloneCSR(t, EnvironmentsRepo, filepath.Join(c.CheckoutPath, EnvironmentsRepo), outputs.CICDProject, c.Logger)
	stageConf := StageConf{
		Stage:         EnvironmentsRepo,
		CICDProject:   outputs.CICDProject,
		DefaultRegion: outputs.DefaultRegion,
		Step:          EnvironmentsStep,
		Repo:          EnvironmentsRepo,
		GitConf:       conf,
		Envs:          []string{"production", "nonproduction", "development"},
	}

	return deployStage(t, stageConf, s, c)
}