diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a7594ce --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.8-slim-buster +WORKDIR /app +COPY ./requirements.txt /app/requirements.txt +RUN pip install -r requirements.txt +COPY . /app +ENTRYPOINT [ "python" ] +CMD [ "app.py" ] \ No newline at end of file diff --git a/README.md b/README.md index 3a890c7..ea592a0 100644 --- a/README.md +++ b/README.md @@ -1 +1,85 @@ # simpleapp-python + +# Teste prático + +## 1. Crie um Dockerfile +- Segue na estrutura raiz do projeto o dockerfile, para o processo de contenização necessitei adicionar o requirements.txt para instalar a dependência do flask. + +## 1.1 Envie a imagem para um docker registry +- A imagem segue no seguinte registry: https://hub.docker.com/repository/docker/aldry1303/python-tempest-app + +## 2.0 A partir da imagem da aplicação criada na questão 1, crie um Helm Chart para a aplicação: +- O chart está dentro da estrutura python-app-tempest, o mesmo nome do chart que criei, eu descidir criar dentro do chart apenas as funcionalidades básicas +de um service e um deployment mantendo 3 réplicas. + +* Para utilizar visualizar o modelo é só setar o comando na raiz do projeto. + +~~~javascript +helm template python-tempest-app ./python-app-tempest/ --set versionContainer=1.0.0 +~~~ + +## 3:  Crie o cluster de Kubernetes (EKS) na AWS (automatizado, por exemplo, com Terraform ou CDK), e faça a implantação do Helm Chart da questão 2. + +- Fiz o Cluster com kubernetes pelo terraform, o diretorio iac conto com os arquivos Terraform. +* Para iniciar o cluster é necessário logar no seu provider com a CLI da AWS e ezecutar o comando +~~~javascript +terraform init +~~~ +* E Depois para verificar que recursos serão aplicados: +~~~javascript +terraform plan +~~~ +* E para aplicar: +~~~javascript +terraform apply +~~~ +- Para fazer deploy da aplicação via helm é só setar o seguinte comando: +~~~javascript +helm upgrade --install python-tempest-app ./python-app-tempest/ --set versionContainer=1.0.0 +~~~ + +- Para testar a aplicação é só setar o comando: +~~~javascript +kubectl get svc +~~~ +- E chamar a aplicação via o endereço do loandbalancer gerado. +* OBS: Esperar uns minutos antes de chamar para o loandBalancer Syncar + +## 4: Configure a monitoração dos recursos do Kubernetes (Prometheus, ELK, Datadog e etc....). + +- Subir tudo via istio service mesh, para aplicar as alterações é só entrar no diretorio *setup-monitoring* e executar o seguinte comando: +~~~javascript +sh telemetry-istio.sh +~~~ +- Em seguida estrá pronto e configurado o Kiali, o Prometheus, o Grafana e o Jeaguer. +    - O grafana já vem com dashboards nativos para a observabilidade dos componentes que estão com a label do istio-inject +- Você poderá ver os dashboards da seguinte maneira: +- Para vê o kiali +~~~javascript +istioctl dashboard kiali +~~~ +- Para vê o prometheus +~~~javascript +istioctl dashboard prometheus +~~~ +- Para vê o grafana +~~~javascript +istioctl dashboard grafana +~~~ + +*OBS, caso não esteja com istioctl setado é só executar o istioctl indo até dento do bin do pacote do istio. + +## 5: Implante a ferramenta para coleta dos logs da aplicação, devem ser visualizados em um dashboard. +- Implantei via grafana Loki e promtail, deixei um script em um diretório chamado *setup-loki-logs*, ele já faz todo +o setup e exponhe o grafana para vizualização de logs via LoandBalancer. +- Para executar: +~~~javascript +sh loki-logs.sh +~~~ +* OBS: Esperar uns minutos antes de chamar para o loandBalancer Syncar. +- O deamonset vai mapear os namespaces e coletar tudo no loki possibilitando a visualização no grafana. +## 6: Desenvola o script (Python ou Go) que liste todos os recursos criados anteriormente na conta da AWS. + +- Dentro do diretório automation-python tem o script com o seu Readme, que auxilia a execução. + +## Obrigado <3 diff --git a/automation-python/main.py b/automation-python/main.py new file mode 100644 index 0000000..143a0b6 --- /dev/null +++ b/automation-python/main.py @@ -0,0 +1,59 @@ +import questionary +import os + +def acctionManagement(): + os.system("clear") + acction = questionary.select( + "Tempest Script Managemente Resource AWS 🌴 💚 ", + choices=[ + 'List Resources', + 'Exit' + ]).ask() + + if (acction == "List Resources"): + + region = questionary.select( + "Select You Region 🌴 💚 ", + choices=[ + "us-east-1", + "us-west-1", + "us-west-2", + "af-south-1", + "ap-east-1", + "ap-southeast-3", + "ap-south-1", + "ap-northeast-3", + "ap-northeast-2", + "ap-southeast-1", + "ap-southeast-2", + "ap-northeast-1", + "ca-central-1", + "eu-central-1", + "eu-west-1", + "eu-west-2", + "eu-south-1", + "eu-west-3", + "eu-north-1", + "me-south-1", + "me-central-1", + "sa-east-1", + "us-gov-east-1", + "us-gov-west-1" + ]).ask() + resource = questionary.select( + "Select Resource 🌴 💚 ", + choices=[ + 'Bucket', + 'EC2', + 'EKS', + 'ALL' + ]).ask() + if (resource == "EKS"): + os.system(f"aws eks list-clusters --region {region}") + if (resource == "EC2"): + os.system(f"aws ec2 describe-instances --region {region}") + if (resource == "Bucket"): + os.system(f"aws s3api list-buckets --region {region}") + if (resource == "ALL"): + os.system(f" aws resourcegroupstaggingapi get-resources --region {region}") +acctionManagement() \ No newline at end of file diff --git a/automation-python/readme.md b/automation-python/readme.md new file mode 100644 index 0000000..622386f --- /dev/null +++ b/automation-python/readme.md @@ -0,0 +1,15 @@ +## Script de Automatização de recursos + +- Criei uma CLI que espera comandos em Script para listar e trazer direto da AWS os recursos. +- Para executar o script é só instalar o python3 e a biblioteca questionary com o seguinte comando. +~~~javascript +pip install questionary +~~~ +- Para executar é só executar: +~~~javascript +python3 main.py +~~~ +- O script te dará um menu alternativo que você escolhe o recurso que quer que ele retorne na região indicada também por você! + +* OBS: +- O script só trará os recursos caso você esteja logado na CLI da AWS. \ No newline at end of file diff --git a/iac/.terraform.lock.hcl b/iac/.terraform.lock.hcl new file mode 100644 index 0000000..0876186 --- /dev/null +++ b/iac/.terraform.lock.hcl @@ -0,0 +1,81 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "3.75.2" + constraints = "~> 3.27, >= 3.72.0, >= 3.73.0" + hashes = [ + "h1:x0gluX9ZKEmz+JJW3Ut5GgWDFOq/lhs2vkqJ+xt57zs=", + "zh:0e75fb14ec42d69bc46461dd54016bb2487d38da324222cec20863918b8954c4", + "zh:30831a1fe29f005d8b809250b43d09522288db45d474c9d238b26f40bdca2388", + "zh:36163d625ab2999c9cd31ef2475d978f9f033a8dfa0d585f1665f2d6492fac4b", + "zh:48ec39685541e4ddd8ddd196e2cfb72516b87f471d86ac3892bc11f83c573199", + "zh:707b9c8775efd6962b6226d914ab25f308013bba1f68953daa77adca99ff6807", + "zh:72bd9f4609a827afa366c6f119c7dec7d73a35d712dad1457c0497d87bf8d160", + "zh:930e3ae3d0cb152e17ee5a8aee5cb47f7613d6421bc7c22e7f50c19da484a100", + "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", + "zh:a19bf49b80101a0f0272b994153eeff8f8c206ecc592707bfbce7563355b6882", + "zh:a34b5d2bbaf52285b0c9a8df6258f4789f4d927ff777e126bdc77e7887abbeaa", + "zh:caad6fd5e79eae33e6d74e38c3b15c28a5482f2a1a8ca46cc1ee70089de61adb", + "zh:f2eae988635030de9a088f8058fbcd91e2014a8312a48b16bfd09a9d69d9d6f7", + ] +} + +provider "registry.terraform.io/hashicorp/cloudinit" { + version = "2.2.0" + constraints = ">= 2.0.0" + hashes = [ + "h1:tQLNREqesrdCQ/bIJnl0+yUK+XfdWzAG0wo4lp10LvM=", + "zh:76825122171f9ea2287fd27e23e80a7eb482f6491a4f41a096d77b666896ee96", + "zh:795a36dee548e30ca9c9d474af9ad6d29290e0a9816154ad38d55381cd0ab12d", + "zh:9200f02cb917fb99e44b40a68936fd60d338e4d30a718b7e2e48024a795a61b9", + "zh:a33cf255dc670c20678063aa84218e2c1b7a67d557f480d8ec0f68bc428ed472", + "zh:ba3c1b2cd0879286c1f531862c027ec04783ece81de67c9a3b97076f1ce7f58f", + "zh:bd575456394428a1a02191d2e46af0c00e41fd4f28cfe117d57b6aeb5154a0fb", + "zh:c68dd1db83d8437c36c92dc3fc11d71ced9def3483dd28c45f8640cfcd59de9a", + "zh:cbfe34a90852ed03cc074601527bb580a648127255c08589bc3ef4bf4f2e7e0c", + "zh:d6ffd7398c6d1f359b96f5b757e77b99b339fbb91df1b96ac974fe71bc87695c", + "zh:d9c15285f847d7a52df59e044184fb3ba1b7679fd0386291ed183782683d9517", + "zh:f7dd02f6d36844da23c9a27bb084503812c29c1aec4aba97237fec16860fdc8c", + ] +} + +provider "registry.terraform.io/hashicorp/kubernetes" { + version = "2.13.1" + constraints = ">= 2.10.0" + hashes = [ + "h1:cN3OwZvhtn/y3XfnGQ4hi+7oZp1gU2zVYhznRv2C7Qg=", + "zh:061f6ecbbf9a3c6345b56c28ebc2966a05d8eb02f3ba56beedd66e4ea308e332", + "zh:2119beeccb35bc5d1392b169f9fc748865261b45fb75fc8f57200e91658837c6", + "zh:26c29083d0d84fbc2e356e3dd1db3e2dc4139e943acf7a318d3c98f954ac6bd6", + "zh:2fb5823345ab05b3df74bb5c51c61072637d01b3cddffe3ad36a73b7d5b749e6", + "zh:3475b4422fffaf58584c4d877f98bfeff075e4a746f13e985d2cb20adc873a6c", + "zh:366b4bef49932d1d71b12849c1878c254a887962ff915f37982299c1185dd48a", + "zh:589f9358e4a4bd74a83b97ccc64df455ddfa64c4c4e099aef30fa29080497a8a", + "zh:7a0d75e0e4fee6cc5599ac9d5e91de563ce9ea7bd8137480c7abd09642a9e72c", + "zh:a297a42aefe0650e3d9fbe55a3ee48b14bb8bb5edb7068c09512d72afc3d9ca5", + "zh:b7f83a89b646542d02b733d464e45d6d0739a9dbb921305e7b8347e9fc98a149", + "zh:d4c721174a598b66bd1b29c40fa7cffafe90bb58186cd7506d792a6b04161103", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} + +provider "registry.terraform.io/hashicorp/tls" { + version = "4.0.3" + constraints = ">= 3.0.0" + hashes = [ + "h1:TtxH+PuCVPoWUpkMhjdz4QB1i7A4/Ag9kIouPabKDrI=", + "zh:0b34a21c535db27a71d1b76a635352ad5dc31d81cdee3d34926629c8919990a1", + "zh:160008f7a89ec99f1a79d05bd9c2f11679edbcac5ecf43f618d0a260d003d5ce", + "zh:2b951a9c75be26ff320d979c121832866db75f08bcbe326cf5290c8497e345a4", + "zh:5032695a3fb47914fa6037f21e7f06d0b684ffddde0c758477a63008476e97d0", + "zh:581f518e5104e5bdbdb9f5af35628dcb04a6fee11c6279e4ac1480d7a2bde39f", + "zh:66f36f9da00e7a39952e9e4cf158b552a98d8afabbb74804bf27b872b4fdefc6", + "zh:a159589b44d353376f86d05f1819952445f9a1c00a3bcc2745217d6f513f5147", + "zh:de077f6b852c8d637dbd9b9542ffd590db3d96f9f718acee6645ac6e22365b3c", + "zh:e0ea922619aea6b97f416fd8c129af944df9f37b81417ae7b970c6895498843e", + "zh:e7705f4f35332f598e6d4078c7e7e734e4728c5ec8642a50672e29d51d8f3be3", + "zh:eb64e7a5ebd37b8f59acc91e033897a5d454998f70e57047c94dbfb649503320", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} diff --git a/iac/eks.tf b/iac/eks.tf new file mode 100644 index 0000000..b948ec3 --- /dev/null +++ b/iac/eks.tf @@ -0,0 +1,20 @@ +module "eks" { + source = "terraform-aws-modules/eks/aws" + + cluster_name = var.cluster_name + cluster_version = "1.23" + cluster_endpoint_private_access = true + + vpc_id = module.vpc.vpc_id + subnet_ids = module.vpc.private_subnets + + eks_managed_node_groups = { + k8s = { + min_size = 1 + max_size = 10 + desired_size = 3 + vpc_security_group_ids = [aws_security_group.ssh_cluster.id] + instance_types = ["m6i.large"] + } + } +} \ No newline at end of file diff --git a/iac/providers.tf b/iac/providers.tf new file mode 100644 index 0000000..a3f4b56 --- /dev/null +++ b/iac/providers.tf @@ -0,0 +1,15 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.27" + } + } + + required_version = ">= 0.14.9" +} + +provider "aws" { + profile = "default" + region = "us-west-2" +} \ No newline at end of file diff --git a/iac/security-group.tf b/iac/security-group.tf new file mode 100644 index 0000000..9647068 --- /dev/null +++ b/iac/security-group.tf @@ -0,0 +1,22 @@ +resource "aws_security_group" "ssh_cluster" { + name = "ssh_cluster" + vpc_id = module.vpc.vpc_id +} + +resource "aws_security_group_rule" "ssh_cluster_in" { + type = "ingress" + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + security_group_id = aws_security_group.ssh_cluster.id +} + +resource "aws_security_group_rule" "ssh_cluster_out" { + type = "egress" + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + security_group_id = aws_security_group.ssh_cluster.id +} \ No newline at end of file diff --git a/iac/terraform.tfstate b/iac/terraform.tfstate new file mode 100644 index 0000000..5a9ff17 --- /dev/null +++ b/iac/terraform.tfstate @@ -0,0 +1,2428 @@ +{ + "version": 4, + "terraform_version": "1.3.1", + "serial": 933, + "lineage": "a016326b-1668-65ac-3dd5-9ac452e15847", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "aws_security_group", + "name": "ssh_cluster", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:security-group/sg-0635e7a3a9d795efd", + "description": "Managed by Terraform", + "egress": [], + "id": "sg-0635e7a3a9d795efd", + "ingress": [], + "name": "ssh_cluster", + "name_prefix": "", + "owner_id": "258020787298", + "revoke_rules_on_delete": false, + "tags": null, + "tags_all": {}, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group_rule", + "name": "ssh_cluster_in", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": null, + "from_port": 22, + "id": "sgrule-4091126995", + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "tcp", + "security_group_id": "sg-0635e7a3a9d795efd", + "self": false, + "source_security_group_id": null, + "to_port": 22, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.vpc.aws_vpc.this" + ] + } + ] + }, + { + "mode": "managed", + "type": "aws_security_group_rule", + "name": "ssh_cluster_out", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": null, + "from_port": 0, + "id": "sgrule-1143967191", + "ipv6_cidr_blocks": null, + "prefix_list_ids": null, + "protocol": "-1", + "security_group_id": "sg-0635e7a3a9d795efd", + "self": false, + "source_security_group_id": null, + "to_port": 0, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.vpc.aws_vpc.this" + ] + } + ] + }, + { + "module": "module.eks", + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "258020787298", + "arn": "arn:aws:iam::258020787298:user/tempest-teste-aws", + "id": "258020787298", + "user_id": "AIDATYEZ4YRRIQOH77RIC" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks", + "mode": "data", + "type": "aws_default_tags", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "aws", + "tags": {} + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "assume_role_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "id": "2764486067", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"EKSClusterAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"eks.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole" + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "eks.amazonaws.com" + ], + "type": "Service" + } + ], + "resources": [], + "sid": "EKSClusterAssumeRole" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks", + "mode": "data", + "type": "aws_partition", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "dns_suffix": "amazonaws.com", + "id": "aws", + "partition": "aws", + "reverse_dns_prefix": "com.amazonaws" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks", + "mode": "data", + "type": "tls_certificate", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/tls\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "certificates": [ + { + "cert_pem": "-----BEGIN CERTIFICATE-----\nMIIEdTCCA12gAwIBAgIJAKcOSkw0grd/MA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV\nBAYTAlVTMSUwIwYDVQQKExxTdGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTIw\nMAYDVQQLEylTdGFyZmllbGQgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0\neTAeFw0wOTA5MDIwMDAwMDBaFw0zNDA2MjgxNzM5MTZaMIGYMQswCQYDVQQGEwJV\nUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTElMCMGA1UE\nChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjE7MDkGA1UEAxMyU3RhcmZp\nZWxkIFNlcnZpY2VzIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0gRzIwggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVDDrEKvlO4vW+GZdfjohTsR8/\ny8+fIBNtKTrID30892t2OGPZNmCom15cAICyL1l/9of5JUOG52kbUpqQ4XHj2C0N\nTm/2yEnZtvMaVq4rtnQU68/7JuMauh2WLmo7WJSJR1b/JaCTcFOD2oR0FMNnngRo\nOt+OQFodSk7PQ5E751bWAHDLUu57fa4657wx+UX2wmDPE1kCK4DMNEffud6QZW0C\nzyyRpqbn3oUYSXxmTqM6bam17jQuug0DuDPfR+uxa40l2ZvOgdFFRjKWcIfeAg5J\nQ4W2bHO7ZOphQazJ1FTfhy/HIrImzJ9ZVGif/L4qL8RVHHVAYBeFAlU5i38FAgMB\nAAGjgfAwge0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0O\nBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMB8GA1UdIwQYMBaAFL9ft9HO3R+G9FtV\nrNzXEMIOqYjnME8GCCsGAQUFBwEBBEMwQTAcBggrBgEFBQcwAYYQaHR0cDovL28u\nc3MyLnVzLzAhBggrBgEFBQcwAoYVaHR0cDovL3guc3MyLnVzL3guY2VyMCYGA1Ud\nHwQfMB0wG6AZoBeGFWh0dHA6Ly9zLnNzMi51cy9yLmNybDARBgNVHSAECjAIMAYG\nBFUdIAAwDQYJKoZIhvcNAQELBQADggEBACMd44pXyn3pF3lM8R5V/cxTbj5HD9/G\nVfKyBDbtgB9TxF00KGu+x1X8Z+rLP3+QsjPNG1gQggL4+C/1E2DUBc7xgQjB3ad1\nl08YuW3e95ORCLp+QCztweq7dp4zBncdDQh/U90bZKuCJ/Fp1U1ervShw3WnWEQt\n8jxwmKy6abaVd38PMV4s/KCHOkdp8Hlf9BRUpJVeEXgSYCfOn8J3/yNTd126/+pZ\n59vPr5KW7ySaNRB6nJHGDn2Z9j8Z3/VyVOEVqQdZe4O/Ui5GjLIAZHYcSNPYeehu\nVsyuLAOQ1xk4meTKCRlb/weWsKh/NEnfVqn3sF/tM+2MR7cwA130A4w=\n-----END CERTIFICATE-----\n", + "is_ca": true, + "issuer": "OU=Starfield Class 2 Certification Authority,O=Starfield Technologies\\, Inc.,C=US", + "not_after": "2034-06-28T17:39:16Z", + "not_before": "2009-09-02T00:00:00Z", + "public_key_algorithm": "RSA", + "serial_number": "12037640545166866303", + "sha1_fingerprint": "9e99a48a9960b14926bb7f3b02e22da2b0ab7280", + "signature_algorithm": "SHA256-RSA", + "subject": "CN=Starfield Services Root Certificate Authority - G2,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US", + "version": 3 + }, + { + "cert_pem": "-----BEGIN CERTIFICATE-----\nMIIEkjCCA3qgAwIBAgITBn+USionzfP6wq4rAfkI7rnExjANBgkqhkiG9w0BAQsF\nADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNj\nb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4x\nOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1\ndGhvcml0eSAtIEcyMB4XDTE1MDUyNTEyMDAwMFoXDTM3MTIzMTAxMDAwMFowOTEL\nMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv\nb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj\nca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM\n9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw\nIFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6\nVOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L\n93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm\njgSubJrIqg0CAwEAAaOCATEwggEtMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/\nBAQDAgGGMB0GA1UdDgQWBBSEGMyFNOy8DJSULghZnMeyEE4KCDAfBgNVHSMEGDAW\ngBScXwDfqgHXMCs4iKK4bUqc8hGRgzB4BggrBgEFBQcBAQRsMGowLgYIKwYBBQUH\nMAGGImh0dHA6Ly9vY3NwLnJvb3RnMi5hbWF6b250cnVzdC5jb20wOAYIKwYBBQUH\nMAKGLGh0dHA6Ly9jcnQucm9vdGcyLmFtYXpvbnRydXN0LmNvbS9yb290ZzIuY2Vy\nMD0GA1UdHwQ2MDQwMqAwoC6GLGh0dHA6Ly9jcmwucm9vdGcyLmFtYXpvbnRydXN0\nLmNvbS9yb290ZzIuY3JsMBEGA1UdIAQKMAgwBgYEVR0gADANBgkqhkiG9w0BAQsF\nAAOCAQEAYjdCXLwQtT6LLOkMm2xF4gcAevnFWAu5CIw+7bMlPLVvUOTNNWqnkzSW\nMiGpSESrnO09tKpzbeR/FoCJbM8oAxiDR3mjEH4wW6w7sGDgd9QIpuEdfF7Au/ma\neyKdpwAJfqxGF4PcnCZXmTA5YpaP7dreqsXMGz7KQ2hsVxa81Q4gLv7/wmpdLqBK\nbRRYh5TmOTFffHPLkIhqhBGWJ6bt2YFGpn6jcgAKUj6DiAdjd4lpFw85hdKrCEVN\n0FE6/V1dN2RMfjCyVSRCnTawXZwXgWHxyvkQAiSr6w10kY17RSlQOYiypok1JR4U\nakcjMS9cmvqtmg5iUaQqqcT5NJ0hGA==\n-----END CERTIFICATE-----\n", + "is_ca": true, + "issuer": "CN=Starfield Services Root Certificate Authority - G2,O=Starfield Technologies\\, Inc.,L=Scottsdale,ST=Arizona,C=US", + "not_after": "2037-12-31T01:00:00Z", + "not_before": "2015-05-25T12:00:00Z", + "public_key_algorithm": "RSA", + "serial_number": "144918191876577076464031512351042010504348870", + "sha1_fingerprint": "06b25927c42a721631c1efd9431e648fa62e1e39", + "signature_algorithm": "SHA256-RSA", + "subject": "CN=Amazon Root CA 1,O=Amazon,C=US", + "version": 3 + }, + { + "cert_pem": "-----BEGIN CERTIFICATE-----\nMIIESTCCAzGgAwIBAgITBn+UV4WH6Kx33rJTMlu8mYtWDTANBgkqhkiG9w0BAQsF\nADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\nb24gUm9vdCBDQSAxMB4XDTE1MTAyMjAwMDAwMFoXDTI1MTAxOTAwMDAwMFowRjEL\nMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEVMBMGA1UECxMMU2VydmVyIENB\nIDFCMQ8wDQYDVQQDEwZBbWF6b24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQDCThZn3c68asg3Wuw6MLAd5tES6BIoSMzoKcG5blPVo+sDORrMd4f2AbnZ\ncMzPa43j4wNxhplty6aUKk4T1qe9BOwKFjwK6zmxxLVYo7bHViXsPlJ6qOMpFge5\nblDP+18x+B26A0piiQOuPkfyDyeR4xQghfj66Yo19V+emU3nazfvpFA+ROz6WoVm\nB5x+F2pV8xeKNR7u6azDdU5YVX1TawprmxRC1+WsAYmz6qP+z8ArDITC2FMVy2fw\n0IjKOtEXc/VfmtTFch5+AfGYMGMqqvJ6LcXiAhqG5TI+Dr0RtM88k+8XUBCeQ8IG\nKuANaL7TiItKZYxK1MMuTJtV9IblAgMBAAGjggE7MIIBNzASBgNVHRMBAf8ECDAG\nAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUWaRmBlKge5WSPKOUByeW\ndFv5PdAwHwYDVR0jBBgwFoAUhBjMhTTsvAyUlC4IWZzHshBOCggwewYIKwYBBQUH\nAQEEbzBtMC8GCCsGAQUFBzABhiNodHRwOi8vb2NzcC5yb290Y2ExLmFtYXpvbnRy\ndXN0LmNvbTA6BggrBgEFBQcwAoYuaHR0cDovL2NydC5yb290Y2ExLmFtYXpvbnRy\ndXN0LmNvbS9yb290Y2ExLmNlcjA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3Js\nLnJvb3RjYTEuYW1hem9udHJ1c3QuY29tL3Jvb3RjYTEuY3JsMBMGA1UdIAQMMAow\nCAYGZ4EMAQIBMA0GCSqGSIb3DQEBCwUAA4IBAQCFkr41u3nPo4FCHOTjY3NTOVI1\n59Gt/a6ZiqyJEi+752+a1U5y6iAwYfmXss2lJwJFqMp2PphKg5625kXg8kP2CN5t\n6G7bMQcT8C8xDZNtYTd7WPD8UZiRKAJPBXa30/AbwuZe0GaFEQ8ugcYQgSn+IGBI\n8/LwhBNTZTUVEWuCUUBVV18YtbAiPq3yXqMB48Oz+ctBWuZSkbvkNodPLamkB2g1\nupRyzQ7qDn1X8nn8N8V7YJ6y68AtkHcNSRAnpTitxBKjtKPISLMVCx7i4hncxHZS\nyLyKQXhw2W2Xs0qLeC1etA+jTGDK4UfLeC0SF7FSi8o5LL21L8IzApar2pR/\n-----END CERTIFICATE-----\n", + "is_ca": true, + "issuer": "CN=Amazon Root CA 1,O=Amazon,C=US", + "not_after": "2025-10-19T00:00:00Z", + "not_before": "2015-10-22T00:00:00Z", + "public_key_algorithm": "RSA", + "serial_number": "144918209630989264145272943054026349679957517", + "sha1_fingerprint": "917e732d330f9a12404f73d8bea36948b929dffc", + "signature_algorithm": "SHA256-RSA", + "subject": "CN=Amazon,OU=Server CA 1B,O=Amazon,C=US", + "version": 3 + }, + { + "cert_pem": "-----BEGIN CERTIFICATE-----\nMIIF+TCCBOGgAwIBAgIQAcn1FWkqaAFb0VgTVEI2XzANBgkqhkiG9w0BAQsFADBG\nMQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg\nQ0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMjA1MTMwMDAwMDBaFw0yMzA2MTEy\nMzU5NTlaMCsxKTAnBgNVBAMTIG9pZGMuZWtzLnVzLXdlc3QtMi5hbWF6b25hd3Mu\nY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAptiQ7Z7ygmcV0A/H\nMW6CTJn2y7HV1wkUMo/oiaZg5eHJmPUrlC9d+EBYqAS6rxGxvK7j4b6DcUPr4l7f\nzC0V0tM/WNSFgRWhgfOvvzHb4cuXu+flojhCx0pM+XWYYfnzaQ84AOTqPypa1NIw\nNGtmMH5ItuirHrXJ40MB+wgySwq1rgQF+joFdUXT0OP35Zo675FqbxPuRXYTkcud\nvdGmHBoKA8EJ3RDIvzLfFmq82/uNQGwnztg4UuYE9g+XippxEC4nKQh3JDYhiARs\nYJZ127pqQyoSjLcCpLQlLus/8a8Si4h1gZshIi5lS3YHgvhmVag/dmbLKhtNBcLd\nlIIVkwIDAQABo4IC/DCCAvgwHwYDVR0jBBgwFoAUWaRmBlKge5WSPKOUByeWdFv5\nPdAwHQYDVR0OBBYEFDfpW/n45AKDwI9FIvOs8ASbg7BGMCsGA1UdEQQkMCKCIG9p\nZGMuZWtzLnVzLXdlc3QtMi5hbWF6b25hd3MuY29tMA4GA1UdDwEB/wQEAwIFoDAd\nBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwPQYDVR0fBDYwNDAyoDCgLoYs\naHR0cDovL2NybC5zY2ExYi5hbWF6b250cnVzdC5jb20vc2NhMWItMS5jcmwwEwYD\nVR0gBAwwCjAIBgZngQwBAgEwdQYIKwYBBQUHAQEEaTBnMC0GCCsGAQUFBzABhiFo\ndHRwOi8vb2NzcC5zY2ExYi5hbWF6b250cnVzdC5jb20wNgYIKwYBBQUHMAKGKmh0\ndHA6Ly9jcnQuc2NhMWIuYW1hem9udHJ1c3QuY29tL3NjYTFiLmNydDAMBgNVHRMB\nAf8EAjAAMIIBfwYKKwYBBAHWeQIEAgSCAW8EggFrAWkAdwDoPtDaPvUGNTLnVyi8\niWvJA9PL0RFr7Otp4Xd9bQa9bgAAAYC6xCs0AAAEAwBIMEYCIQDwExSx17vj1D8x\nyd2LSEzZ8tyK+Hlf0xk/gpJCi6aB2AIhALgss1Uqz6D5jP7YxFyP6YV3JK1nZUXW\nVtHcxQBC6n3/AHcANc8ZG7+xbFe/D61MbULLu7YnICZR6j/hKu+oA8M71kwAAAGA\nusQrQgAABAMASDBGAiEAwNLvqrsnXE/IO3vjeBNQj0tKmRY4HTLDexOwBNDgSiQC\nIQCbW/C+hqZ4oT1xszjfqcMMiqxTtnn6I2FNKBR/0ulqmAB1ALNzdwfhhFD4Y4bW\nBancEQlKeS2xZwwLh9zwAw55NqWaAAABgLrEK2MAAAQDAEYwRAIgEtzxGHuFpMEP\nSSV0/DUqmV2x+pSLveS3qT8ZfCRi+CMCIG9moRZBbRHC19hJF54zwZZ10tim3AEq\nZKYYxLPo96nsMA0GCSqGSIb3DQEBCwUAA4IBAQBAcu6KpEdelMPKgyQnbOF2KiNp\nPcH3FzHu+Z3AjV95U3mKi7WjO9gBYrZTd5L4OxQ+ybNL2Ht8wgWnuiHo2rVttcBg\nVIU+NV4EzGr24ajTHsAh+yZzs7XB62bKSTRkVHs9y1lXEe5BgngTVHqIKPoBt7K+\nw2Qj0Vx42fhL3JaBkefKZo27SbPeoZDlta135EZ98IoyL0NI7y3jvLeoVSDhfDOT\nZne5epKf24RVCE3urUpOrTuC5MhKs85ZUlaoZYN3uEdiPi1lMWX+Y958hfum2Whm\nI+mk25PSvx+JdtFUSeoKbFK0mMhaLosPuXMrfjLSbKWCDcJhKgrmjJ2SDbCs\n-----END CERTIFICATE-----\n", + "is_ca": false, + "issuer": "CN=Amazon,OU=Server CA 1B,O=Amazon,C=US", + "not_after": "2023-06-11T23:59:59Z", + "not_before": "2022-05-13T00:00:00Z", + "public_key_algorithm": "RSA", + "serial_number": "2377850551041915751885568689318278751", + "sha1_fingerprint": "0528d74394a7212b9c0fe5ca016b52903200de6d", + "signature_algorithm": "SHA256-RSA", + "subject": "CN=oidc.eks.us-west-2.amazonaws.com", + "version": 3 + } + ], + "content": null, + "id": "d6244493290b45d50c11dbf07e6023343e045386", + "url": "https://oidc.eks.us-west-2.amazonaws.com/id/DCE82389A282F619EF243FEC1A01F55A", + "verify_chain": true + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_cloudwatch_log_group", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:logs:us-west-2:258020787298:log-group:/aws/eks/staging-tempest-security2/cluster", + "id": "/aws/eks/staging-tempest-security2/cluster", + "kms_key_id": "", + "name": "/aws/eks/staging-tempest-security2/cluster", + "name_prefix": null, + "retention_in_days": 90, + "tags": null, + "tags_all": {} + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_eks_cluster", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:eks:us-west-2:258020787298:cluster/staging-tempest-security2", + "certificate_authority": [ + { + "data": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1Ea3pNREUxTVRBME1sb1hEVE15TURreU56RTFNVEEwTWxvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTEYxCnRNcnhhWStDUlpVZkdPUndCZmYrMkROSUZTUWJyR2NiaCtpQmN5QjdhNFNKbi9OWHE5R09pTG5IUjhDSmZGSUUKYUVhT3h5MFpPWkptMWtNQnhMdzVvajUxOTE5MEJ2cE9EcjRIaE85ZTZDMWhoYW9MRk1nNjdVVFVhdTVPV0g2KwpHZ28vbTlDK29ZTzg1N05LM1lySU0zY1FKU3dDWVNJYWhDTUFaYk90NDBnZGYxeGNPeW5EdmN4OHpYL28yT3dxCmpoNFlUcy9HMHBZMmJ2bGt0Q2JIWWZQcUpqOFl0MWU3akE1bzlkUHd5RGhHODVCR3JHdUFOeVVFd1NZTTJONG8KM3BoOTBJNElsdWJLbXZoRU9GVG1jaGJ6Zmh1RWNlc2RIM25naWdNT2thOXorc255RHVoV2k5Y3lSR1RJcU5GWgp4SG5Rd2JtZEI2KzRTK3pMSE9jQ0F3RUFBYU5aTUZjd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZJOGxTWGFSQWhjaDZUSVVhVTJObjFiQlpFbjBNQlVHQTFVZEVRUU8KTUF5Q0NtdDFZbVZ5Ym1WMFpYTXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBQ1RYQ0xCM2J6bGNjdCs1ZWI2QgppN0Foc0NtN0REMkpOR05mT21OKzhReVBFenIyZUpTVitVc2lEVm9KbEN1dDNXZm9FdGlEVHhDNmhPWCtFOGNFClFuOWdQc3BUZjBieCttNU9zdUhFbTVJMXNrRzJmbjJqSE9BeDFWbnZockZYcDJCZzZKVkdmYlJQN2QwSEc0cGIKVUpDNFNqZzIzalQ1c0tCZjJMNktUY3hJM1U3OU4waXpuM00vMmxkZmpGV1JCWC9EWk9tR0R0amFtR1RsTTlxWgpCYTllOFZDTnRzOXlQWHJ5QzZMeVB4M2ZHTUdDU3dYMHFNY2JDVkRldW0wYUFMMHpRVzlhOG8wOU9XTkNUaGZXClQwUnhMYXBGV25ENFcyRC9iSUJZemRTaFdOQVhjQ1V0a1lzQWVyY3pwQ1B5bkozbXlmcldOU0YzTE5tbnY1cVEKcTBVPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + ], + "created_at": "2022-09-30 15:04:15.691 +0000 UTC", + "enabled_cluster_log_types": [ + "api", + "audit", + "authenticator" + ], + "encryption_config": [], + "endpoint": "https://DCE82389A282F619EF243FEC1A01F55A.gr7.us-west-2.eks.amazonaws.com", + "id": "staging-tempest-security2", + "identity": [ + { + "oidc": [ + { + "issuer": "https://oidc.eks.us-west-2.amazonaws.com/id/DCE82389A282F619EF243FEC1A01F55A" + } + ] + } + ], + "kubernetes_network_config": [ + { + "ip_family": "ipv4", + "service_ipv4_cidr": "172.20.0.0/16" + } + ], + "name": "staging-tempest-security2", + "platform_version": "eks.2", + "role_arn": "arn:aws:iam::258020787298:role/staging-tempest-security2-cluster-20220930150318956200000003", + "status": "ACTIVE", + "tags": null, + "tags_all": {}, + "timeouts": { + "create": null, + "delete": null, + "update": null + }, + "version": "1.23", + "vpc_config": [ + { + "cluster_security_group_id": "sg-052182fe80b41e35f", + "endpoint_private_access": true, + "endpoint_public_access": true, + "public_access_cidrs": [ + "0.0.0.0/0" + ], + "security_group_ids": [ + "sg-0ee5b11341213c333" + ], + "subnet_ids": [ + "subnet-0022cbafdbf5433ed", + "subnet-007855f30675054df", + "subnet-019c69c8752e428d0" + ], + "vpc_id": "vpc-0adc0f9695f59c657" + } + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozNjAwMDAwMDAwMDAwfX0=", + "dependencies": [ + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_iam_role.this", + "module.eks.aws_iam_role_policy_attachment.this", + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.eks.aws_security_group_rule.cluster", + "module.eks.aws_security_group_rule.node", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current", + "module.eks.module.kms.aws_kms_external_key.this", + "module.eks.module.kms.aws_kms_key.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_iam_openid_connect_provider", + "name": "oidc_provider", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::258020787298:oidc-provider/oidc.eks.us-west-2.amazonaws.com/id/DCE82389A282F619EF243FEC1A01F55A", + "client_id_list": [ + "sts.amazonaws.com" + ], + "id": "arn:aws:iam::258020787298:oidc-provider/oidc.eks.us-west-2.amazonaws.com/id/DCE82389A282F619EF243FEC1A01F55A", + "tags": { + "Name": "staging-tempest-security2-eks-irsa" + }, + "tags_all": { + "Name": "staging-tempest-security2-eks-irsa" + }, + "thumbprint_list": [ + "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" + ], + "url": "oidc.eks.us-west-2.amazonaws.com/id/DCE82389A282F619EF243FEC1A01F55A" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_eks_cluster.this", + "module.eks.aws_iam_role.this", + "module.eks.aws_iam_role_policy_attachment.this", + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.eks.aws_security_group_rule.cluster", + "module.eks.aws_security_group_rule.node", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current", + "module.eks.data.tls_certificate.this", + "module.eks.module.kms.aws_kms_external_key.this", + "module.eks.module.kms.aws_kms_key.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_iam_role", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::258020787298:role/staging-tempest-security2-cluster-20220930150318956200000003", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"EKSClusterAssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"eks.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2022-09-30T15:03:45Z", + "description": "", + "force_detach_policies": true, + "id": "staging-tempest-security2-cluster-20220930150318956200000003", + "inline_policy": [ + { + "name": "staging-tempest-security2-cluster", + "policy": "{\"Statement\":[{\"Action\":[\"logs:CreateLogGroup\"],\"Effect\":\"Deny\",\"Resource\":\"arn:aws:logs:us-west-2:258020787298:log-group:/aws/eks/staging-tempest-security2/cluster\"}],\"Version\":\"2012-10-17\"}" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "staging-tempest-security2-cluster-20220930150318956200000003", + "name_prefix": "staging-tempest-security2-cluster-", + "path": "/", + "permissions_boundary": null, + "tags": null, + "tags_all": {}, + "unique_id": "AROATYEZ4YRRHLKTDOGXF" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.data.aws_iam_policy_document.assume_role_policy" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_iam_role_policy_attachment", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "schema_version": 0, + "attributes": { + "id": "staging-tempest-security2-cluster-20220930150318956200000003-20220930150323186200000006", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", + "role": "staging-tempest-security2-cluster-20220930150318956200000003" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_iam_role.this", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current" + ], + "create_before_destroy": true + }, + { + "index_key": "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController", + "schema_version": 0, + "attributes": { + "id": "staging-tempest-security2-cluster-20220930150318956200000003-20220930150323438400000007", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController", + "role": "staging-tempest-security2-cluster-20220930150318956200000003" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_iam_role.this", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_security_group", + "name": "cluster", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:security-group/sg-0ee5b11341213c333", + "description": "EKS cluster security group", + "egress": [], + "id": "sg-0ee5b11341213c333", + "ingress": [], + "name": "staging-tempest-security2-cluster-20220930150316041900000001", + "name_prefix": "staging-tempest-security2-cluster-", + "owner_id": "258020787298", + "revoke_rules_on_delete": false, + "tags": { + "Name": "staging-tempest-security2-cluster" + }, + "tags_all": { + "Name": "staging-tempest-security2-cluster" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_security_group", + "name": "node", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:security-group/sg-07bebaa1e66f06d16", + "description": "EKS node shared security group", + "egress": [], + "id": "sg-07bebaa1e66f06d16", + "ingress": [], + "name": "staging-tempest-security2-node-20220930150316544000000002", + "name_prefix": "staging-tempest-security2-node-", + "owner_id": "258020787298", + "revoke_rules_on_delete": false, + "tags": { + "Name": "staging-tempest-security2-node", + "kubernetes.io/cluster/staging-tempest-security2": "owned" + }, + "tags_all": { + "Name": "staging-tempest-security2-node", + "kubernetes.io/cluster/staging-tempest-security2": "owned" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_security_group_rule", + "name": "cluster", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": "egress_nodes_443", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Cluster API to node groups", + "from_port": 443, + "id": "sgrule-3425498570", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-0ee5b11341213c333", + "self": false, + "source_security_group_id": "sg-07bebaa1e66f06d16", + "to_port": 443, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_nodes_kubelet", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Cluster API to node kubelets", + "from_port": 10250, + "id": "sgrule-3497655040", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-0ee5b11341213c333", + "self": false, + "source_security_group_id": "sg-07bebaa1e66f06d16", + "to_port": 10250, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "ingress_nodes_443", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node groups to cluster API", + "from_port": 443, + "id": "sgrule-910764804", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-0ee5b11341213c333", + "self": false, + "source_security_group_id": "sg-07bebaa1e66f06d16", + "to_port": 443, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks", + "mode": "managed", + "type": "aws_security_group_rule", + "name": "node", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": "egress_cluster_443", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node groups to cluster API", + "from_port": 443, + "id": "sgrule-1082698793", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": "sg-0ee5b11341213c333", + "to_port": 443, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_https", + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "Egress all HTTPS to internet", + "from_port": 443, + "id": "sgrule-1278602659", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": null, + "to_port": 443, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_ntp_tcp", + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "Egress NTP/TCP to internet", + "from_port": 123, + "id": "sgrule-2481705149", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": null, + "to_port": 123, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_ntp_udp", + "schema_version": 2, + "attributes": { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "Egress NTP/UDP to internet", + "from_port": 123, + "id": "sgrule-3983930800", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "udp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": null, + "to_port": 123, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_self_coredns_tcp", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node to node CoreDNS", + "from_port": 53, + "id": "sgrule-45626915", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": true, + "source_security_group_id": null, + "to_port": 53, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "egress_self_coredns_udp", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node to node CoreDNS", + "from_port": 53, + "id": "sgrule-2363470917", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "udp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": true, + "source_security_group_id": null, + "to_port": 53, + "type": "egress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "ingress_cluster_443", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Cluster API to node groups", + "from_port": 443, + "id": "sgrule-3694652677", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": "sg-0ee5b11341213c333", + "to_port": 443, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "ingress_cluster_kubelet", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Cluster API to node kubelets", + "from_port": 10250, + "id": "sgrule-2324071742", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": false, + "source_security_group_id": "sg-0ee5b11341213c333", + "to_port": 10250, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "ingress_self_coredns_tcp", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node to node CoreDNS", + "from_port": 53, + "id": "sgrule-4015121691", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "tcp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": true, + "source_security_group_id": null, + "to_port": 53, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "ingress_self_coredns_udp", + "schema_version": 2, + "attributes": { + "cidr_blocks": null, + "description": "Node to node CoreDNS", + "from_port": 53, + "id": "sgrule-1259226868", + "ipv6_cidr_blocks": null, + "prefix_list_ids": [], + "protocol": "udp", + "security_group_id": "sg-07bebaa1e66f06d16", + "self": true, + "source_security_group_id": null, + "to_port": 53, + "type": "ingress" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "258020787298", + "arn": "arn:aws:iam::258020787298:user/tempest-teste-aws", + "id": "258020787298", + "user_id": "AIDATYEZ4YRRIQOH77RIC" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "assume_role_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "id": "2560088296", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"EKSNodeAssumeRole\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n }\n }\n ]\n}", + "override_json": null, + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": [ + { + "actions": [ + "sts:AssumeRole" + ], + "condition": [], + "effect": "Allow", + "not_actions": [], + "not_principals": [], + "not_resources": [], + "principals": [ + { + "identifiers": [ + "ec2.amazonaws.com" + ], + "type": "Service" + } + ], + "resources": [], + "sid": "EKSNodeAssumeRole" + } + ], + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "data", + "type": "aws_partition", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "dns_suffix": "amazonaws.com", + "id": "aws", + "partition": "aws", + "reverse_dns_prefix": "com.amazonaws" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "managed", + "type": "aws_eks_node_group", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "ami_type": "AL2_x86_64", + "arn": "arn:aws:eks:us-west-2:258020787298:nodegroup/staging-tempest-security2/k8s-2022093015163030900000000d/00c1c77c-6c48-1357-d369-679a8e9f33e2", + "capacity_type": "ON_DEMAND", + "cluster_name": "staging-tempest-security2", + "disk_size": 0, + "force_update_version": null, + "id": "staging-tempest-security2:k8s-2022093015163030900000000d", + "instance_types": [ + "m6i.large" + ], + "labels": null, + "launch_template": [ + { + "id": "lt-0582075a60926ce2f", + "name": "k8s-2022093015162770970000000b", + "version": "1" + } + ], + "node_group_name": "k8s-2022093015163030900000000d", + "node_group_name_prefix": "k8s-", + "node_role_arn": "arn:aws:iam::258020787298:role/k8s-eks-node-group-20220930150322450100000005", + "release_version": "1.23.9-20220914", + "remote_access": [], + "resources": [ + { + "autoscaling_groups": [ + { + "name": "eks-k8s-2022093015163030900000000d-00c1c77c-6c48-1357-d369-679a8e9f33e2" + } + ], + "remote_access_security_group_id": "" + } + ], + "scaling_config": [ + { + "desired_size": 3, + "max_size": 10, + "min_size": 1 + } + ], + "status": "ACTIVE", + "subnet_ids": [ + "subnet-0022cbafdbf5433ed", + "subnet-007855f30675054df", + "subnet-019c69c8752e428d0" + ], + "tags": { + "Name": "k8s" + }, + "tags_all": { + "Name": "k8s" + }, + "taint": [], + "timeouts": { + "create": null, + "delete": null, + "update": null + }, + "update_config": [ + { + "max_unavailable": 1, + "max_unavailable_percentage": 0 + } + ], + "version": "1.23" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozNjAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInVwZGF0ZSI6MzYwMDAwMDAwMDAwMH19", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_eks_cluster.this", + "module.eks.aws_iam_role.this", + "module.eks.aws_iam_role_policy_attachment.this", + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.eks.aws_security_group_rule.cluster", + "module.eks.aws_security_group_rule.node", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current", + "module.eks.module.eks_managed_node_group.aws_iam_role.this", + "module.eks.module.eks_managed_node_group.aws_iam_role_policy_attachment.this", + "module.eks.module.eks_managed_node_group.aws_launch_template.this", + "module.eks.module.eks_managed_node_group.aws_security_group.this", + "module.eks.module.eks_managed_node_group.aws_security_group_rule.this", + "module.eks.module.eks_managed_node_group.data.aws_caller_identity.current", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.eks.module.eks_managed_node_group.data.aws_partition.current", + "module.eks.module.eks_managed_node_group.module.user_data.data.cloudinit_config.linux_eks_managed_node_group", + "module.eks.module.kms.aws_kms_external_key.this", + "module.eks.module.kms.aws_kms_key.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "managed", + "type": "aws_iam_role", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::258020787298:role/k8s-eks-node-group-20220930150322450100000005", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"EKSNodeAssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2022-09-30T15:03:48Z", + "description": "EKS managed node group IAM role", + "force_detach_policies": true, + "id": "k8s-eks-node-group-20220930150322450100000005", + "inline_policy": [ + { + "name": "", + "policy": "" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "k8s-eks-node-group-20220930150322450100000005", + "name_prefix": "k8s-eks-node-group-", + "path": "/", + "permissions_boundary": null, + "tags": null, + "tags_all": {}, + "unique_id": "AROATYEZ4YRRGEWKUBWZ2" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "managed", + "type": "aws_iam_role_policy_attachment", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", + "schema_version": 0, + "attributes": { + "id": "k8s-eks-node-group-20220930150322450100000005-20220930150338795000000009", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", + "role": "k8s-eks-node-group-20220930150322450100000005" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.module.eks_managed_node_group.aws_iam_role.this", + "module.eks.module.eks_managed_node_group.data.aws_caller_identity.current", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.eks.module.eks_managed_node_group.data.aws_partition.current", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy", + "schema_version": 0, + "attributes": { + "id": "k8s-eks-node-group-20220930150322450100000005-2022093015033984860000000a", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy", + "role": "k8s-eks-node-group-20220930150322450100000005" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.module.eks_managed_node_group.aws_iam_role.this", + "module.eks.module.eks_managed_node_group.data.aws_caller_identity.current", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.eks.module.eks_managed_node_group.data.aws_partition.current", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + }, + { + "index_key": "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy", + "schema_version": 0, + "attributes": { + "id": "k8s-eks-node-group-20220930150322450100000005-20220930150338783000000008", + "policy_arn": "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy", + "role": "k8s-eks-node-group-20220930150322450100000005" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.module.eks_managed_node_group.aws_iam_role.this", + "module.eks.module.eks_managed_node_group.data.aws_caller_identity.current", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.eks.module.eks_managed_node_group.data.aws_partition.current", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "managed", + "type": "aws_launch_template", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:launch-template/lt-0582075a60926ce2f", + "block_device_mappings": [], + "capacity_reservation_specification": [], + "cpu_options": [], + "credit_specification": [], + "default_version": 1, + "description": "Custom launch template for k8s EKS managed node group", + "disable_api_termination": false, + "ebs_optimized": "", + "elastic_gpu_specifications": [], + "elastic_inference_accelerator": [], + "enclave_options": [], + "hibernation_options": [], + "iam_instance_profile": [], + "id": "lt-0582075a60926ce2f", + "image_id": "", + "instance_initiated_shutdown_behavior": "", + "instance_market_options": [], + "instance_type": "", + "kernel_id": "", + "key_name": "", + "latest_version": 1, + "license_specification": [], + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_protocol_ipv6": "disabled", + "http_put_response_hop_limit": 2, + "http_tokens": "required", + "instance_metadata_tags": "disabled" + } + ], + "monitoring": [ + { + "enabled": true + } + ], + "name": "k8s-2022093015162770970000000b", + "name_prefix": "k8s-", + "network_interfaces": [], + "placement": [], + "ram_disk_id": "", + "security_group_names": null, + "tag_specifications": [ + { + "resource_type": "instance", + "tags": { + "Name": "k8s" + } + }, + { + "resource_type": "network-interface", + "tags": { + "Name": "k8s" + } + }, + { + "resource_type": "volume", + "tags": { + "Name": "k8s" + } + } + ], + "tags": null, + "tags_all": {}, + "update_default_version": true, + "user_data": "", + "vpc_security_group_ids": [ + "sg-0635e7a3a9d795efd", + "sg-07bebaa1e66f06d16", + "sg-0832503fd059e2a5d" + ] + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.eks.aws_cloudwatch_log_group.this", + "module.eks.aws_eks_cluster.this", + "module.eks.aws_iam_role.this", + "module.eks.aws_iam_role_policy_attachment.this", + "module.eks.aws_security_group.cluster", + "module.eks.aws_security_group.node", + "module.eks.aws_security_group_rule.cluster", + "module.eks.aws_security_group_rule.node", + "module.eks.data.aws_iam_policy_document.assume_role_policy", + "module.eks.data.aws_partition.current", + "module.eks.module.eks_managed_node_group.aws_iam_role.this", + "module.eks.module.eks_managed_node_group.aws_iam_role_policy_attachment.this", + "module.eks.module.eks_managed_node_group.aws_security_group.this", + "module.eks.module.eks_managed_node_group.aws_security_group_rule.this", + "module.eks.module.eks_managed_node_group.data.aws_caller_identity.current", + "module.eks.module.eks_managed_node_group.data.aws_iam_policy_document.assume_role_policy", + "module.eks.module.eks_managed_node_group.data.aws_partition.current", + "module.eks.module.eks_managed_node_group.module.user_data.data.cloudinit_config.linux_eks_managed_node_group", + "module.eks.module.kms.aws_kms_external_key.this", + "module.eks.module.kms.aws_kms_key.this", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.eks_managed_node_group[\"k8s\"]", + "mode": "managed", + "type": "aws_security_group", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:security-group/sg-0832503fd059e2a5d", + "description": "EKS managed node group security group", + "egress": [], + "id": "sg-0832503fd059e2a5d", + "ingress": [], + "name": "k8s-eks-node-group-20220930150321736900000004", + "name_prefix": "k8s-eks-node-group-", + "owner_id": "258020787298", + "revoke_rules_on_delete": false, + "tags": { + "Name": "k8s-eks-node-group" + }, + "tags_all": { + "Name": "k8s-eks-node-group" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", + "dependencies": [ + "aws_security_group.ssh_cluster", + "module.vpc.aws_vpc.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.eks.module.kms", + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "258020787298", + "arn": "arn:aws:iam::258020787298:user/tempest-teste-aws", + "id": "258020787298", + "user_id": "AIDATYEZ4YRRIQOH77RIC" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.eks.module.kms", + "mode": "data", + "type": "aws_partition", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "dns_suffix": "amazonaws.com", + "id": "aws", + "partition": "aws", + "reverse_dns_prefix": "com.amazonaws" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_eip", + "name": "nat", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "address": null, + "allocation_id": "eipalloc-082c6a71f2b58db2e", + "associate_with_private_ip": null, + "association_id": "", + "carrier_ip": "", + "customer_owned_ip": "", + "customer_owned_ipv4_pool": "", + "domain": "vpc", + "id": "eipalloc-082c6a71f2b58db2e", + "instance": "", + "network_border_group": "us-west-2", + "network_interface": "", + "private_dns": null, + "private_ip": "", + "public_dns": "ec2-44-230-109-163.us-west-2.compute.amazonaws.com", + "public_ip": "44.230.109.163", + "public_ipv4_pool": "amazon", + "tags": { + "Name": "VPC-ECS-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2a" + }, + "timeouts": null, + "vpc": true + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "address": null, + "allocation_id": "eipalloc-068697af9ee52fad5", + "associate_with_private_ip": null, + "association_id": "", + "carrier_ip": "", + "customer_owned_ip": "", + "customer_owned_ipv4_pool": "", + "domain": "vpc", + "id": "eipalloc-068697af9ee52fad5", + "instance": "", + "network_border_group": "us-west-2", + "network_interface": "", + "private_dns": null, + "private_ip": "", + "public_dns": "ec2-34-223-134-127.us-west-2.compute.amazonaws.com", + "public_ip": "34.223.134.127", + "public_ipv4_pool": "amazon", + "tags": { + "Name": "VPC-ECS-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2b" + }, + "timeouts": null, + "vpc": true + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "address": null, + "allocation_id": "eipalloc-020a38b00ae50a2b0", + "associate_with_private_ip": null, + "association_id": "", + "carrier_ip": "", + "customer_owned_ip": "", + "customer_owned_ipv4_pool": "", + "domain": "vpc", + "id": "eipalloc-020a38b00ae50a2b0", + "instance": "", + "network_border_group": "us-west-2", + "network_interface": "", + "private_dns": null, + "private_ip": "", + "public_dns": "ec2-52-13-154-42.us-west-2.compute.amazonaws.com", + "public_ip": "52.13.154.42", + "public_ipv4_pool": "amazon", + "tags": { + "Name": "VPC-ECS-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2c" + }, + "timeouts": null, + "vpc": true + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_internet_gateway", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:internet-gateway/igw-02324fb5cd4c10d7c", + "id": "igw-02324fb5cd4c10d7c", + "owner_id": "258020787298", + "tags": { + "Name": "VPC-ECS" + }, + "tags_all": { + "Name": "VPC-ECS" + }, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_nat_gateway", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "allocation_id": "eipalloc-082c6a71f2b58db2e", + "connectivity_type": "public", + "id": "nat-00b6705f6f9525765", + "network_interface_id": "eni-01f5b641d05e384a0", + "private_ip": "10.0.101.44", + "public_ip": "44.230.109.163", + "subnet_id": "subnet-0c98005f3b76ce94d", + "tags": { + "Name": "VPC-ECS-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2a" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "allocation_id": "eipalloc-068697af9ee52fad5", + "connectivity_type": "public", + "id": "nat-0ec1ad12768854e99", + "network_interface_id": "eni-02d9cfcfff943c90a", + "private_ip": "10.0.102.85", + "public_ip": "34.223.134.127", + "subnet_id": "subnet-04049b1437acecccf", + "tags": { + "Name": "VPC-ECS-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2b" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "allocation_id": "eipalloc-020a38b00ae50a2b0", + "connectivity_type": "public", + "id": "nat-094ecd4586dcd351c", + "network_interface_id": "eni-00657dfa124f6c951", + "private_ip": "10.0.103.151", + "public_ip": "52.13.154.42", + "subnet_id": "subnet-04348216afec6c2f1", + "tags": { + "Name": "VPC-ECS-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-us-west-2c" + } + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route", + "name": "private_nat_gateway", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "carrier_gateway_id": "", + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": "", + "destination_prefix_list_id": "", + "egress_only_gateway_id": "", + "gateway_id": "", + "id": "r-rtb-0ee3180ac52b016f71080289494", + "instance_id": "", + "instance_owner_id": "", + "local_gateway_id": "", + "nat_gateway_id": "nat-00b6705f6f9525765", + "network_interface_id": "", + "origin": "CreateRoute", + "route_table_id": "rtb-0ee3180ac52b016f7", + "state": "active", + "timeouts": { + "create": "5m", + "delete": null, + "update": null + }, + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_nat_gateway.this", + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "carrier_gateway_id": "", + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": "", + "destination_prefix_list_id": "", + "egress_only_gateway_id": "", + "gateway_id": "", + "id": "r-rtb-08fabe2884a85361e1080289494", + "instance_id": "", + "instance_owner_id": "", + "local_gateway_id": "", + "nat_gateway_id": "nat-0ec1ad12768854e99", + "network_interface_id": "", + "origin": "CreateRoute", + "route_table_id": "rtb-08fabe2884a85361e", + "state": "active", + "timeouts": { + "create": "5m", + "delete": null, + "update": null + }, + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_nat_gateway.this", + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "carrier_gateway_id": "", + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": "", + "destination_prefix_list_id": "", + "egress_only_gateway_id": "", + "gateway_id": "", + "id": "r-rtb-099afd8c2774a42ea1080289494", + "instance_id": "", + "instance_owner_id": "", + "local_gateway_id": "", + "nat_gateway_id": "nat-094ecd4586dcd351c", + "network_interface_id": "", + "origin": "CreateRoute", + "route_table_id": "rtb-099afd8c2774a42ea", + "state": "active", + "timeouts": { + "create": "5m", + "delete": null, + "update": null + }, + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_eip.nat", + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_nat_gateway.this", + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route", + "name": "public_internet_gateway", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "carrier_gateway_id": "", + "destination_cidr_block": "0.0.0.0/0", + "destination_ipv6_cidr_block": "", + "destination_prefix_list_id": "", + "egress_only_gateway_id": "", + "gateway_id": "igw-02324fb5cd4c10d7c", + "id": "r-rtb-08c7cf43b18743f7c1080289494", + "instance_id": "", + "instance_owner_id": "", + "local_gateway_id": "", + "nat_gateway_id": "", + "network_interface_id": "", + "origin": "CreateRoute", + "route_table_id": "rtb-08c7cf43b18743f7c", + "state": "active", + "timeouts": { + "create": "5m", + "delete": null, + "update": null + }, + "transit_gateway_id": "", + "vpc_endpoint_id": "", + "vpc_peering_connection_id": "" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_internet_gateway.this", + "module.vpc.aws_route_table.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route_table", + "name": "private", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:route-table/rtb-0ee3180ac52b016f7", + "id": "rtb-0ee3180ac52b016f7", + "owner_id": "258020787298", + "propagating_vgws": [], + "route": [], + "tags": { + "Name": "VPC-ECS-private-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2a" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:route-table/rtb-08fabe2884a85361e", + "id": "rtb-08fabe2884a85361e", + "owner_id": "258020787298", + "propagating_vgws": [], + "route": [], + "tags": { + "Name": "VPC-ECS-private-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2b" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:route-table/rtb-099afd8c2774a42ea", + "id": "rtb-099afd8c2774a42ea", + "owner_id": "258020787298", + "propagating_vgws": [], + "route": [], + "tags": { + "Name": "VPC-ECS-private-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2c" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route_table", + "name": "public", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:route-table/rtb-08c7cf43b18743f7c", + "id": "rtb-08c7cf43b18743f7c", + "owner_id": "258020787298", + "propagating_vgws": [], + "route": [], + "tags": { + "Name": "VPC-ECS-public" + }, + "tags_all": { + "Name": "VPC-ECS-public" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route_table_association", + "name": "private", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-0f6cff6cbe1b8e468", + "route_table_id": "rtb-0ee3180ac52b016f7", + "subnet_id": "subnet-019c69c8752e428d0" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-044eb0a1920934697", + "route_table_id": "rtb-08fabe2884a85361e", + "subnet_id": "subnet-0022cbafdbf5433ed" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-0a764eddb11c6cca1", + "route_table_id": "rtb-099afd8c2774a42ea", + "subnet_id": "subnet-007855f30675054df" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.private", + "module.vpc.aws_subnet.private", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_route_table_association", + "name": "public", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-06b335cd739a97891", + "route_table_id": "rtb-08c7cf43b18743f7c", + "subnet_id": "subnet-0c98005f3b76ce94d" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.public", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-0c58e428332447ead", + "route_table_id": "rtb-08c7cf43b18743f7c", + "subnet_id": "subnet-04049b1437acecccf" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.public", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 0, + "attributes": { + "gateway_id": "", + "id": "rtbassoc-0125ab8a338da0246", + "route_table_id": "rtb-08c7cf43b18743f7c", + "subnet_id": "subnet-04348216afec6c2f1" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_route_table.public", + "module.vpc.aws_subnet.public", + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_subnet", + "name": "private", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-019c69c8752e428d0", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "availability_zone_id": "usw2-az2", + "cidr_block": "10.0.1.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-019c69c8752e428d0", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-private-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2a" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-0022cbafdbf5433ed", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "availability_zone_id": "usw2-az1", + "cidr_block": "10.0.2.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-0022cbafdbf5433ed", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-private-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2b" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-007855f30675054df", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2c", + "availability_zone_id": "usw2-az3", + "cidr_block": "10.0.3.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-007855f30675054df", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": false, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-private-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-private-us-west-2c" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ], + "create_before_destroy": true + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_subnet", + "name": "public", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-0c98005f3b76ce94d", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "availability_zone_id": "usw2-az2", + "cidr_block": "10.0.101.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-0c98005f3b76ce94d", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2a" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-04049b1437acecccf", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "availability_zone_id": "usw2-az1", + "cidr_block": "10.0.102.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-04049b1437acecccf", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2b" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-04348216afec6c2f1", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2c", + "availability_zone_id": "usw2-az3", + "cidr_block": "10.0.103.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-04348216afec6c2f1", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2c" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_vpc", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:vpc/vpc-0adc0f9695f59c657", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.0.0.0/16", + "default_network_acl_id": "acl-080933c4e0af67f45", + "default_route_table_id": "rtb-06347ddadcc8d1061", + "default_security_group_id": "sg-067e41a21a2088a24", + "dhcp_options_id": "dopt-0e6f29345403d5e77", + "enable_classiclink": false, + "enable_classiclink_dns_support": false, + "enable_dns_hostnames": false, + "enable_dns_support": true, + "id": "vpc-0adc0f9695f59c657", + "instance_tenancy": "default", + "ipv4_ipam_pool_id": null, + "ipv4_netmask_length": null, + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "ipv6_cidr_block_network_border_group": "", + "ipv6_ipam_pool_id": "", + "ipv6_netmask_length": 0, + "main_route_table_id": "rtb-06347ddadcc8d1061", + "owner_id": "258020787298", + "tags": { + "Name": "VPC-ECS" + }, + "tags_all": { + "Name": "VPC-ECS" + } + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "create_before_destroy": true + } + ] + } + ], + "check_results": [] +} diff --git a/iac/terraform.tfstate.backup b/iac/terraform.tfstate.backup new file mode 100644 index 0000000..9c64691 --- /dev/null +++ b/iac/terraform.tfstate.backup @@ -0,0 +1,210 @@ +{ + "version": 4, + "terraform_version": "1.3.1", + "serial": 872, + "lineage": "a016326b-1668-65ac-3dd5-9ac452e15847", + "outputs": {}, + "resources": [ + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_internet_gateway", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:internet-gateway/igw-02324fb5cd4c10d7c", + "id": "igw-02324fb5cd4c10d7c", + "owner_id": "258020787298", + "tags": { + "Name": "VPC-ECS" + }, + "tags_all": { + "Name": "VPC-ECS" + }, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_subnet", + "name": "public", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-0c98005f3b76ce94d", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2a", + "availability_zone_id": "usw2-az2", + "cidr_block": "10.0.101.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-0c98005f3b76ce94d", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2a" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2a" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-04049b1437acecccf", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2b", + "availability_zone_id": "usw2-az1", + "cidr_block": "10.0.102.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-04049b1437acecccf", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2b" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2b" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:subnet/subnet-04348216afec6c2f1", + "assign_ipv6_address_on_creation": false, + "availability_zone": "us-west-2c", + "availability_zone_id": "usw2-az3", + "cidr_block": "10.0.103.0/24", + "customer_owned_ipv4_pool": "", + "enable_dns64": false, + "enable_resource_name_dns_a_record_on_launch": false, + "enable_resource_name_dns_aaaa_record_on_launch": false, + "id": "subnet-04348216afec6c2f1", + "ipv6_cidr_block": "", + "ipv6_cidr_block_association_id": "", + "ipv6_native": false, + "map_customer_owned_ip_on_launch": false, + "map_public_ip_on_launch": true, + "outpost_arn": "", + "owner_id": "258020787298", + "private_dns_hostname_type_on_launch": "ip-name", + "tags": { + "Name": "VPC-ECS-public-us-west-2c" + }, + "tags_all": { + "Name": "VPC-ECS-public-us-west-2c" + }, + "timeouts": null, + "vpc_id": "vpc-0adc0f9695f59c657" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", + "dependencies": [ + "module.vpc.aws_vpc.this", + "module.vpc.aws_vpc_ipv4_cidr_block_association.this" + ] + } + ] + }, + { + "module": "module.vpc", + "mode": "managed", + "type": "aws_vpc", + "name": "this", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-west-2:258020787298:vpc/vpc-0adc0f9695f59c657", + "assign_generated_ipv6_cidr_block": false, + "cidr_block": "10.0.0.0/16", + "default_network_acl_id": "acl-080933c4e0af67f45", + "default_route_table_id": "rtb-06347ddadcc8d1061", + "default_security_group_id": "sg-067e41a21a2088a24", + "dhcp_options_id": "dopt-0e6f29345403d5e77", + "enable_classiclink": false, + "enable_classiclink_dns_support": false, + "enable_dns_hostnames": false, + "enable_dns_support": true, + "id": "vpc-0adc0f9695f59c657", + "instance_tenancy": "default", + "ipv4_ipam_pool_id": null, + "ipv4_netmask_length": null, + "ipv6_association_id": "", + "ipv6_cidr_block": "", + "ipv6_cidr_block_network_border_group": "", + "ipv6_ipam_pool_id": "", + "ipv6_netmask_length": 0, + "main_route_table_id": "rtb-06347ddadcc8d1061", + "owner_id": "258020787298", + "tags": { + "Name": "VPC-ECS" + }, + "tags_all": { + "Name": "VPC-ECS" + } + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "create_before_destroy": true + } + ] + } + ], + "check_results": [] +} diff --git a/iac/variables.tf b/iac/variables.tf new file mode 100644 index 0000000..279d914 --- /dev/null +++ b/iac/variables.tf @@ -0,0 +1,9 @@ +variable "nome_repositorio" { + type = string + default = "staging-tempest-security" +} + +variable "cluster_name" { + type = string + default = "staging-tempest-security" +} \ No newline at end of file diff --git a/iac/vpc.tf b/iac/vpc.tf new file mode 100644 index 0000000..2cbaf91 --- /dev/null +++ b/iac/vpc.tf @@ -0,0 +1,12 @@ +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + + name = "VPC-ECS" + cidr = "10.0.0.0/16" #10.0.1.1 - 10.0.255.255 + + azs = ["us-west-2a", "us-west-2b", "us-west-2c"] + private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] + public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] + + enable_nat_gateway = true +} \ No newline at end of file diff --git a/python-app-tempest/.helmignore b/python-app-tempest/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/python-app-tempest/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/python-app-tempest/Chart.yaml b/python-app-tempest/Chart.yaml new file mode 100644 index 0000000..bd6b4d1 --- /dev/null +++ b/python-app-tempest/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: python-app-tempest +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" \ No newline at end of file diff --git a/python-app-tempest/templates/_helpers.tpl b/python-app-tempest/templates/_helpers.tpl new file mode 100644 index 0000000..0df9523 --- /dev/null +++ b/python-app-tempest/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "python-app-tempest.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "python-app-tempest.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "python-app-tempest.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "python-app-tempest.labels" -}} +helm.sh/chart: {{ include "python-app-tempest.chart" . }} +{{ include "python-app-tempest.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "python-app-tempest.selectorLabels" -}} +app.kubernetes.io/name: {{ include "python-app-tempest.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "python-app-tempest.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "python-app-tempest.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/python-app-tempest/templates/deployment.yaml b/python-app-tempest/templates/deployment.yaml new file mode 100644 index 0000000..0b527b7 --- /dev/null +++ b/python-app-tempest/templates/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app: {{ .Release.Name }} +spec: + replicas: 3 + selector: + matchLabels: + app: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }} + spec: + containers: + - name: {{ .Release.Name }} + image: "aldry1303/{{ .Release.Name }}:{{ .Values.versionContainer }}" + ports: + - containerPort: {{.Values.Port}} \ No newline at end of file diff --git a/python-app-tempest/templates/service.yaml b/python-app-tempest/templates/service.yaml new file mode 100644 index 0000000..2027064 --- /dev/null +++ b/python-app-tempest/templates/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-svc +spec: + selector: + app: {{ .Release.Name }} + ports: + - port: {{ .Values.Port}} + targetPort: {{ .Values.Port}} + type: {{ .Values.Type }} \ No newline at end of file diff --git a/python-app-tempest/values.yaml b/python-app-tempest/values.yaml new file mode 100644 index 0000000..d81b01a --- /dev/null +++ b/python-app-tempest/values.yaml @@ -0,0 +1,2 @@ +Type: LoadBalancer +Port: 80 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ebd7261 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask==2.1.2 \ No newline at end of file diff --git a/setup-loki-logs/loki-logs.sh b/setup-loki-logs/loki-logs.sh new file mode 100644 index 0000000..40992f3 --- /dev/null +++ b/setup-loki-logs/loki-logs.sh @@ -0,0 +1,9 @@ +echo "[GET CHART LOKI]" +helm repo add grafana https://grafana.github.io/helm-charts +helm repo update +echo "[Install Loki]" +kubectl create ns loki +helm install logs grafana/loki-stack --namespace loki --create-namespace --set grafana.enabled=true +kubectl patch svc logs-grafana -n loki -p '{"spec": {"type": "LoadBalancer"}}' +echo "[Your Credential]" +kubectl get secret --namespace loki logs-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo \ No newline at end of file diff --git a/setup-monitoring/telemetry-istio.sh b/setup-monitoring/telemetry-istio.sh new file mode 100644 index 0000000..293adff --- /dev/null +++ b/setup-monitoring/telemetry-istio.sh @@ -0,0 +1,13 @@ +echo "[DOWLOAND ISTIO]" +echo "==================================" +curl -L https://istio.io/downloadIstio | sh - +echo "[INSTALL ISTIO]" +echo "==================================" +istio-1.15.1/bin/istioctl install --set profile=demo -y +echo "[LABEL NAMESPACE]" +echo "==================================" +kubectl label namespace default istio-injection=enabled +kubectl delete pods --all -n default +echo "[INSTALL STACK TELEMETRY && OBSERVABILITY]" +echo "==================================" +kubectl apply -f istio-1.15.1/samples/addons \ No newline at end of file