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

Removing unused tf config #28

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Removing unused tf config #28

merged 1 commit into from
Jun 12, 2024

Conversation

caiocsgomes
Copy link
Owner

No description provided.

Copy link

Terraform plan

Click to see the plan
[command]/home/runner/work/_temp/50fdb7d8-459a-4602-ad56-4cdcd4fcbe73/terraform-bin show -no-color plan.tmp

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:

  # module.eks.module.eks_managed_node_group["bottlerocket_default"].aws_eks_node_group.this[0] has changed
  ~ resource "aws_eks_node_group" "this" {
        id                     = "aws-eks-cluster:bottlerocket_default-20240612174618186900000014"
      + labels                 = {}
        tags                   = {
            "Name"    = "bottlerocket_default"
            "project" = "aws-eks-cluster"
        }
        # (15 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

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

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.node_additional will be destroyed
  # (because aws_iam_policy.node_additional is not in configuration)
  - resource "aws_iam_policy" "node_additional" {
      - arn         = "arn:aws:iam::322620855520:policy/aws-eks-cluster-additional" -> null
      - description = "Example usage of node additional policy" -> null
      - id          = "arn:aws:iam::322620855520:policy/aws-eks-cluster-additional" -> null
      - name        = "aws-eks-cluster-additional" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = [
                          - "ec2:Describe*",
                        ]
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - policy_id   = "ANPAUWHNTSTQADLZGBFX7" -> null
      - tags        = {
          - "project" = "aws-eks-cluster"
        } -> null
      - tags_all    = {
          - "project" = "aws-eks-cluster"
        } -> null
        # (1 unchanged attribute hidden)
    }

  # aws_iam_role.this["multiple"] will be destroyed
  # (because aws_iam_role.this is not in configuration)
  - resource "aws_iam_role" "this" {
      - arn                   = "arn:aws:iam::322620855520:role/ex-multiple" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "ec2.amazonaws.com"
                        }
                      - Sid       = "Example"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2024-06-12T17:34:36Z" -> null
      - force_detach_policies = false -> null
      - id                    = "ex-multiple" -> null
      - managed_policy_arns   = [] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "ex-multiple" -> null
      - path                  = "/" -> null
      - tags                  = {
          - "project" = "aws-eks-cluster"
        } -> null
      - tags_all              = {
          - "project" = "aws-eks-cluster"
        } -> null
      - unique_id             = "AROAUWHNTSTQBXZN3DFYX" -> null
        # (3 unchanged attributes hidden)
    }

  # aws_iam_role.this["single"] will be destroyed
  # (because aws_iam_role.this is not in configuration)
  - resource "aws_iam_role" "this" {
      - arn                   = "arn:aws:iam::322620855520:role/ex-single" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "ec2.amazonaws.com"
                        }
                      - Sid       = "Example"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2024-06-12T17:34:36Z" -> null
      - force_detach_policies = false -> null
      - id                    = "ex-single" -> null
      - managed_policy_arns   = [] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "ex-single" -> null
      - path                  = "/" -> null
      - tags                  = {
          - "project" = "aws-eks-cluster"
        } -> null
      - tags_all              = {
          - "project" = "aws-eks-cluster"
        } -> null
      - unique_id             = "AROAUWHNTSTQIKXKXHW6D" -> null
        # (3 unchanged attributes hidden)
    }

