Merged
Conversation
Some users may want to send headers along with the request, for example when authorization is requred.
to include tfstate+http and tfstate+https schemes
Codecov Report
@@ Coverage Diff @@
## main #335 +/- ##
==========================================
+ Coverage 69.19% 69.23% +0.03%
==========================================
Files 280 281 +1
Lines 5966 5993 +27
==========================================
+ Hits 4128 4149 +21
- Misses 1481 1486 +5
- Partials 357 358 +1
|
headers is more relevant since it's about adding multiple headers at a time.
…o feat/HTTPBackend
wbeuil
suggested changes
Mar 17, 2021
Contributor
wbeuil
left a comment
There was a problem hiding this comment.
Nice work ! I tested it with gitlab tutorial for state backend and I used my _gitlab_session cookie as Header. Just a small typo for me. Can you add something on your PR in the other repo driftctl-docs.
wbeuil
approved these changes
Mar 17, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement a way to fetch the Terraform state from a HTTP(s) URL. User may need to fetch the Terraform state file from an external HTTP endpoint such as public Git repository or CDN. User can pass custom headers to the request to handle any auth system. This can be useful when a user wants to try out a single manifest without granting access to a whole S3 bucket. This feature should be followed by the introduction of Git backend which should allow user to fetch multiple manifests from a Git repository with proper support of authentication etc.
Examples