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

Feature Request : Module versioning for S3 source #21891

Closed
davzucky opened this issue Jun 26, 2019 · 3 comments
Closed

Feature Request : Module versioning for S3 source #21891

davzucky opened this issue Jun 26, 2019 · 3 comments

Comments

@davzucky
Copy link

Current Terraform Version : 0.12.2

Use-case

Versioned Module source has been added in Terraform for some of the sources #15613 as a solution of using interpolation for module source.

I need to have the ability to use a version using S3 backed. The idea is to use a source that looks like that :
"s3::https://s3-ap-southeast-1.amazonaws.com/my_bucket/modules/my_module.${var.my_module_version}.zip"

The ability to use version exist for git, terraform server, but not for GitHub or S3

Attempted Solutions

I tried a different pattern, however, because we cannot use string interpolation for module source, none of them worked.

The only solution I found is:

  • Use module source from the local file system, with static relative path
  • Having a script that downloads any module required from S3 locally using the expected version

This is working, that I find is working, however, it involves a pre-script to run which is not managed by terraform.

Proposal

The proposal would be to use a string pattern when we use the module source of type S3 and have a version.

module "my_module" {
     source = "s3::https://s3-ap-southeast-1.amazonaws.com/my_bucket/modules/my_module.${var.my_module_version}.zip"
     version = "0.1.0"
}

This would fetch https://s3-ap-southeast-1.amazonaws.com/my_bucket/modules/my_module.**0.1.0**.zip

The same idea could be used for local or https source

References

#15613
#1439

@rkst
Copy link

rkst commented Jun 26, 2019

@davzucky Hi - we're not currently looking at making sources specific to cloud vendors at this time. We're going to close this out for now but if we get enough interest from the community we can re-evaluate.

@rkst rkst closed this as completed Jun 26, 2019
@davzucky
Copy link
Author

@rkst Thank you for your reply. I understand that you don't want to make a source for cloud vendor specific.
What about HTTP ?

@ghost
Copy link

ghost commented Jul 27, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants