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

Simplify Terrform Backend configuration #66

Open
ankek opened this issue May 25, 2024 · 0 comments
Open

Simplify Terrform Backend configuration #66

ankek opened this issue May 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ankek
Copy link
Contributor

ankek commented May 25, 2024

Current configuration of TF Backend.
backend "http" {
username = "hs2d21pk"
password = "pO(BwDTjs5ND"
address = "http://localhost:4000/client/clivern/monitoring/prod/state"
lock_address = "http://localhost:4000/client/clivern/monitoring/prod/lock"
unlock_address = "http://localhost:4000/client/clivern/monitoring/prod/unlock"
lock_method = "POST"
unlock_method = "POST"
}

Desired configuration of TF Backend.

terraform {
backend "remote" {
hostname = "http://localhost:4000/api_path"
organization = "company"
token = "tXXkgPPOYDk4Sx5wxWtrXT4qPZxYq72yqOe2HpUQNjedW"
workspaces {
name = "clivern-monitoring-prod" # ${project}-${workspace}-${environment}
}
}

Additional context
I want to propose you use "remote" backend instead of "http". There are a lot of benefits like:

  • No need to create unique username and password for each environment in Project. Mostly project managed by team and you can create "team" token for authentication and authorization within team creation. Segregation and isolation resources created in one project could be based on environment definition (or workspace+environment, if you would have a will/chance/etc. to do this (-: ).
  • No need to redefine it in back-end configurations each time.
  • This is very brief explanation. Feel free to ping me if you will needed more details.
    Please find more details in
@Clivern Clivern added the enhancement New feature or request label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants