cloudbees-oss / terraform-aws-cloudbees-ci-eks-addon

CloudBees CI Add-on for AWS EKS
https://registry.terraform.io/modules/cloudbees/cloudbees-ci-eks-addon/aws
MIT License
10 stars 12 forks source link

Getting Started Completed! #16

Closed carlosrodlop closed 12 months ago

carlosrodlop commented 1 year ago
cccaternberg commented 1 year ago

We have tested the PR , it ends up in errors with existing resources for KMS and CloudWatch Log groups


│ Error: creating KMS Alias (alias/eks/cbci-start-v4-eks): AlreadyExistsException: An alias with the name arn:aws:kms:us-east-1:324005994172:alias/eks/cbci-start-v4-eks already exists
│
│   with module.eks.module.kms.aws_kms_alias.this["cluster"],
│   on .terraform/modules/eks.kms/main.tf line 255, in resource "aws_kms_alias" "this":
│  255: resource "aws_kms_alias" "this" {
│
╵
╷
│ Error: creating CloudWatch Logs Log Group (/aws/eks/cbci-start-v4-eks/cluster): operation error CloudWatch Logs: CreateLogGroup, https response error StatusCode: 400, RequestID: 9ac226de-2e4e-4668-b93e-36e69ab19567, ResourceAlreadyExistsException: The specified log group already exists
│
│   with module.eks.aws_cloudwatch_log_group.this[0],
│   on .terraform/modules/eks/main.tf line 106, in resource "aws_cloudwatch_log_group" "this":
│  106: resource "aws_cloudwatch_log_group" "this" {

We tried to delete those resources manually, but it was not successful. The resources can not be deleted because of other dependencies

Cloudwatch -> Loggroups -> delete cbci-start-v4-eks KMS delete -> delete alias -> delete KMS -> cbci-start-v4-eks

cccaternberg commented 1 year ago

test destroy for v4 failed with ` Changes to Outputs:

carlosrodlop commented 1 year ago

We have tested the PR , it ends up in erros with existing resources for KMS and CloudWatch Log groups


│ Error: creating KMS Alias (alias/eks/cbci-start-v4-eks): AlreadyExistsException: An alias with the name arn:aws:kms:us-east-1:324005994172:alias/eks/cbci-start-v4-eks already exists
│
│   with module.eks.module.kms.aws_kms_alias.this["cluster"],
│   on .terraform/modules/eks.kms/main.tf line 255, in resource "aws_kms_alias" "this":
│  255: resource "aws_kms_alias" "this" {
│
╵
╷
│ Error: creating CloudWatch Logs Log Group (/aws/eks/cbci-start-v4-eks/cluster): operation error CloudWatch Logs: CreateLogGroup, https response error StatusCode: 400, RequestID: 9ac226de-2e4e-4668-b93e-36e69ab19567, ResourceAlreadyExistsException: The specified log group already exists
│
│   with module.eks.aws_cloudwatch_log_group.this[0],
│   on .terraform/modules/eks/main.tf line 106, in resource "aws_cloudwatch_log_group" "this":
│  106: resource "aws_cloudwatch_log_group" "this" {

We tried to delete those resources manually, but it was not successful. Tgheh resources can not be deleted because of other dependencies

Cloudwatch -> Loggroups -> delete cbci-start-v4-eks KMS delete -> delete alias -> delete KMS -> cbci-start-v4-eks

I believe this was solved by adding random ids for name, right?

cccaternberg commented 12 months ago
carlosrodlop commented 12 months ago

test destroy for v4 failed with ` Changes to Outputs:

  • acm_certificate_arn = "arn:aws:acm:us-east-1:324005994172:certificate/7f7ca293-6375-4028-bd4a-016f00b56f28" -> null
  • cjoc_url = "https://cjoc.acaternberg.pscbdemos.com" -> null
  • configure_kubectl = "aws eks --region us-east-1 update-kubeconfig --name cbci-start-v4-24-eks" -> null
  • eks_cluster_arn = "arn:aws:eks:us-east-1:324005994172:cluster/cbci-start-v4-24-eks" -> null
  • vpc_arn = "arn:aws:ec2:us-east-1:324005994172:vpc/vpc-0fb9f8d72b2b471f6" -> null ╷ │ Error: Unsupported attribute │ │ on main.tf line 58, in module "eks_blueprints_addons": │ 58: eks_cluster_endpoint = module.eks.cluster_endpoint │ ├──────────────── │ │ module.eks is object with 7 attributes │ │ This object does not have an attribute named "cluster_endpoint". ╵ ╷ │ Error: Unsupported attribute │ │ on main.tf line 59, in module "eks_blueprints_addons": │ 59: eks_oidc_provider = module.eks.oidc_provider │ ├──────────────── │ │ module.eks is object with 7 attributes │ │ This object does not have an attribute named "oidc_provider".`

I tried to reproduce this locally but it was not possible. It might be due to some sort of race condition. Let's check if steve fails into tis issue to determinate how to proceed