Closed senad-d closed 2 weeks ago
"This is a bug in Terraform and should be reported" - the error says, but actually please make sure that you specify the source with double slashes in the address and run "rm -rf .terraform" before running it:
module "iam_github_oidc_provider" {
source = "terraform-aws-modules/iam/aws//modules/iam-github-oidc-provider"
tags = {
Environment = "test"
}
}
The problem is with dubious ownership in repository
. I need to permit the download from the source by adding git config --global --add safe.directory
.
$ git config --global --add safe.directory <path/to/directory>/.terraform/modules/iam_github_oidc_provider
$ git config --global --add safe.directory <path/to/directory>/.terraform/modules/iam_github_oidc_role /app/source/github-openid/.terraform/modules/iam_github_oidc_role
Description
Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the
examples/*
directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by runningterraform init && terraform apply
without any further changes.If your request is for a new feature, please use the
Feature request
template.⚠️ Note
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Reproduction Code [Required]
On terraform init: Error: Unreadable module directory
The directory .terraform/modules/iam_github_oidc_provider/modules/iam-github-oidc-provider could not be read. This is a bug in Terraform and should be reported.
Steps to reproduce the behavior:
Expected behavior
Download module
Actual behavior
Can't download module
Terminal Output Screenshot(s)
Additional context