Skip to content

Conversation

@IrezD
Copy link
Owner

@IrezD IrezD commented Jan 7, 2024

Container deployment method changed from FARGATE to EC2

@github-actions
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:40" -> (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:40" -> (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:b92b94011a9d5e1a3913aa93b665bd7b4dbba222" -> "${aws_ecrpublic_repository.fastapi-ecr-public.repository_uri}:${var.image_tag}"
-                   mountPoints  = []
!~                  name         = "dev_FastAPI_image" -> "${var.env}_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                 = 40 -> (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 #49

@github-actions
Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

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

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:40" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition will be created
+   resource "aws_ecs_task_definition" "task_definition" {
+       arn                      = (known after apply)
+       arn_without_revision     = (known after apply)
+       container_definitions    = jsonencode(
            [
+               {
+                   cpu          = 256
+                   essential    = true
+                   image        = "${aws_ecrpublic_repository.fastapi-ecr-public.repository_uri}:${var.image_tag}"
+                   memory       = 512
+                   name         = "${var.env}_FastAPI_image"
+                   portMappings = [
+                       {
+                           containerPort = 5000
+                           hostPort      = 5000
                        },
                    ]
                },
            ]
        )
+       family                   = "dev-fastapi-container"
+       id                       = (known after apply)
+       network_mode             = (known after apply)
+       requires_compatibilities = [
+           "EC2",
        ]
+       revision                 = (known after apply)
+       skip_destroy             = false
+       tags_all                 = {
+           "Environment" = "Dev Environment"
        }
    }

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

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

@github-actions
Copy link

github-actions bot commented Jan 7, 2024

Terraform plan for Staging

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

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:40" -> (known after apply)
#        (15 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # aws_ecs_task_definition.task_definition will be created
+   resource "aws_ecs_task_definition" "task_definition" {
+       arn                      = (known after apply)
+       arn_without_revision     = (known after apply)
+       container_definitions    = jsonencode(
            [
+               {
+                   cpu          = 256
+                   essential    = true
+                   image        = "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:4e0f2a6ab4a4365ca575935023fc17b79569e349"
+                   memory       = 512
+                   name         = "dev_FastAPI_image"
+                   portMappings = [
+                       {
+                           containerPort = 5000
+                           hostPort      = 5000
                        },
                    ]
                },
            ]
        )
+       family                   = "dev-fastapi-container"
+       id                       = (known after apply)
+       network_mode             = (known after apply)
+       requires_compatibilities = [
+           "EC2",
        ]
+       revision                 = (known after apply)
+       skip_destroy             = false
+       tags_all                 = {
+           "Environment" = "Dev Environment"
        }
    }

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

✅ Plan applied in Staging Image Build & Push #53

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

@IrezD IrezD merged commit 808d04c into main Jan 7, 2024
@IrezD IrezD deleted the new-structure branch January 7, 2024 18:00
@github-actions
Copy link

github-actions bot commented Jan 7, 2024

🎉 This PR is included in version 2.0.0 🎉

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.

2 participants