terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

TFE well-known endpoints not being used

Open hoo29 opened this issue 3 years ago • 5 comments

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

cdktf & Language Versions

0.11.2

Affected Resource(s)

cdktf cli npm package "@skorfmann/terraform-cloud"

Description

The API path in the underlying terraform cloud library is hardcoded to /api/v2 https://github.com/skorfmann/terraform-cloud/blob/ed3f22da9ccd7ae6fdc983633173deef3a07df2c/src/api/terraformCloudApiClient.ts#L6

This means TFE installations with custom paths specified at .well-known/terraform.json do not work as all calls return a 404.

Expected Behavior

The well-known configuration is used instead of hardcoded values.

References

  • #1854

hoo29 avatar Jun 23 '22 19:06 hoo29

An example of the well known endpoint is the main terraform cloud one at https://app.terraform.io/.well-known/terraform.json

hoo29 avatar Jun 24 '22 08:06 hoo29

Yeah that's not ideal, we are thinking about replacing our custom TFC API calls with Terraform so we can implement all the features once instead of twice, the issue is #1913

DanielMSchmidt avatar Jul 15 '22 11:07 DanielMSchmidt

@DanielMSchmidt - #1913 has been marked as resolved but I am still seeing the same error. Is this expected?

hoo29 avatar Sep 12 '22 11:09 hoo29

Yeah unfortunately it's expected. It's a bug we have been planning to fix by moving to Terraform directly for all TFC/TFE related interaction, but we haven't finalised the fix yet

DanielMSchmidt avatar Sep 12 '22 11:09 DanielMSchmidt

Ah okay, so there is more to it then just the plan and apply which was fixed in #1913. Is there an open issue for moving all operations to the terraform cli I can follow?

hoo29 avatar Sep 12 '22 11:09 hoo29

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Feb 04 '23 01:02 github-actions[bot]