There are few steps that needed to be done in specific order, for the creation of new environment in our current workspace and project structure.
Necessary steps:
Prepare the new networks for the environment and add them in here, then document them here.
Add the new environment to shared_variables which can be found here
safi_environments = { dev = { domain_name = "smallog.tech" features = { confluent = true } # While we dont use prod or until we have bigger license tfc_agents = 1 } stage = { domain_name = "blueship.store" features = { confluent = false } tfc_agents = 0 } brave = { domain_name = "temp.temp" #No Domain Name Provided Yet features = { confluent = false } tfc_agents = 2 } # prod = { # domain_name = "safibank.ph" # features = { # example_feature = false # } # } #Follow this example, when creating new Env example_env = { domain_name = "example.domain" # features = { # example_feature = false # } } }
Adding things into shared_variables.tf will activate a plan in the tf-dispatcher workspace, after the plan is finished, apply it. It should generate all projects that are already running in other environments based on the current structure.
Give yourself rights to the new environment in users_devops.yaml
name: "Example User" email: example.user@example.com gcp_email: example.user@example.com terraform_cloud: teams: - env-"env-name"-applications-infra - env-"env-name"-applications-config gcp: projects_iam: - project: safi-env-"env-name"-applications roles: - roles/viewer
Run plans for all workspaces, so resources are created for all projects we have in our environment structure.
Check if everything was deployed. Proceed with deployment of services trough ArgoCD.