The SAML.to Command Line Interface can be used for authentication to AWS and can be used with the terraform CLI or any tool that supports Terraform (such as terragrunt).
This document will detail how to use SAML.to to authenticate to AWS to run Terraform commands with Tokenless Authentication.
And run terraform init to ensure you have access to the State File.
If the Role in AWS has Read/Write permissions to the AWS account, such as AdministratorAccess, at this point, you can run terraform plan and terraform apply with the terraform-runner identity.
Create a second role in whatever AWS account you'd like, terraform-applier (or whatever you want to call it) that grants terraform-runner the ability to assume it:
Trust Relationship
It's not necessary to declare terraform-applier in the saml-to.yml. Role Assumption in Terraform uses STS Role Assumption internally and relies on IAM trust relationships!
Configure role assumption in Terraform:
Save the temporary credentials to ~/.aws/credentials using the --save flag on the SAML.to CLI: