Skip to content

Created resources and import statements to import ops-leads - #157

Merged
ale210 merged 2 commits into
mainfrom
156-import-leads-group
Aug 8, 2026
Merged

Created resources and import statements to import ops-leads#157
ale210 merged 2 commits into
mainfrom
156-import-leads-group

Conversation

@RSkuma

@RSkuma RSkuma commented Jun 15, 2026

Copy link
Copy Markdown
Member

Fixes #156

What changes did you make?

  • Created terraform resources for ops-leads(IAM Group and IAM policies)
  • Added import statement to connect terraform resources with existing aws resource

Why did you make the changes (we will use this info to test)?

  • In order for new members to onboard we need to have all groups represented in terraform
  • ops-leads is only represented in aws, so we need to bring it's representation into terraform code
  • import block will be removed after this is complete

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Terraform plan in terraform
With backend config files: terraform/prod.backend.tfvars

Plan: 3 to import, 0 to add, 0 to change, 0 to destroy.
Terraform will perform the following actions:

  # aws_iam_group.ops_leads_group will be imported
    resource "aws_iam_group" "ops_leads_group" {
        arn       = "arn:aws:iam::035866691871:group/ops-leads"
        id        = "ops-leads"
        name      = "ops-leads"
        path      = "/"
        unique_id = "*********************"
    }

  # aws_iam_group_policy_attachment.admin will be imported
    resource "aws_iam_group_policy_attachment" "admin" {
        group      = "ops-leads"
        id         = "ops-leads-arn:aws:iam::aws:policy/AdministratorAccess"
        policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
    }

  # aws_iam_group_policy_attachment.manageAccessKeys will be imported
    resource "aws_iam_group_policy_attachment" "manageAccessKeys" {
        group      = "ops-leads"
        id         = "ops-leads-arn:aws:iam::035866691871:policy/ManageAccessKeys"
        policy_arn = "arn:aws:iam::035866691871:policy/ManageAccessKeys"
    }

Plan: 3 to import, 0 to add, 0 to change, 0 to destroy.

❌ Plan not applied in Apply Terraform changes on merge #37 (Plan has changed)

@RSkuma
RSkuma requested a review from ale210 June 15, 2026 21:38
@RSkuma RSkuma self-assigned this Jun 15, 2026
Comment thread terraform/imports.tf
@RSkuma
RSkuma requested a review from ale210 June 24, 2026 23:02
@ale210
ale210 merged commit c4ceeb2 into main Aug 8, 2026
1 check passed
@ale210
ale210 deleted the 156-import-leads-group branch August 8, 2026 18:18
@ale210
ale210 restored the 156-import-leads-group branch August 8, 2026 18:21
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.

Import leads IAM group into terraform

2 participants