hashicorp / aws-service-catalog-engine-for-tfc

Use to provision HashiCorp Terraform Cloud products in AWS Service Catalog
https://docs.aws.amazon.com/servicecatalog/latest/adminguide/getstarted-terraform-engine-cloud.html
Mozilla Public License 2.0
17 stars 15 forks source link

Naming Convention for project and workspace on TFC #26

Open ShitulGupta opened 3 months ago

ShitulGupta commented 3 months ago

Hi Team ,

We are using service catalog in our AWS account which provisions the products over TFC.

In TFC the workspace is created with a name like so "123557888-pp-2z3xxxxxxxxxxx7i2" wherein I think it follows this structure - -.

I wanted to understand if there is a way to give a more meaningful name to a workspace created in TFC when we initiate product provisioning in service catalog , this will help us better manage the workspaces created over TFC.

I see its generated by the TFC-RE resources and if I make tweaks locally what all files need to be modified and how can we ensure that it does not break if I want to use/upgrade to a newer version for this repository.

Additionally, would it be possible to add this feature of custom names for Project and Workspaces in TFC in this repository so that it's easier to use.

ShitulGupta commented 3 months ago

Hi team , any update here ?

SwiftEngineer commented 1 week ago

Hey @ShitulGupta, sorry for missing your issue.

As I'm sure you know, workspace names can't conflict and AWS Service Catalog needs to be able to "reconstruct" this workspace name from only the information it has. Additionally, the name of the workspace needs to be valid for Terraform Cloud, and this validation doesn't happen until after product creation has taken place, so the workspace name should either be guaranteed to be unique, or easily updated.

I'd be happy to hear any ideas for how to set the workspace name or product name. The first idea that comes to my head is an AWS Billing Tag, but that doesn't work because if you need to update the name, you won't have a historical view of what the name was before the update. That means that when AWS Service Catalog would go to update the workspace, it wouldn't have a way of knowing which workspace in TFC is the workspace for the product in question.