hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.65k stars 9.55k forks source link

Support for Azure storage in module source #31358

Open fmuntean opened 2 years ago

fmuntean commented 2 years ago

I could not find any information on how to create my own source for modules. I see some are already built in but for example there is no support for Azure Storage where there is support for AWS storage. Can someone point me on the http url implementation ? and the S3:: implementation? I need to build my own that will allow me to call specific APIs which requires headers. I do not see how headers like API Keys can be passed using the HTTP URLs: https://www.terraform.io/language/modules/sources#http-urls

I like the approach done for S3 bucket where it is using the prefix s3:: but how can I handle my own prefix ?

jbardin commented 2 years ago

Hello,

We use GitHub issues for tracking bugs and enhancements, rather than for questions. While we can sometimes help with certain simple problems here, it's better to use the community forum where there are more people ready to help.

Thanks!

fmuntean commented 2 years ago

I think this is an enhancement request to bring the module source up to pair between AWS and Azure. It is not fair to support AWS storage but not the azure storage. It looks that you prefer the AWS over the Azure for module sources.

jbardin commented 2 years ago

Sorry @fmuntean, I did not notice that on first read. In the future it would help to use the provided issue templates, which definitely aide in the triage process.

In this case however, there are existing issues open with the go-getter package which handles the underlying connections for fetching modules. We can link https://github.com/hashicorp/go-getter/issues/33 and https://github.com/hashicorp/go-getter/issues/373 from here, and mark this as upstream to see what can be done.

Thanks!

bgmonroe commented 1 year ago

It looks like there is a PR submitted last year (hashicorp/go-getter#395) waiting for approval/merge that will fix the upstream dependancy. Not sure what the holdup is.

larsmaes-sogeti commented 1 year ago

My PR has been open for some time, but no one is doing anything with it. I do not know why and I do not know who to reach out for...

crw commented 1 year ago

@larsmaes-sogeti The basic problem is that go-getter is being used by multiple projects, and changes are made as discreetly as possible to avoid breaking something that winds up broken in all projects. In this case, as a result of the conversation on this issue I asked the Azure Provider team to review your PR. However, I can't guarantee they will get to it soon or approve. On the plus side, at least it is getting a little attention. We are aware of how shared libraries like go-getter often slow progress on some of these issues and have discussed solutions, but nothing specific to report on that right now.

tony-harverson-moonpig commented 4 months ago

@crw Is there any chance you could poke the maintainer again, and see if we can get that go-getter change merged? This is a fairly annoying hole in the functionality of terraform in Azure.

crw commented 4 months ago

The AzureRM Provider team are the maintainers, and I can and have passed the message along.

sam-bryant commented 2 months ago

I'm interested in using Azure storage as a module repository as well and would benefit from this request.