-
Notifications
You must be signed in to change notification settings - Fork 157
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
default value for organization field #434
Comments
Thanks for this request. I agree that this could be convenient, especially in the popular case of having only one organization. I worry, though, about the possibility of applying changes to the wrong organization unintentionally with Terraform Enterprise users in particular, and users being confused by the type of error message (usually 404) that would be returned from the API for incorrect cross-org relationships. One way to overcome this burden is to wrap your tfe resources in a module that accepts an organization variable, then use that variable in all other resources. Would your config support that? Example main.tf module "tfe_team1" {
source "./team1"
organization = "foo"
} team1/variables.tf variable "organization" {
type = string
} team1/main.tf resource "tfe_workspace" "ws" {
organization = var.organization
...
} |
I am going to leave this open as a feature request, but I'd still be interested in hearing your thoughts. |
Hi! Thanks for the reply! I fixed my problem with using My developers use terraform almost without involving the platform team, so the solution you provided makes no difference, while it requires creating modules and pass variables to the modules. The main idea is that probably all other providers (aws, google) can set org_name/account_name/etc based on the org name specified in the provider definition. |
I'm convinced after looking through GCP's provider project config. Thanks for the additional details. |
@brandonc Would it be valuable as well to be able to set this up as an environment variable like the TFE/TFC token? ie |
@brandonc Thanks! It will help a lot! |
Hello. Great work on supporting TFE plugin.
I want to propose to set the default value for the
organization
field in multiple resources.Now I set the global variable
org_name
for all workspaces, but I need to declare this variable in each tf repo and then teach developers to use it (in keys they want to use tfe_outputs or other things).And I can't see any reason, why it can't have a default value - current organization name.
The text was updated successfully, but these errors were encountered: