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

Update provider_reference.html.markdown with TFE help #4194

Closed
wants to merge 4 commits into from

Conversation

ausfestivus
Copy link

Updated to describe use of credentials in Terraform Cloud|Enterprise Workspaces.

Updated to describe use of credentials in Terraform Cloud|Enterprise Workspaces.
@mhamrah
Copy link

mhamrah commented Oct 10, 2019

+1

@ausfestivus
Copy link
Author

Hey @danawillow anything needed from me on this?

@danawillow
Copy link
Contributor

Sorry about that, I picked up the review right before I went on vacation for two weeks 😐 . Looks like this got out-of-date in the meantime, mind rebasing onto master?

@ChrisTomAlx
Copy link

ChrisTomAlx commented Feb 6, 2020

This information is important. Have been diving around many rabbit holes before I reached here. I hope this gets in soon for anyone else searching for this info

EDIT: Also it still isn't very clear. To add empty string replace \n with ''(two single quotes) and replace any " (double quote) with \"

eg :-

credentials = "{\"type\": \"service_account\", ,\"private_key\": \"-----BEGIN PRIVATE KEY-----''xxxxx''-----END PRIVATE KEY-----\"}"

Hope this helps someone
Thanks you :))

@ghost ghost removed the waiting-response label Feb 6, 2020
Updated to describe use of credentials in Terraform Cloud|Enterprise Workspaces.
# Conflicts:
#	website/docs/provider_reference.html.markdown
@ghost ghost added size/xl and removed size/xs labels Feb 23, 2020
@ausfestivus
Copy link
Author

Hey @danawillow Did I get that rebase right? I think I got it right. Still earning my Git stripes. :-p
Apols for the delay, been up to my eyeballs in some other repos lately.

@@ -0,0 +1,328 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this extra file ended up in here, but it can probably be removed from the commit

@@ -73,7 +73,7 @@ same configuration.
### Quick Reference

* `credentials` - (Optional) Either the path to or the contents of a
[service account key file] in JSON format. You can
[service account key file] in JSON format. If you're using the file contents, be sure you replace the line breaks with an empty string. You can
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this is true all the time, or just when using TFC or TFE?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the time- you're setting an environment variable which can't have linebreaks.

@ChrisTomAlx
Copy link

ChrisTomAlx commented Feb 25, 2020

@ausfestivus Could you put an example usage of credentials with file contents in the documentation as well. Since I still could not get it to work as expected

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this pull request Nov 5, 2020
Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this pull request Nov 5, 2020
Signed-off-by: Modular Magician <magic-modules@google.com>
@rileykarson
Copy link
Collaborator

Closing PR as stale (fyi @SarahFrench in case this is something we want to reraise)

@SarahFrench
Copy link
Member

It looks like the docs contain info about how to handle creds in TFC/TFE and there are instructions about needing to remove newlines:

2. Remove the newline characters from your JSON key file and then paste the credentials into the environment variable value field. You can use the tr command to strip newline characters. `cat key.json | tr -s '\n' ' '`

Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants