tetratelabs / tetrate-service-bridge-sandbox

Deploy Tetrate Service Bridge Demo on Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE) and/or Elastic Kubernetes Service (EKS) using Terraform
Apache License 2.0
12 stars 10 forks source link

[BUG] make tsb_mp generates IAM profiles and other artifacts for all supplied cluster destinations #219

Closed kurktchiev closed 11 months ago

kurktchiev commented 1 year ago

Currently if you supply a vars file with something like this:

{
    "tsb_mp": {
        "cloud": "aws",
        "cluster_id": 0
    },
    "tsb_org": "tetrate",
    "aws_k8s_regions": [
      "us-east-1",
      "us-east-2",
      "eu-west-1",
      "eu-west-2"
    ],
    "azure_k8s_regions": [
    ],
    "gcp_k8s_regions": [
    ]
}

and then would like to step through the process of building your environment by doing: make tsb_mp followed by make tsb_cp. The workflow is broken.

Running make tsb_mp creates jump boxes for every supplied cluster not just the cluster_id specified to be used for it. This causes a problem when you run make tsb_cp as IAM roles, and other profiles, specifically in AWS world, are already generated and not re-used.

Either docs need to get updated to deprecate the workflow and instead mention that you can supply only a single cluster at first and create the MP with make tsb and then populate subsequent clusters and run make tsb again. Or fix the described workflow. Alternatively, deprecate make tsb_* and just use the documentation approach.

nacx commented 1 year ago

Related to https://github.com/tetrateio/tetrate-service-bridge-sandbox/issues/73

kurktchiev commented 1 year ago

I believe #73 is the technical fix. Depending on wether it is the one implemented or not will dictate what a documented approach to "piece meal" building of a TSB stack would look like.

smarunich commented 1 year ago

This is introduced with 1.3 terraform version, i need to triage it...