Plan: 0 to add, 0 to change, 3 to destroy.
::debug::Terraform exited with code 0.
::debug::stdout: %0ANote: Objects have changed outside of Terraform%0A%0ATerraform detected the following changes made outside of Terraform since the%0Alast "terraform apply" which may have affected this plan:%0A%0A  # module.eks.module.eks_managed_node_group["bottlerocket_default"].aws_eks_node_group.this[0] has changed%0A  ~ resource "aws_eks_node_group" "this" {%0A        id                     = "aws-eks-cluster:bottlerocket_default-20240612174618186900000014"%0A      + labels                 = {}%0A        tags                   = {%0A            "Name"    = "bottlerocket_default"%0A            "project" = "aws-eks-cluster"%0A        }%0A        # (15 unchanged attributes hidden)%0A%0A        # (3 unchanged blocks hidden)%0A    }%0A%0A%0AUnless you have made equivalent changes to your configuration, or ignored the%0Arelevant attributes using ignore_changes, the following plan may include%0Aactions to undo or respond to these changes.%0A%0A─────────────────────────────────────────────────────────────────────────────%0A%0ATerraform used the selected providers to generate the following execution%0Aplan. Resource actions are indicated with the following symbols:%0A  - destroy%0A%0ATerraform will perform the following actions:%0A%0A  # aws_iam_policy.node_additional will be destroyed%0A  # (because aws_iam_policy.node_additional is not in configuration)%0A  - resource "aws_iam_policy" "node_additional" {%0A      - arn         = "arn:aws:iam::322620855520:policy/aws-eks-cluster-additional" -> null%0A      - description = "Example usage of node additional policy" -> null%0A      - id          = "arn:aws:iam::322620855520:policy/aws-eks-cluster-additional" -> null%0A      - name        = "aws-eks-cluster-additional" -> null%0A      - path        = "/" -> null%0A      - policy      = jsonencode(%0A            {%0A              - Statement = [%0A                  - {%0A                      - Action   = [%0A                          - "ec2:Describe*",%0A                        ]%0A                      - Effect   = "Allow"%0A                      - Resource = "*"%0A                    },%0A                ]%0A              - Version   = "2012-10-17"%0A            }%0A        ) -> null%0A      - policy_id   = "ANPAUWHNTSTQADLZGBFX7" -> null%0A      - tags        = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A      - tags_all    = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A        # (1 unchanged attribute hidden)%0A    }%0A%0A  # aws_iam_role.this["multiple"] will be destroyed%0A  # (because aws_iam_role.this is not in configuration)%0A  - resource "aws_iam_role" "this" {%0A      - arn                   = "arn:aws:iam::322620855520:role/ex-multiple" -> null%0A      - assume_role_policy    = jsonencode(%0A            {%0A              - Statement = [%0A                  - {%0A                      - Action    = "sts:AssumeRole"%0A                      - Effect    = "Allow"%0A                      - Principal = {%0A                          - Service = "ec2.amazonaws.com"%0A                        }%0A                      - Sid       = "Example"%0A                    },%0A                ]%0A              - Version   = "2012-10-17"%0A            }%0A        ) -> null%0A      - create_date           = "2024-06-12T17:34:36Z" -> null%0A      - force_detach_policies = false -> null%0A      - id                    = "ex-multiple" -> null%0A      - managed_policy_arns   = [] -> null%0A      - max_session_duration  = 3600 -> null%0A      - name                  = "ex-multiple" -> null%0A      - path                  = "/" -> null%0A      - tags                  = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A      - tags_all              = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A      - unique_id             = "AROAUWHNTSTQBXZN3DFYX" -> null%0A        # (3 unchanged attributes hidden)%0A    }%0A%0A  # aws_iam_role.this["single"] will be destroyed%0A  # (because aws_iam_role.this is not in configuration)%0A  - resource "aws_iam_role" "this" {%0A      - arn                   = "arn:aws:iam::322620855520:role/ex-single" -> null%0A      - assume_role_policy    = jsonencode(%0A            {%0A              - Statement = [%0A                  - {%0A                      - Action    = "sts:AssumeRole"%0A                      - Effect    = "Allow"%0A                      - Principal = {%0A                          - Service = "ec2.amazonaws.com"%0A                        }%0A                      - Sid       = "Example"%0A                    },%0A                ]%0A              - Version   = "2012-10-17"%0A            }%0A        ) -> null%0A      - create_date           = "2024-06-12T17:34:36Z" -> null%0A      - force_detach_policies = false -> null%0A      - id                    = "ex-single" -> null%0A      - managed_policy_arns   = [] -> null%0A      - max_session_duration  = 3600 -> null%0A      - name                  = "ex-single" -> null%0A      - path                  = "/" -> null%0A      - tags                  = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A      - tags_all              = {%0A          - "project" = "aws-eks-cluster"%0A        } -> null%0A      - unique_id             = "AROAUWHNTSTQIKXKXHW6D" -> null%0A        # (3 unchanged attributes hidden)%0A    }%0A%0APlan: 0 to add, 0 to change, 3 to destroy.%0A
::debug::stderr: 
::debug::exitcode: 0
 

@caiocsgomes caiocsgomes merged commit e6546dc into main Jun 12, 2024
1 check passed
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