-
Notifications
You must be signed in to change notification settings - Fork 87
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
Enable fetching of cf app binary bits by other TF providers #58
Comments
My first concern is that there is no provider for zipper, lib which used by terraform-provider-zipper, has been made to avoid download everything if a signature doesn't change (it tries to create the signature from a small chunk of data). This signature can be used like i was doing on the old cloud foundry provider (see: https://github.com/orange-cloudfoundry/terraform-provider-cloudfoundry/blob/master/resources/apps.go#L766-L773 ), Hashicorp are actually doing the same thing on AWS Lambda function as we can see here: https://www.terraform.io/docs/providers/aws/r/lambda_function.html (see paramaters Zipper might be the solution for both provider but there is another things which actually being used by hashicorp called go-getter. This is used to download modules for terraform but it could be used as a provider to download bits from different locations (we can see documentation about how to retrieve git archive in module documentation: https://www.terraform.io/docs/modules/sources.html#generic-git-repository ). I see 2 missing features on go-getter:
I would be greatly interested by your inputs @paultyng (specifically the last part about go-getter). |
…57 @mevansam could you do code review please ? I've removed inside `repo_manager.GetGitRepository` the ability to get back an already git cloned repository as temp directory can't be took again. I think it's not that much useful as we run terraform on a pipeline so git cloned is anyway always performed. Also, issue #58 address this problem to not download for nothing. About the cleaning, the way i fix it is definetely not the best way to do so but it seems that I will need to refactor `repo_manager`. Do you share this feeling @mevansam ?
@ArthurHlt I like the idea of having a separate provider like terraform-provider-zipper to do this rather than reusing go-getter, as I see that this capability may be useful for other providers that may require access to downloadable resources. |
…57 @mevansam could you do code review please ? I've removed inside `repo_manager.GetGitRepository` the ability to get back an already git cloned repository as temp directory can't be took again. I think it's not that much useful as we run terraform on a pipeline so git cloned is anyway always performed. Also, issue #58 address this problem to not download for nothing. About the cleaning, the way i fix it is definetely not the best way to do so but it seems that I will need to refactor `repo_manager`. Do you share this feeling @mevansam ?
Moving to 1.0 milestone as spawning the app artefact output out of cloudfoundry_application will be a breaking change. This should also help shrink the provider code base and avoid having to deal with logic such as #198 |
implemented on #203 |
This is a split of #38
In order to maintain good balance between:
We plan to mark the current
git
andgithub_release
attributes as deprecated, so that users can choose not to rely on them to avoid future backward incompatibility. In addition, illustrate how other focused providers can be used to fetch the app binaries. See https://github.com/ArthurHlt/terraform-provider-zipper for a suggestion by @ArthurHltcf_app.url
attribute as the documentation suggests below. Document the archive format (zip, gnu tar.gz). If possible, add test coverage into resource_cf_app_test.gocf_app.url
attribute specifying a local archive can be indeed combined with thecf_app.add_content
attribute. If possible, add test coverage into resource_cf_app_test.gotext/* or application/json content types
.git
andgithub_release
release attributes, explaining future support for other providers (Git, Github, HTTP)The text was updated successfully, but these errors were encountered: