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

chore: remove forms-terraform-apply-release OIDC role #696

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

patheard
Copy link
Member

@patheard patheard commented Jun 18, 2024

Summary

Remove this role as it is no longer required. Previously it was used to run Terraform apply against production when a release tag had triggered the workflow.

With the change to support release revert PRs, Terraform apply workflows against production are now triggered by pushes to the develop branch.

Related

Remove this role as it is no longer required.  Previously, it was used to run Terraform
apply against production when a release had triggered the workflow.

With the change to support release revert PRs, Terraform apply workflows against
production are now triggered by pushes to the `develop` branch.
@patheard patheard self-assigned this Jun 18, 2024
Copy link

⚠ Terrform update available

Terraform: 1.8.5 (using 1.6.6)
Terragrunt: 0.59.4 (using 0.54.8)

Copy link

Staging: oidc_roles

✅   Terraform Init: success
✅   Terraform Validate: success
✅   Terraform Format: success
✅   Terraform Plan: success
✅   Conftest: success

⚠️   Warning: resources will be destroyed by this change!

Plan: 0 to add, 0 to change, 1 to destroy
Show summary
CHANGE NAME
delete module.github_workflow_roles.aws_iam_role.this["forms-terraform-apply-release"]
Show plan
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # module.github_workflow_roles.aws_iam_role.this["forms-terraform-apply-release"] will be destroyed
  # (because key ["forms-terraform-apply-release"] is not in for_each map)
  - resource "aws_iam_role" "this" {
      - arn                   = "arn:aws:iam::687401027353:role/forms-terraform-apply-release" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRoleWithWebIdentity"
                      - Condition = {
                          - StringLike = {
                              - "token.actions.githubusercontent.com:sub" = "repo:cds-snc/forms-terraform:ref:refs/tags/v*"
                            }
                        }
                      - Effect    = "Allow"
                      - Principal = {
                          - Federated = "arn:aws:iam::687401027353:oidc-provider/token.actions.githubusercontent.com"
                        }
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2024-01-11T20:14:07Z" -> null
      - force_detach_policies = false -> null
      - id                    = "forms-terraform-apply-release" -> null
      - managed_policy_arns   = [] -> null
      - max_session_duration  = 3600 -> null
      - name                  = "forms-terraform-apply-release" -> null
      - path                  = "/" -> null
      - tags                  = {
          - "CostCentre" = "forms-platform-staging"
          - "Terraform"  = "true"
        } -> null
      - tags_all              = {
          - "CostCentre" = "forms-platform-staging"
          - "Terraform"  = "true"
        } -> null
      - unique_id             = "AROA2ADCLI4MRRLV4PUAY" -> null
    }

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

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

Saved the plan to: plan.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "plan.tfplan"
Show Conftest results
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.platform_forms_client_pr_review_env[0]"]

20 tests, 19 passed, 1 warning, 0 failures, 0 exceptions

@patheard patheard changed the title chore: remove forms-terraform tag release OIDC role chore: remove forms-terraform-apply-release OIDC role Jun 18, 2024
@patheard patheard merged commit 69bb7e1 into develop Jun 18, 2024
10 checks passed
@patheard patheard deleted the chore/remove-release-role branch June 18, 2024 15:03
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.

2 participants