Skip to content

fix: use absolute URIs with terraform:// scheme for resources#274

Open
ZauberNerd wants to merge 1 commit intohashicorp:mainfrom
ZauberNerd:fix/absolute-resource-uris
Open

fix: use absolute URIs with terraform:// scheme for resources#274
ZauberNerd wants to merge 1 commit intohashicorp:mainfrom
ZauberNerd:fix/absolute-resource-uris

Conversation

@ZauberNerd
Copy link

Resource URIs were using relative paths like /terraform/style-guide which don't comply with the MCP specification, which requires resource URIs to be valid URIs per RFC 3986 (i.e., must include a scheme).

This changes the resource URIs to use the terraform:// scheme:

  • /terraform/style-guideterraform://guides/style-guide
  • /terraform/module-developmentterraform://guides/module-development

Also fixed the sub-resource URI construction for module-development which was using path.Join() that would incorrectly handle the :// in the URI scheme.

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@ZauberNerd ZauberNerd requested a review from a team as a code owner February 5, 2026 12:46
Resource URIs were using relative paths like `/terraform/style-guide`
which don't comply with the MCP specification. RFC 3986 requires URIs
to have a scheme.

This changes the resource URIs to use the `terraform://` scheme:
- `/terraform/style-guide` -> `terraform://guides/style-guide`
- `/terraform/module-development` -> `terraform://guides/module-development`

Also fixed the sub-resource URI construction for module-development
which was using path.Join() that would incorrectly handle the `://`
in the URI scheme.
@ZauberNerd ZauberNerd force-pushed the fix/absolute-resource-uris branch from 7a0a918 to b87762f Compare February 5, 2026 12:48
@jaylonmcshan19-x jaylonmcshan19-x self-assigned this Feb 10, 2026
@jaylonmcshan19-x
Copy link
Contributor

@ZauberNerd Thanks for the contribution! Will look into the PR this week, and will have a review by the EOW 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants