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

Terragrunt - AwsAssumeRole does not work on generate_projects / blocks configuration - Community Edition #1714

Closed
ben-of-codecraft opened this issue Sep 19, 2024 · 2 comments · Fixed by #1720

Comments

@ben-of-codecraft
Copy link
Contributor

Issue

When using backendless action inputs:

      - name: digger run
        uses: diggerhq/digger@v0.6.39
        with:
            setup-aws: false
            setup-terragrunt: true
            setup-checkov: false
            disable-locking: true
            no-backend: true
            terragrunt-version: 0.50.2

The command/state role assumes do not get used correctly when set on the blocks like as follows

generate_projects
    blocks:
      - block_name: dev
        terragrunt: true
        root_dir: "dev/"
        workflow: default
        workflow_file: digger_workflow.yml
        aws_role_to_assume:
           aws_role_region: "us-east-1"
           command: "xxxx"
  

Expected Behavior

AWSRole identity provider is used and passed into Terragrunt run similar to to how Terraform works.

@ben-of-codecraft
Copy link
Contributor Author

Have narrowed down the problem to likely being this function not apply thing AwsAssumeRole struct when creating the projectYaml

https://github.com/diggerhq/digger/blob/develop/libs/digger_config/digger_config.go#L409

@ben-of-codecraft
Copy link
Contributor Author

What I discovered:

  1. StateEnvVars do not copy from CommandEnvVars anymore
  2. passing backend-config for AWS credentials and using Env credentials for the same will cause a request to init --reconfigure
  3. Init and plan use different mechanisms for passing AWS permissions when handling AWS Assume role
  4. AwsAssumeRole on Blocks is not captured into projects in current version

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 a pull request may close this issue.

1 participant