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: unique name for instance profile in both environments #11

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

IrezD
Copy link
Owner

@IrezD IrezD commented Jan 8, 2024

No description provided.

Copy link

github-actions bot commented Jan 8, 2024

Terraform plan for Staging

Plan: 2 to add, 4 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)

#        (5 unchanged blocks hidden)
    }

  # aws_ecs_cluster.fastapi-cluster will be updated in-place
!~  resource "aws_ecs_cluster" "fastapi-cluster" {
        id       = "arn:aws:ecs:eu-central-1:806066816337:cluster/fastapi-cluster"
        name     = "fastapi-cluster"
!~      tags     = {
-           "Environment" = "Prod Environment" -> null
        }
!~      tags_all = {
!~          "Environment" = "Prod Environment" -> "Dev Environment"
        }
#        (1 unchanged attribute hidden)

#        (2 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:47" -> (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:47" -> (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:61e1d652c5704639e2e735457c4cd884ada8cc77" -> "public.ecr.aws/p2x0k5a9/dev/irezd/fastapi:0eddadda493e2dd22fde5c3b8874e93e597f8080"
!~                  memory       = 512 -> 256
-                   mountPoints  = []
                    name         = "dev_FastAPI_image"
!~                  portMappings = [
!~                      {
-                           protocol      = "tcp"
#                            (2 unchanged attributes hidden)
                        },
                    ]
-                   volumesFrom  = []
#                    (2 unchanged attributes hidden)
                },
            ] # forces replacement
        )
!~      id                       = "*********************" -> (known after apply)
+       network_mode             = (known after apply)
!~      revision                 = 47 -> (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" -> (known after apply)
!~      create_date = "2024-01-07T18:37:56Z" -> (known after apply)
!~      id          = "******************" -> (known after apply)
!~      name        = "InstanceRoleForECS" -> "InstanceRoleForECS_dev" # 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          = 4 -> (known after apply)
        name                    = "LaunchTemplateECR20240107162659112500000001"
        tags                    = {}
#        (11 unchanged attributes hidden)

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

#        (1 unchanged block hidden)
    }

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

✅ Plan applied in Staging Image Build & Push #60

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

@IrezD IrezD merged commit 4e96e7a into main Jan 8, 2024
2 checks passed
@IrezD IrezD deleted the feature branch January 8, 2024 08:01
@IrezD IrezD restored the feature branch January 8, 2024 08:11
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.

1 participant