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

Chores: added ECS redeployment trigger #10

Merged
merged 6 commits into from
Jan 7, 2024
Merged

Chores: added ECS redeployment trigger #10

merged 6 commits into from
Jan 7, 2024

Conversation

IrezD
Copy link
Owner

@IrezD IrezD commented Jan 7, 2024

No description provided.

Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

Plan: 2 to add, 3 to change, 2 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_autoscaling_group.ASG_config will be updated in-place
!~  resource "aws_autoscaling_group" "ASG_config" {
+       desired_capacity_type            = "units"
        id                               = "fastapi-ASG-dev"
        name                             = "fastapi-ASG-dev"
#        (26 unchanged attributes hidden)

-       tag {
-           key                 = "Name" -> null
-           propagate_at_launch = true -> null
-           value               = "Dev_Environment" -> null
        }

#        (4 unchanged blocks hidden)
    }

  # aws_ecs_service.fastapi-service will be updated in-place
!~  resource "aws_ecs_service" "fastapi-service" {
        id                                 = "arn:aws:ecs:eu-central-1:806066816337:service/fastapi-cluster/dev-fastapi-service"
        name                               = "dev-fastapi-service"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:42" -> (known after apply)
!~      triggers                           = {} -> (known after apply)
#        (14 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "task_definition" {
!~      arn                      = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:42" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   environment  = []
!~                  image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:929fd846f2e35ae91092d5ccd4e64d446a596b6e" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:3bab94a0067fca525f7dd65e7343a451aadeff5f"
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (3 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 42 -> (known after apply)
-       tags                     = {} -> null
#        (4 unchanged attributes hidden)
    }

  # aws_iam_instance_profile.instance_profile must be replaced
-/+ resource "aws_iam_instance_profile" "instance_profile" {
!~      arn         = "arn:aws:iam::806066816337:instance-profile/InstanceRoleForECS_dev" -> (known after apply)
!~      create_date = "2024-01-07T18:24:21Z" -> (known after apply)
!~      id          = "**********************" -> (known after apply)
!~      name        = "InstanceRoleForECS_dev" -> "InstanceRoleForECS" # forces replacement
+       name_prefix = (known after apply)
-       tags        = {} -> null
!~      unique_id   = "*********************" -> (known after apply)
#        (3 unchanged attributes hidden)
    }

  # aws_launch_template.ASG_template will be updated in-place
!~  resource "aws_launch_template" "ASG_template" {
        id                      = "lt-0fb24dbdf35f7cf64"
!~      latest_version          = 3 -> (known after apply)
        name                    = "LaunchTemplateECR20240107162659112500000001"
        tags                    = {}
#        (11 unchanged attributes hidden)

!~      iam_instance_profile {
!~          name = "InstanceRoleForECS_dev" -> "InstanceRoleForECS"
        }

#        (1 unchanged block hidden)
    }

Plan: 2 to add, 3 to change, 2 to destroy.

✅ Plan applied in Staging Image Build & Push #55

Outputs
ecr_registry_id     = "806066816337"
ecr_repository_name = "dev/irezd/fastapi"

Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

Plan: 1 to add, 2 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_autoscaling_group.ASG_config will be updated in-place
!~  resource "aws_autoscaling_group" "ASG_config" {
+       desired_capacity_type            = "units"
        id                               = "fastapi-ASG-dev"
        name                             = "fastapi-ASG-dev"
#        (26 unchanged attributes hidden)

#        (4 unchanged blocks hidden)
    }

  # aws_ecs_service.fastapi-service will be updated in-place
!~  resource "aws_ecs_service" "fastapi-service" {
        id                                 = "arn:aws:ecs:eu-central-1:806066816337:service/fastapi-cluster/dev-fastapi-service"
        name                               = "dev-fastapi-service"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:43" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "task_definition" {
!~      arn                      = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:43" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   environment  = []
!~                  image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:3bab94a0067fca525f7dd65e7343a451aadeff5f" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:904a537c670431801e7ebe633ca0e06881c3daa3"
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (3 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 43 -> (known after apply)
-       tags                     = {} -> null
#        (4 unchanged attributes hidden)
    }

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

❌ Error applying plan in Staging Image Build & Push #56

Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

Plan: 1 to add, 2 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_autoscaling_group.ASG_config will be updated in-place
!~  resource "aws_autoscaling_group" "ASG_config" {
+       desired_capacity_type            = "units"
        id                               = "fastapi-ASG-dev"
        name                             = "fastapi-ASG-dev"
#        (26 unchanged attributes hidden)

#        (4 unchanged blocks hidden)
    }

  # aws_ecs_service.fastapi-service will be updated in-place
!~  resource "aws_ecs_service" "fastapi-service" {
        id                                 = "arn:aws:ecs:eu-central-1:806066816337:service/fastapi-cluster/dev-fastapi-service"
        name                               = "dev-fastapi-service"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:43" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "task_definition" {
!~      arn                      = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:44" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   environment  = []
!~                  image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:904a537c670431801e7ebe633ca0e06881c3daa3" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:cf708b5b981be4e869fa76791571c41e9033ad30"
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (3 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 44 -> (known after apply)
-       tags                     = {} -> null
#        (4 unchanged attributes hidden)
    }

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

✅ Plan applied in Staging Image Build & Push #57

Outputs
ecr_registry_id     = "806066816337"
ecr_repository_name = "dev/irezd/fastapi"

Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

Plan: 1 to add, 2 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_autoscaling_group.ASG_config will be updated in-place
!~  resource "aws_autoscaling_group" "ASG_config" {
+       desired_capacity_type            = "units"
        id                               = "fastapi-ASG-dev"
        name                             = "fastapi-ASG-dev"
#        (26 unchanged attributes hidden)

#        (4 unchanged blocks hidden)
    }

  # aws_ecs_service.fastapi-service will be updated in-place
!~  resource "aws_ecs_service" "fastapi-service" {
        id                                 = "arn:aws:ecs:eu-central-1:806066816337:service/fastapi-cluster/dev-fastapi-service"
        name                               = "dev-fastapi-service"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:45" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "task_definition" {
!~      arn                      = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:45" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   environment  = []
!~                  image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:cf708b5b981be4e869fa76791571c41e9033ad30" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:4d41ff8e168076ccabe72db6e654ebc24a975dc3"
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (3 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 45 -> (known after apply)
-       tags                     = {} -> null
#        (4 unchanged attributes hidden)
    }

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

✅ Plan applied in Staging Image Build & Push #58

Outputs
ecr_registry_id     = "806066816337"
ecr_repository_name = "dev/irezd/fastapi"

Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

Plan: 1 to add, 2 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_autoscaling_group.ASG_config will be updated in-place
!~  resource "aws_autoscaling_group" "ASG_config" {
+       desired_capacity_type            = "units"
        id                               = "fastapi-ASG-dev"
        name                             = "fastapi-ASG-dev"
#        (26 unchanged attributes hidden)

+       tag {
+           key                 = "Name"
+           propagate_at_launch = true
+           value               = "Dev_Enivronment"
        }

#        (4 unchanged blocks hidden)
    }

  # aws_ecs_service.fastapi-service will be updated in-place
!~  resource "aws_ecs_service" "fastapi-service" {
        id                                 = "arn:aws:ecs:eu-central-1:806066816337:service/fastapi-cluster/dev-fastapi-service"
        name                               = "dev-fastapi-service"
        tags                               = {}
!~      task_definition                    = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:46" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition must be replaced
-/+ resource "aws_ecs_task_definition" "task_definition" {
!~      arn                      = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container:46" -> (known after apply)
!~      arn_without_revision     = "arn:aws:ecs:eu-central-1:806066816337:task-definition/dev-fastapi-container" -> (known after apply)
!~      container_definitions    = jsonencode(
!~          [
!~              {
-                   environment  = []
!~                  image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:4d41ff8e168076ccabe72db6e654ebc24a975dc3" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:61e1d652c5704639e2e735457c4cd884ada8cc77"
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (3 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 46 -> (known after apply)
-       tags                     = {} -> null
#        (4 unchanged attributes hidden)
    }

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

✅ Plan applied in Staging Image Build & Push #59

Outputs
ecr_registry_id     = "806066816337"
ecr_repository_name = "dev/irezd/fastapi"

@IrezD IrezD merged commit 30417b3 into main Jan 7, 2024
2 checks passed
@IrezD IrezD deleted the feature branch January 7, 2024 23:03
Copy link

github-actions bot commented Jan 7, 2024

🎉 This PR is included in version 2.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant