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: Error: Required plugins are not installed #4866

Open
vitali-federau-monite opened this issue Aug 21, 2024 · 0 comments
Open

Terragrunt: Error: Required plugins are not installed #4866

vitali-federau-monite opened this issue Aug 21, 2024 · 0 comments

Comments

@vitali-federau-monite
Copy link

vitali-federau-monite commented Aug 21, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

Atlantis working with terragrunt still gives me Error: Required plugins are not installed, even though I have
TERRAGRUNT_PROVIDER_CACHE: 1 and ATLANTIS_USE_TF_PLUGIN_CACHE: "false"

Reproduction Steps

Terragrunt verision: TG_VERSION="v0.64.1
Atlantis version 5.4.4
Terraform version: Terraform v1.8.5

I have tried a lot of ways that were discussed in docs, I dont have a lot of projects and in my pod in folders like
/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss
I can see the folder terraform/providers/hashicorp/aws and random, so all in place, but I still get

running "terragrunt plan --terragrunt-non-interactive -no-color -out=$PLANFILE $(printf '%s' $COMMENT_ARGS | sed 's/,/ /' | tr -d '\\\\')" in "/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/erebus/rds": exit status 1: running "terragrunt plan --terragrunt-non-interactive -no-color -out=$PLANFILE $(printf '%s' $COMMENT_ARGS | sed 's/,/ /' | tr -d '\\\\')" in "/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/erebus/rds": 
time=2024-08-21T23:34:17Z level=info msg=Terragrunt Cache server is listening on 127.0.0.1:41481
time=2024-08-21T23:34:17Z level=info msg=Start Terragrunt Cache server

Error: Required plugins are not installed

The installed provider plugins are not consistent with the packages selected
in the dependency lock file:
  - registry.terraform.io/hashicorp/random: there is no package for registry.terraform.io/hashicorp/random 3.6.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/aws: there is no package for registry.terraform.io/hashicorp/aws 5.63.1 cached in .terraform/providers

Terraform uses external plugins to integrate with a variety of different
infrastructure services. To download the plugins required for this
configuration, run:
  terraform init
time=2024-08-21T23:34:43Z level=error msg=terraform invocation failed in /atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss error=[/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss] exit status 1 prefix=[/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds] 
time=2024-08-21T23:34:43Z level=info msg=Shutting down Terragrunt Cache server...
time=2024-08-21T23:34:43Z level=info msg=Terragrunt Cache server stopped
time=2024-08-21T23:34:43Z level=error msg=1 error occurred:
	* [/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss] exit status 1

Logs

running "terragrunt plan --terragrunt-non-interactive -no-color -out=$PLANFILE $(printf '%s' $COMMENT_ARGS | sed 's/,/ /' | tr -d '\\\\')" in "/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/erebus/rds": exit status 1: running "terragrunt plan --terragrunt-non-interactive -no-color -out=$PLANFILE $(printf '%s' $COMMENT_ARGS | sed 's/,/ /' | tr -d '\\\\')" in "/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/erebus/rds": 
time=2024-08-21T23:34:17Z level=info msg=Terragrunt Cache server is listening on 127.0.0.1:41481
time=2024-08-21T23:34:17Z level=info msg=Start Terragrunt Cache server

Error: Required plugins are not installed

The installed provider plugins are not consistent with the packages selected
in the dependency lock file:
  - registry.terraform.io/hashicorp/random: there is no package for registry.terraform.io/hashicorp/random 3.6.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/aws: there is no package for registry.terraform.io/hashicorp/aws 5.63.1 cached in .terraform/providers

Terraform uses external plugins to integrate with a variety of different
infrastructure services. To download the plugins required for this
configuration, run:
  terraform init
time=2024-08-21T23:34:43Z level=error msg=terraform invocation failed in /atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss error=[/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss] exit status 1 prefix=[/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds] 
time=2024-08-21T23:34:43Z level=info msg=Shutting down Terragrunt Cache server...
time=2024-08-21T23:34:43Z level=info msg=Terragrunt Cache server stopped
time=2024-08-21T23:34:43Z level=error msg=1 error occurred:
	* [/atlantis-data/repos/xxx/infra/infrastructure-as-code/11/default/aws-terraform/production/eu-central-1/xxx/rds/.terragrunt-cache/xoKOqiNukmpPRo3mBEmvkolrMgE/z_FacxGUMEuXC2vfXmG-YmYzcss] exit status 1

Environment details

ATLANTIS_CONTAINER: true
ATLANTIS_REPO_CONFIG: /etc/atlantis/repos.yaml
ATLANTIS_WRITE_GIT_CREDS: true # to enable cloning of private tf modules
ATLANTIS_HIDE_PREV_PLAN_COMMENTS: true
ATLANTIS_ENABLE_DIFF_MARKDOWN_FORMAT: true
ATLANTIS_SILENCE_NO_PROJECTS: true
ATLANTIS_QUIET_POLICY_CHECKS: true
ATLANTIS_SILENCE_VCS_STATUS_NO_PLANS: true
ATLANTIS_SKIP_CLONE_NO_CHANGES: true
ATLANTIS_EMOJI_REACTION: ":eyes:"
ATLANTIS_ALLOW_COMMANDS: "all"
ATLANTIS_USE_TF_PLUGIN_CACHE: "false"
# ATLANTIS_SLACK_TOKEN: placeholder
# Terragrunt
# https://terragrunt.gruntwork.io/docs/features/provider-cache/
TERRAGRUNT_PROVIDER_CACHE: 1

Atlantis server-side config file:

{{- $ENV := "development" -}}
plan:
  steps:
    - env:
        name: AWS_ACCESS_KEY_ID
        command: echo $DEVELOPMENT_AWS_ACCESS_KEY_ID
    - env:
        name: AWS_SECRET_ACCESS_KEY
        command: echo $DEVELOPMENT_AWS_SECRET_ACCESS_KEY
    - env:
        name: TERRAGRUNT_TFPATH
        command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
    - run: terragrunt plan --terragrunt-non-interactive -no-color -out=$PLANFILE $(printf '%s' $COMMENT_ARGS | sed 's/,/ /' | tr -d '\\')
    - run: terragrunt show -json $PLANFILE > $SHOWFILE
apply:
  steps:
    - env:
        name: AWS_ACCESS_KEY_ID
        command: echo $DEVELOPMENT_AWS_ACCESS_KEY_ID
    - env:
        name: AWS_SECRET_ACCESS_KEY
        command: echo $DEVELOPMENT_AWS_SECRET_ACCESS_KEY
    - env:
        name: TERRAGRUNT_TFPATH
        command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
    - run: terragrunt apply --terragrunt-non-interactive -no-color $PLANFILE
{{- /* */ -}}

Repo atlantis.yaml file:

# config file

Any other information you can provide about the environment/deployment (efs/nfs, aws/gcp, k8s/fargate, etc)
--->

Additional Context

@vitali-federau-monite vitali-federau-monite added the bug Something isn't working label Aug 21, 2024
@X-Guardian X-Guardian removed the bug Something isn't working label Aug 26, 2024
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

No branches or pull requests

2 participants