Azure/terraform-azurerm-avm-res-storage-storageaccount

Module currently broken on macOS due to duplicate pull request template

Closed this issue · 5 comments

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

greenfield

Terraform Version

1.7.4

Module Version

0.1.1

AzureRM Provider Version

3.95.0

Affected Resource(s)/Data Source(s)

azurerm_storage_account

Terraform Configuration Files

any

tfvars variables values

any

Debug Output/Panic Output

➜ terraform init

Initializing the backend...
Initializing modules...
Downloading registry.terraform.io/Azure/avm-res-keyvault-vault/azurerm 0.5.2 for key_vault...
- key_vault in .terraform/modules/key_vault
Downloading registry.terraform.io/Azure/avm-res-storage-storageaccount/azurerm 0.1.1 for storage_account...
Downloading registry.terraform.io/Azure/avm-res-network-virtualnetwork/azurerm 0.1.3 for virtual_network...
- virtual_network in .terraform/modules/virtual_network
╷
│ Error: Failed to download module
│
│   on avm.storage_account.tf line 1:
│    1: module "storage_account" {
│
│ Could not download module "storage_account" (avm.storage_account.tf:1) source code from
│ "git::https://github.com/Azure/terraform-azurerm-avm-res-storage-storageaccount?ref=8e2b1e197e15f2cfac6b8e89d5f721c38ba8f036": error downloading
│ 'https://github.com/Azure/terraform-azurerm-avm-res-storage-storageaccount?ref=8e2b1e197e15f2cfac6b8e89d5f721c38ba8f036': /usr/local/bin/git exited with 1: error: Your
│ local changes to the following files would be overwritten by checkout:
│       .github/PULL_REQUEST_TEMPLATE.md
│ Please commit your changes or stash them before you switch branches.
│ Aborting


### Expected Behaviour

The terraform project can be flawlessly initialized using the latest version of this module.

### Actual Behaviour

`terraform init` fails to install the module. After cloning the repo, switching to the tag v0.1.1 fails due to local modifications in this module.

The reason is obvious. The commit 3026ca7ed574b15eafa800da0a676174e577dcda some hours ago introduced by  github-actions[bot] adds the file `.github/PULL_REQUEST_TEMPLATE.md` while there is already a file `.github/pull_request_template.md`. On OSes that have a case-insensitive filesystem like macOS, this leads to a changed file as the two files differ the lower-case variant overwrites the upper-case variant. The working tree therefore has local modification and the switch to the tag v01.1. is not possible anymore, leading to the above error.

As this was introduced by an automation, I did not start a PR yet.

### Steps to Reproduce

_No response_

### Important Factoids

_No response_

### References

_No response_

This is the easiest to reporoduce/illustrate the issue:

Cloning into 'terraform-azurerm-avm-res-storage-storageaccount'...
remote: Enumerating objects: 460, done.
remote: Counting objects: 100% (239/239), done.
remote: Compressing objects: 100% (131/131), done.
remote: Total 460 (delta 168), reused 120 (delta 106), pack-reused 221
Receiving objects: 100% (460/460), 196.84 KiB | 1.29 MiB/s, done.
Resolving deltas: 100% (236/236), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  '.github/PULL_REQUEST_TEMPLATE.md'
  '.github/pull_request_template.md'

@mrolli Thanks for reaching out. We have identified the issue and fix is on the way.

@mrolli duplicate file has been removed from the directory. Please check and let me know.

Thank you for the quick fix. Now it works again.

@mrolli thanks for the update. I'll close the issue.