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

Consider not depending on the AWS provider for the S3 backend #17010

Closed
jen20 opened this issue Dec 29, 2017 · 6 comments
Closed

Consider not depending on the AWS provider for the S3 backend #17010

jen20 opened this issue Dec 29, 2017 · 6 comments

Comments

@jen20
Copy link
Contributor

jen20 commented Dec 29, 2017

Issue terraform-provider-aws#2745 arises from the S3 backend depending on the AWS provider repository, which in turn depends on this repository. I don't know of the update policy here, but the vendored version needs to be updated to deal with a new region, but no release has been made yet. It would be cleaner to implement the S3 backend directly in this repository rather than depending on the provider.

@jen20
Copy link
Contributor Author

jen20 commented Dec 30, 2017

hashicorp/terraform-provider-aws#2745 is related to this.

@jbardin
Copy link
Member

jbardin commented Jan 3, 2018

Hi @jen20,

We started using the provider code for the backend because there was a substantial chunk of initialization code that could be shared between the two, and it solved a number of open issues where behavior between the provider and backend would diverge slightly. I was thinking about moving the client types and initialization into a separate package for a little better modularity, but sharing the code has made keeping things in sync easier (minus vendoring of course). The GCS backend for example doesn't use the provider code, and took a lot of time recently to patch up to match the behavior of the provider.

Isn't #2745 just a matter of updating the aws provider in core for the next release?

@jen20
Copy link
Contributor Author

jen20 commented Jan 3, 2018

For #2745 it could be a case of just vendoring the updated code, but that depends on whether you're happy to have an unreleased dependency in the core. If so, it's straightforward. Another thing to consider might be delegating the back ends themselves to the provider plugins in order that you don't have to drag all the code around in core?

@jbardin
Copy link
Member

jbardin commented Jan 3, 2018

Yeah, it would be cleaner to only vendor released versions, but because the backend uses a small subset of the provider it may not be too big an issue to verify manually.

I've wanted to make backends pluggable for a while, and we've recently been brainstorming some options for how the RPC would work (backends will have to encompass more than just the "remote state" case). Once we have that ironed out, putting it in the provider may be good solution.

Thanks!

@bflad
Copy link
Contributor

bflad commented Apr 22, 2020

This was actually resolved awhile ago when we split off https://github.com/hashicorp/aws-sdk-go-base/ to handle the shared authentication bits between the Terraform S3 Backend and Terraform AWS Provider. Terraform Core now only depends on aws-sdk-go and that library, instead of terraform-provider-aws directly. 👍

@bflad bflad closed this as completed Apr 22, 2020
@ghost
Copy link

ghost commented May 23, 2020

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 May 23, 2020
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

4 participants