# proposal: how to (re)structure our infrastructure setup what we have: * different providers - currently OTC and kind * different groups of environments - currently called 'environment_namespace' * different environments in each group of environments * environments are called 'cluster_environment' and are terragrunt stacks, i.e. a huge set of resources where the kubernetes cluster itself is only one of them * the top domain name (like t09.de, buildth.ing) is bound to the environment group issues: * in provider OTC there are two attributes for the environment group - 'tenant' and 'environment_namespace' are the same * missing hierarchy for other providers than otc - we directly start with 'prod' and 'non-prod' right now ## opportunity right now we start switching to go code. we can use this port to also restructure, generalize and improve the infrastructure and platfrom-provisioning. ## proposed environment hierarchy * new: the 'environment_namespace' layer is called 'platformzone': "A neutral, abstract term that encompasses both the isolation (account, tenant, subscription) and the operational context (prod vs. non-prod)." (ChatGPT) * new: folder 'environments' * new: level 1 hierarchy 'provider' * old: level 2 hierarchy 'platformzone' * old: level 3 hierarchy 'environment' ### visualization ```bash environments ├── provider:kind │ └── platformzone:non-prod e.g.vm-1 or local │ ├── edp │ └── observability ├── provider:otc │ ├── platformzone:non-prod i.e. tenant-1 │ │ ├── central-forgejo-aka-edp │ │ ├── forgejo-dev │ │ └── observability │ └── platformzone:prod i.e. tenant-2 │ ├── edp │ └── observability └── provider:scaleway ├── platformzone:non-prod e.g. account-1 └── platformzone:prod e.g. account-2 ├── edp └── observability ```