-
Notifications
You must be signed in to change notification settings - Fork 458
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
Terraform enterprise support for project scoped workspaces. #498
Comments
@mikhail-khodorovskiy , thanks for opening the issue. If I understand the problem correctly, the error is caused by how AFT workspace manager creates the Terraform workspace without specifying the project ID. As such the workspace always defaulted to the |
Yes, the error I get from the account customization code pipeline on the TFE api call is below:
After I create the project via TFC config terraform provider in another repository in the specific project with tags, the rerun of the pipeline succeeds. |
@wellsiau-aws , I was about to open a Feature Request then realized this conversation comes close enough to what I would like to propose, I will just word it from another angle. I think supporting a "terraform_project" or "terraform_project_id" input would be very beneficial to those using Terraform Cloud (on the same level as "terraform_distribution", "terraform_org_name" and "terraform_token"), let me elaborate with an example:
Hope this makes sense. Cheers! |
Make sense @jpablos11 , just had very similar conversation with another customer earlier last week. The consensus that I got is set note: not ideal, but you could potentially work-around this by using the post-API helper if this really bugging you. |
@wellsiau-aws , that sounds great and thank you for the quick response! Thank you also for the post-API helper idea, that might do for the time being. |
Describe the outcome you'd like
While setting up AFT module, we would like to use a Terraform project admin level token, not org admin level token and only create workspaces in that project as new per-account customizations pipelines are created.
Is your feature request related to a problem you are currently experiencing? If so, please describe.
In case the project-level admin token is used right now, the creation of the workspaces is failing. But, if the workspaces are created out-of-band in the correct project, the reruns of code pipeline succeed as it finds the workspaces with the project level token without problems.
Additional context
In our organization, we leverage terraform to mange our TFE tenant, and specifically https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/workspace to create workspaces. When the workspaces need to be created dynamically and not using the terraform model, we isolate those use cases to specific projects and that's why we would need AFT module to support the workspace creation to be done with the project scoped API token in the specified project.
The text was updated successfully, but these errors were encountered: