Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: IdP task memory value #855

Merged
merged 1 commit into from
Oct 3, 2024
Merged

fix: IdP task memory value #855

merged 1 commit into from
Oct 3, 2024

Conversation

patheard
Copy link
Member

@patheard patheard commented Oct 3, 2024

Update to the correct 8GB memory value.
@patheard patheard self-assigned this Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

⚠ Terrform update available

Terraform: 1.9.7 (using 1.9.2)
Terragrunt: 0.67.15 (using 0.63.2)

Copy link

github-actions bot commented Oct 3, 2024

Staging: idp

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

Plan: 1 to add, 2 to change, 0 to destroy
Show summary
CHANGE NAME
add module.idp_ecs.aws_ecs_task_definition.this
update module.idp_ecs.aws_appautoscaling_target.this[0]
module.idp_ecs.aws_ecs_service.this
Show plan
Resource actions are indicated with the following symbols:
  + create
  ~ update in-place
 <= read (data resources)

Terraform will perform the following actions:

  # module.idp_ecs.data.aws_ecs_task_definition.this_latest will be read during apply
  # (depends on a resource or a module with changes pending)
 <= data "aws_ecs_task_definition" "this_latest" {
      + arn                  = (known after apply)
      + arn_without_revision = (known after apply)
      + execution_role_arn   = (known after apply)
      + family               = (known after apply)
      + id                   = (known after apply)
      + network_mode         = (known after apply)
      + revision             = (known after apply)
      + status               = (known after apply)
      + task_definition      = "zitadel"
      + task_role_arn        = (known after apply)
    }

  # module.idp_ecs.aws_appautoscaling_target.this[0] will be updated in-place
  ~ resource "aws_appautoscaling_target" "this" {
        id                 = "service/idp/zitadel"
      ~ max_capacity       = 3 -> 6
      ~ min_capacity       = 1 -> 3
        tags               = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
        # (6 unchanged attributes hidden)
    }

  # module.idp_ecs.aws_ecs_service.this will be updated in-place
  ~ resource "aws_ecs_service" "this" {
        id                                 = "arn:aws:ecs:ca-central-1:687401027353:service/idp/zitadel"
        name                               = "zitadel"
        tags                               = {
            "CostCentre" = "forms-platform-staging"
            "Terraform"  = "true"
        }
      ~ task_definition                    = "zitadel:7" -> (known after apply)
        # (15 unchanged attributes hidden)

        # (5 unchanged blocks hidden)
    }

  # module.idp_ecs.aws_ecs_task_definition.this will be created
  + resource "aws_ecs_task_definition" "this" {
      + arn                      = (known after apply)
      + arn_without_revision     = (known after apply)
      + container_definitions    = jsonencode(
            [
              + {
                  + Command                = [
                      + "start-from-init",
                      + "--masterkeyFromEnv",
                      + "--tlsMode",
                      + "enabled",
                      + "--config",
                      + "/app/config.yaml",
                      + "--steps",
                      + "/app/steps.yaml",
                    ]
                  + Cpu                    = 0
                  + CredentialSpecs        = null
                  + DependsOn              = null
                  + DisableNetworking      = null
                  + DnsSearchDomains       = null
                  + DnsServers             = null
                  + DockerLabels           = null
                  + DockerSecurityOptions  = null
                  + EntryPoint             = null
                  + Environment            = [
                      + {
                          + Name  = "ZITADEL_EXTERNALDOMAIN"
                          + Value = "auth.forms-staging.cdssandbox.xyz"
                        },
                    ]
                  + EnvironmentFiles       = null
                  + Essential              = true
                  + ExtraHosts             = null
                  + FirelensConfiguration  = null
                  + HealthCheck            = null
                  + Hostname               = null
                  + Image                  = "687401027353.dkr.ecr.ca-central-1.amazonaws.com/idp/zitadel:latest"
                  + Interactive            = null
                  + Links                  = null
                  + LinuxParameters        = {
                      + Capabilities       = {
                          + Add  = []
                          + Drop = [
                              + "ALL",
                            ]
                        }
                      + Devices            = null
                      + InitProcessEnabled = null
                      + MaxSwap            = null
                      + SharedMemorySize   = null
                      + Swappiness         = null
                      + Tmpfs              = null
                    }
                  + LogConfiguration       = {
                      + LogDriver     = "awslogs"
                      + Options       = {
                          + awslogs-group         = "/aws/ecs/idp/zitadel"
                          + awslogs-region        = "ca-central-1"
                          + awslogs-stream-prefix = "task"
                        }
                      + SecretOptions = null
                    }
                  + Memory                 = null
                  + MemoryReservation      = null
                  + MountPoints            = []
                  + Name                   = "zitadel"
                  + PortMappings           = [
                      + {
                          + AppProtocol        = ""
                          + ContainerPort      = 8080
                          + ContainerPortRange = null
                          + HostPort           = 8080
                          + Name               = null
                          + Protocol           = "tcp"
                        },
                    ]
                  + Privileged             = null
                  + PseudoTerminal         = null
                  + ReadonlyRootFilesystem = true
                  + RepositoryCredentials  = null
                  + ResourceRequirements   = null
                  + Secrets                = [
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/idp_database_cluster_admin_password"
                        },
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/idp_database_cluster_admin_username"
                        },
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_DATABASE"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_database_name"
                        },
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_HOST"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_database_host"
                        },
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_USER_PASSWORD"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_database_user_password"
                        },
                      + {
                          + Name      = "ZITADEL_DATABASE_POSTGRES_USER_USERNAME"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_database_user_username"
                        },
                      + {
                          + Name      = "ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_admin_password"
                        },
                      + {
                          + Name      = "ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_admin_username"
                        },
                      + {
                          + Name      = "ZITADEL_MASTERKEY"
                          + ValueFrom = "arn:aws:ssm:ca-central-1:687401027353:parameter/zitadel_secret_key"
                        },
                    ]
                  + StartTimeout           = null
                  + StopTimeout            = null
                  + SystemControls         = []
                  + Ulimits                = null
                  + User                   = null
                  + VolumesFrom            = []
                  + WorkingDirectory       = null
                },
            ]
        )
      + cpu                      = "4096"
      + execution_role_arn       = "arn:aws:iam::687401027353:role/zitadel_ecs_task_exec_role"
      + family                   = "zitadel"
      + id                       = (known after apply)
      + memory                   = "8192"
      + network_mode             = "awsvpc"
      + requires_compatibilities = [
          + "FARGATE",
        ]
      + revision                 = (known after apply)
      + skip_destroy             = false
      + tags                     = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + tags_all                 = {
          + "CostCentre" = "forms-platform-staging"
          + "Terraform"  = "true"
        }
      + task_role_arn            = "arn:aws:iam::687401027353:role/zitadel_ecs_task_role"
      + track_latest             = false

      + runtime_platform {
          + cpu_architecture        = "X86_64"
          + operating_system_family = "LINUX"
        }
    }

Plan: 1 to add, 2 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_alb_listener_rule.idp_protocol_version"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_user.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.idp"]

23 tests, 19 passed, 4 warnings, 0 failures, 0 exceptions

@patheard patheard merged commit 2d43e7b into develop Oct 3, 2024
11 checks passed
@patheard patheard deleted the fix/idp-task-resources branch October 3, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants