terraform/internal/stacks/stackconfig/testdata/basics-bundle
James Pogran 2c075b9f8e
Add component registry source resolution support to Terraform Stacks (#37888)
* Add component registry source resolution support to Terraform Stacks

This change implements the missing component source resolution case in the stack configuration loader, enabling Terraform Stacks to properly handle component registry sources from HCP Terraform and other component registries.

The implementation mirrors the existing module registry resolution workflow, where component sources are first resolved to their versioned form using the source bundle's component metadata, then converted to final source addresses that can be used to locate the actual component code. This completes the integration between the terraform-registry-address component parsing capabilities and the go-slug sourcebundle component resolution APIs.

* chore: bump go-slug to v0.18.1

* fix: add case for component final source type

* chore: rm space

* chore: sync module deps

* chore: update testdata with separate bundle

* fix: manifest file json obj with trailing comma

* Add changelog entry to 1.14

---------

Co-authored-by: Michael Yocca <michael.yocca@hashicorp.com>
2025-12-10 09:16:03 -05:00
..
builtin stacks: Don't require built-in providers to be listed under required providers. (#37234) 2025-06-18 17:02:27 +02:00
errored stacks: rename .tfstack files to .tfcomponent (#37013) 2025-05-15 08:33:13 +02:00
errored-sources stacks: rename .tfstack files to .tfcomponent (#37013) 2025-05-15 08:33:13 +02:00
nested stacks: rename .tfstack files to .tfcomponent (#37013) 2025-05-15 08:33:13 +02:00
root stacks: rename .tfstack files to .tfcomponent (#37013) 2025-05-15 08:33:13 +02:00
README stackconfig: Initial HCL decoding logic 2023-11-15 12:38:51 -08:00
terraform-sources.json Add component registry source resolution support to Terraform Stacks (#37888) 2025-12-10 09:16:03 -05:00

This directory is a source bundle set up to behave as though it contains
the following remote source packages:

- git::https://example.com/root.git
- git::https://example.com/nested.git

The bundle also recognizes the following module registry address mapping:

- example.com/awesomecorp/nested/happycloud@1.0.0 -> git::https://example.com/nested.git//subdir
- example.com/awesomecorp/nested/happycloud@2.0.0 -> git::https://example.com/nested.git//intentionally-missing-v2

The following source addresses contain valid stack configurations when
interpreted trough this bundle:

- git::https://example.com/root.git
- git::https://example.com/nested.git//subdir
- example.com/awesomecorp/nested/happycloud if resolved with a version constraint that includes v1.0.0 and excludes v2.0.0

Requesting example.com/awesomecorp/nested/happycloud without a version
constraint that excludes v2.0.0 will select
git::https://example.com/nested.git//intentionally-missing-v2, which
as the name suggests is intentionally missing and so will cause configuration
loading to fail.

There's also a regular Terraform module at this address, usable as a component
implementation:

- git::https://example.com/nested.git