diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc64c25474..93374ca970 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,6 +50,7 @@ repos: rev: v3.0.0 hooks: - id: terraform-fmt + exclude: terraform/aws/projects/template.tfvars # Prevent unencrypted files from being committed - repo: https://github.com/yuvipanda/pre-commit-hook-ensure-sops diff --git a/config/clusters/templates/aws/cluster.yaml b/config/clusters/templates/aws/cluster.yaml index c50bcec9a5..e17d6b5131 100644 --- a/config/clusters/templates/aws/cluster.yaml +++ b/config/clusters/templates/aws/cluster.yaml @@ -15,12 +15,14 @@ hubs: [] # Uncomment the lines below once the support infrastructure was deployed and # you are ready to add the first cluster - # - name: +{% for hub in hubs %} + # - name: {{ hub }} # # Tip: consider changing this to something more human friendly - # display_name: "{{ cluster_name }} - " - # domain: .{{ cluster_name }}.2i2c.cloud - # helm_chart: {{ hub_type }} + # display_name: "{{ cluster_name }} - {{ hub }}" + # domain: {{ hub }}.{{ cluster_name }}.2i2c.cloud + # helm_chart: basehub # helm_chart_values_files: # - common.values.yaml - # - .values.yaml - # - enc-.secret.values.yaml + # - {{ hub }}.values.yaml + # - enc-{{ hub }}.secret.values.yaml +{% endfor %} \ No newline at end of file diff --git a/terraform/aws/projects/template.tfvars b/terraform/aws/projects/template.tfvars index 028548f4ac..b365c249d6 100644 --- a/terraform/aws/projects/template.tfvars +++ b/terraform/aws/projects/template.tfvars @@ -9,26 +9,25 @@ cluster_nodes_location = "{{ cluster_region }}a" enable_aws_ce_grafana_backend_iam = true -# Tip: uncomment and fill the missing info in the lines below if you want +# Tip: uncomment and verify any missing info in the lines below if you want # to setup scratch buckets for the hubs on this cluster. # -#user_buckets = { -# "scratch-staging" : { -# "delete_after" : 7, -# "tags" : { "2i2c:hub-name" : "staging" }, -# }, -# # Tip: add more scratch buckets below, if this cluster will be multi-tenant -#} -# Tip: uncomment and fill the missing info in the lines below if you want +{% for hub in hubs %} +# "scratch-{{ hub }}" : { +# "delete_after" : 7, +# "tags" : { "2i2c:hub-name" : "{{ hub }}" }, +# }, +{% endfor %} + +# Tip: uncomment and verify any missing info in the lines below if you want # to setup specific cloud permissions for the buckets in this cluster. # -#hub_cloud_permissions = { -# "staging" : { +# hub_cloud_permissions = { +{% for hub in hubs %} +# "{{ hub }}" : { # "user-sa" : { -# bucket_admin_access : ["scratch-staging"], +# bucket_admin_access : ["scratch-{{ hub }}"], # }, # }, -# # Tip: add more namespaces below, if this cluster will be multi-tenant -#} - +{% endfor %}