You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a number of commands which produce machine-readable output, which is consumed by other projects, e.g. CDKTF or Terraform LS.
On occasion, this output may contain relative links and it may not be always clear to the consumer what to do with those relative links, i.e. how to convert them into absolute ones.
Additionally, the documentation has moved to different hostnames or paths in the past (from terraform.io to developer.hashicorp.com/terraform) and the machine-readable output should be able to reflect that somehow.
Either replace all relative links with absolute, i.e. include the whole base URL beginning with https://developer.hashicorp.com, or
produce an additional field in all these commands, such as "baseUri": "https://developer.hashicorp.com/terraform"
Considerations
It is possible that these same commands may at some point end up as the source of truth for generated docs and it is likely that we want to retain the ability to produce relative links there.
The text was updated successfully, but these errors were encountered:
I find it kinda unfortunate that these URLs have ended up hard-coded in this way at all, but I don't really have a better idea for how to deal with it, so agree that we should accept that they are there and make them useful.
I don't really see much point in making the caller of these commands do relative URL resolution themselves, since either way both the base URL and the relative URL will be in this codebase. Therefore using absolute URLs seems like the simplest path both for our own implementation (we can treat each link independently under maintenance, and bulk-update them all together if we end up needing to) and for consumer ergonomics (so we can promise downstreams that we'll always give them absolute URLs and they don't need to worry about any local fixup logic).
We also keep old URLs redirecting to new URLs for a long as we possibly can after migrating content from place to place, so I'm not super concerned about the possibility of these moving to another place again.
There will of course still be some historical Terraform CLI releases that will emit relative URLs forever -- we're not going to retract them over this -- and so our own consumers like terraform-schema should probably have some support for resolving these relative to https://developer.hashicorp.com/ as hashicorp/terraform-schema#323 describes. But other consumers that don't need to support those older Terraform CLI versions can ignore it if they want to, once these older versions have become old enough to not be that concerning anymore.
Context
There is a number of commands which produce machine-readable output, which is consumed by other projects, e.g. CDKTF or Terraform LS.
On occasion, this output may contain relative links and it may not be always clear to the consumer what to do with those relative links, i.e. how to convert them into absolute ones.
Additionally, the documentation has moved to different hostnames or paths in the past (from
terraform.io
todeveloper.hashicorp.com/terraform
) and the machine-readable output should be able to reflect that somehow.This has surfaced recently in #34510
Proposal
https://developer.hashicorp.com
, or"baseUri": "https://developer.hashicorp.com/terraform"
Considerations
It is possible that these same commands may at some point end up as the source of truth for generated docs and it is likely that we want to retain the ability to produce relative links there.
The text was updated successfully, but these errors were encountered: