Skip to content

get_aws_account_id() mocked during validation #5830

@sophie-warner-annalise-ai

Description

Describe the enhancement

I run terragrunt hcl validate --inputs --strict in my CI. It fails bc the CI runner is not authed to AWS.

get_aws_account_id() and similar should not make calls to external systems during validation or formatting as they are static checks. It would be good if they knew not to make this call or you could pass a flag such as --mock --ci

Additional context

Its possible to add a fallback to account for not being authed such as: get_env("AWS_ACCOUNT_ID", get_aws_account_id()) where AWS_ACCOUNT_ID is a dummy value. However, imo you shouldn't have to change code to get static checks to pass when the code already does what its supposed to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-designWe need to flesh out the design before we can resolve the issuepreservedPreserved issues never go stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions