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

Allow terraform cloud instances other than app.terraform.io #1671

Open
1 task done
Convez opened this issue Jan 17, 2024 · 4 comments · May be fixed by #1678
Open
1 task done

Allow terraform cloud instances other than app.terraform.io #1671

Convez opened this issue Jan 17, 2024 · 4 comments · May be fixed by #1678
Labels
enhancement New feature or request terraform-cloud Features or bugs related to TFC integration in the editor

Comments

@Convez
Copy link
Contributor

Convez commented Jan 17, 2024

Extension Version

v2.29.2

Problem Statement

Currently the terraform cloud part of the extension can handle the app.terraform.io instance of terraform cloud.

However, this doesn't take into account enterprise instances of terraform cloud.

Expected User Experience

It would be nice to be able to configure which instance of terraform cloud the extension is targetting.
Ideally it would also be possible to switch the "active profile".

Proposal

The simplest way would be a new settings field with the target instance hostname, or current active profile.

As the credentials.tfrc.json file already support multiple hosts, this file can be the source of the selection for the current "active profile".

Before the "Cloud authentication method" window appearing after clicking on the "Login to Terraform Cloud" button, an "Insert Terraform Cloud Hostname" window would appear

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@Convez Convez added the enhancement New feature or request label Jan 17, 2024
@radeksimko radeksimko added the terraform-cloud Features or bugs related to TFC integration in the editor label Jan 17, 2024
@jpogran
Copy link
Contributor

jpogran commented Jan 17, 2024

Hey @Convez, thanks for the feature suggestion! We agree, and created #1505 back at the start of our integration to track that.

I originally thought it would be a User/Workspace level setting, but I like the idea to pull the info from the TFC credentials file.

@plattenschieber
Copy link

I had the same idea, but stumbled upon another issue on my way. The terraform login command will save the credentials in another place than the extension is expecting on Windows: (cp.)

Terraform will store the token in plain text in the following file
for use by subsequent commands:
    C:\Users\xxx\AppData\Roaming\terraform.d\credentials.tfrc.json

@Convez
Copy link
Contributor Author

Convez commented Jan 23, 2024

I had the same idea, but stumbled upon another issue on my way. The terraform login command will save the credentials in another place than the extension is expecting on Windows: (cp.)

Terraform will store the token in plain text in the following file
for use by subsequent commands:
    C:\Users\xxx\AppData\Roaming\terraform.d\credentials.tfrc.json

Thanks for that, I'll update my PR.

@Convez Convez linked a pull request Jan 25, 2024 that will close this issue
@willjprice
Copy link

Is there a status update on this enhancement? I would love to be able to use this extension in my org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terraform-cloud Features or bugs related to TFC integration in the editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants