Skip to content

Adds a command to run tf as github#638

Open
TOEL2 wants to merge 1 commit intomainfrom
feature/make-tf-with-assumed-role
Open

Adds a command to run tf as github#638
TOEL2 wants to merge 1 commit intomainfrom
feature/make-tf-with-assumed-role

Conversation

@TOEL2
Copy link
Copy Markdown
Contributor

@TOEL2 TOEL2 commented Apr 11, 2026

Description

We often come up against a similar issue where we don't know exactly the right permissions that github will need to deploy our infra changes because when we test locally we use our admin credentials which will always just work.

This pr adds a make command that can run terraform plans and applies but assumes the github role to do so. This means we will easily be able to find, re-create and debug errors locally rather than waiting till after the code is merged and fixing forward.

We do also need to extend the trust policy for the two github roles to allow devs to assume them which I have also done here.

NOTE: The change to the bootstrap policy can only be applied using our admin credentials since we do not want to allow that role to update itself. I have tried this in dev with the exact tf in this branch and it works fine. We just need to do the same change in each env.

Context

No more confusion around required deployment permissions.

The hope is that we can avoid the constant "oh no it needs this extra permission lets do a quick follow up pr to fix it" scenario.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@TOEL2 TOEL2 requested a review from a team as a code owner April 11, 2026 09:40
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