Commit graph

85 commits

Author SHA1 Message Date
Mutahhir Hayat
05eeff8fbb Add failing test for deferred actions 2026-03-06 15:54:23 +01:00
Mutahhir Hayat
ffeff0914d Support for deferred action invocations in plan
We encovered that deferred action invocations don't get provider
addresses, which prevents us from loading the schema. That being said, I
think it shouldn't be an issue, but will come back to revisit this as we
build the support end to end.

Add a test for deferred actions support
2026-03-06 15:54:23 +01:00
Mutahhir Hayat
5b2f19abad Add failing test for deferred actions 2026-03-06 15:54:23 +01:00
Mutahhir Hayat
49feb6e86f Update naming to ResourceActionTrigger 2026-03-06 14:00:31 +01:00
Mutahhir Hayat
7e3d300670 Go formatting 2026-03-06 14:00:31 +01:00
Mutahhir Hayat
e133339a83 Add test for planned action invocation hooks, and ensuring the plan is valid 2026-03-06 14:00:31 +01:00
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Matej Risek
768b7bd0bc Add local values walk to walk_dynamic
This helps us catch diagnostics in locals that only happen during evaluation

Co-authored-by: Mutahhir Hayat <mutahhir.hayat@hashicorp.com>
Co-authored-by: Matej Risek <matej.risek@hashicorp.com>
2025-12-11 10:42:52 +01:00
Liam Cervante
b6be635748
stacks migrate: allow resource mapping to include nested resources (#37060)
* stacks migrate: allow resource mapping to include nested resources

* make protobuf
2025-05-16 10:10:47 +02:00
Liam Cervante
a80220dcc9
stacks: rename .tfstack files to .tfcomponent (#37013)
* stacks: rename .tfstack files to .tfcomponent

* fix consistency issues
2025-05-15 08:33:13 +02:00
Liam Cervante
dcff9e4d2c
stacks: improve test coverage for removed blocks (#36914)
* stacks: improve test coverage for removed blocks

* remove leftover comment
2025-04-24 09:22:50 +02:00
Liam Cervante
4eaa9d7fa0
stacks: removing embedded stacks should ignore stacks not in state (#36901) 2025-04-24 08:56:11 +02:00
Liam Cervante
2b5101f734
stacks: include existing components when deferring nested stacks (#36788)
* stacks: include existing components when deferring nested stacks

* improve comments
2025-04-03 10:40:28 +02:00
Liam Cervante
fbd5a7930e
stacks: allow removed blocks to target components in nested stacks (#36787)
* stacks: allow removed blocks to target components in nested stacks

* make copywrite fix

* fix comments
2025-04-03 10:29:18 +02:00
Liam Cervante
7fadbe34de
write-only attributes: internal providers should set write-only attributes to null (#36824)
* write-only attributes: internal providers should set write-only attributes to null

* add changelog

* fix copywrite headers
2025-04-02 15:58:42 +02:00
Liam Cervante
9bbe34daa4
stacks: pre-destroy refresh should use a normal plan (#36696)
* stacks: pre-destroy refresh should use a normal plan

* format
2025-03-18 09:28:31 +01:00
Daniel Schmidt
bc901abcc5 stacks: test resource identity 2025-03-12 14:46:50 +01:00
Daniel Banck
b2b42c0fb4
Store resource identities in state (TF-23255) (#36464)
* Persist resource identity in Terraform state

* make syncdeps

* Move identity schema merging closer to the protocol

* mock GetResourceIdentitySchemas

* Fix identity refresh tests

* Add more tests

* Change grcpwrap upgrade identity

* Review feedback

* Remove unnecessary version conversion

* Check if GetResourceIdentitySchemas RPC call is implemented

* Update function signature docs

* Adapt protocol changes

* Check unimplemented error for identities in GetSchema
2025-03-11 20:58:44 +01:00
Daniel Banck
10c9b64007
Rename schema.Block to Body (#36629) 2025-03-04 16:33:43 +01:00
Liam Cervante
a384d2daa7
stacks: fix deferred data sources and unknown component applies (#35876) 2024-10-22 11:23:53 +02:00
Liam Cervante
669e8ff1a6
stacks: skip full plan/apply cycles when deleting empty state (#35831) 2024-10-09 16:32:54 +02:00
Liam Cervante
bfa320c7b0
stacks: represent ephemeral inputs and outputs as null (#35824)
* stacks: represent ephemeral inputs and outputs as null

* quick fix: remove unnecessary check
2024-10-08 16:46:31 +02:00
James Bardin
384f2d4fab update collections to use for-range method 2024-10-04 11:22:44 -04:00
Liam Cervante
b38fd17cf9
stacks: emit removal notices for empty components (#35738)
* stacks: emit removal notices for empty components

* fix tests and checks
2024-09-18 10:41:36 +02:00
Liam Cervante
d142486a40
stacks: expand plan and apply outputs for inputs (#35724) 2024-09-16 11:45:19 +02:00
Liam Cervante
73e3f8096b
stacks: complete stack output implementation for plan and apply (#35723) 2024-09-16 11:36:36 +02:00
Liam Cervante
0ae6bc34c4
stacks: introduce shared functions for common tests (#35718) 2024-09-12 16:16:15 +02:00
Liam Cervante
99a94908e7
stacks: do not include removed block instances that do not exist in state (#35693)
* stacks: include a warning if a removed block targets a non-existent component

* check plan/apply stages separately

* no warning
2024-09-10 15:56:37 +02:00
Liam Cervante
6b2cc9c379
stacks: include existing instances for unknown removed and component blocks (#35691) 2024-09-10 08:59:04 +02:00
Liam Cervante
b22db510d4
stacks: error when removing a component still in config (#35692) 2024-09-10 08:50:09 +02:00
Liam Cervante
6f9df8f5eb
stacks: ensure that all components in state are referenced in configuration (#35677)
* stacks: ensure that all components in state are referenced by a component or resource block

* fix compile error
2024-09-07 14:54:32 +02:00
Liam Cervante
436b72b63b
stacks: fix memory leak caused by unclosed providers (#35678)
* stacks: make the mock provider error if it's not cleaned up

* stacks: start and clean up unconfigured clients once
2024-09-07 14:22:16 +02:00
James Bardin
0b8fbfe323 ignore unexported state field in comparison
and unify the options used to compare changes in tests
2024-08-22 09:39:37 -04:00
Liam Cervante
f1ae07b1af
stacks: add support for provider functions in .tfstack.hcl files (#35610)
* stacks: fix bug preventing cross-provider move refactorings

* also make provider functions work

* stacks: add support for provider functions in .tfstack.hcl files
2024-08-22 09:28:39 +02:00
Liam Cervante
964c64157c
stacks: fix bug preventing unconfigured clients within Terraform (#35571)
* stacks: fix bug preventing cross-provider move refactorings

* also make provider functions work
2024-08-22 09:20:47 +02:00
Liam Cervante
5939efb798
stacks: add depends_on for embedded stacks and components (#35549) 2024-08-12 15:02:36 +02:00
Liam Cervante
38033b5c45
stacks: sort diags in test before comparison (#35550) 2024-08-12 14:54:32 +02:00
Liam Cervante
33c0ae7f09
stacks: add additional provider validation tests (#35471) 2024-07-26 11:36:08 +02:00
Liam Cervante
e704da535e
stack: stacks should be applyable even if no components are (#35498) 2024-07-25 08:04:24 +02:00
Liam Cervante
87bbc47737
stacks: include plan mode in stacks plan format (#35405)
* stacks: include plan mode in stacks plan format

* fix tests

* fix missed files
2024-07-23 17:45:07 +02:00
Daniel Schmidt
05755422f3
stacks: pass dependency lock in tests 2024-07-03 14:42:25 +02:00
Liam Cervante
587a7e88ff
stacks: include move, forget, import counts in apply summaries (#35391) 2024-07-01 14:23:17 +02:00
Daniel Schmidt
b62a67394b
stacks: save plantimestamp to plan 2024-06-25 10:59:56 +02:00
Daniel Schmidt
8fa922f912
stacks: implement PlanTimestamp method on ExpressionScope
This allows us to set the plantimestamp methods value in
the stacks language
2024-06-24 17:19:18 +02:00
Liam Cervante
c0499647fa
stacks: include moved and removed in API (#35360)
* stacks: include moved and removed in API

* fix race test
2024-06-20 11:04:22 +02:00
Liam Cervante
b646dff26a
stacks: apply nested default values to inputs (#35349)
* stacks: apply nested default values to inputs

* group similar tests
2024-06-18 12:03:43 +02:00
Liam Cervante
284ce63947
stacks: applyable status should be dependent on applyable components (#35350) 2024-06-18 11:53:18 +02:00
Martin Atkins
e74896bd24 stackruntime: Handle apply-time-specified input variables
When the topmost stack configuration declares an ephemeral input variable,
its values must be provided separately for each of the plan and apply
phases.

Therefore here we extend the API to allow specifying input variable values
during the apply phase, and add rules to check whether all of the
apply-time-required input variables have been specified and whether any
non-ephemeral variables are either unspecified or re-specified with equal
values during the apply phase.

This also extends the FindStackConfigurationComponents response to include
more metadata about the input variables and output values so that a caller
can know which ones are ephemeral. The name of that RPC function had
already become a little too specific with the inclusion of embedded stack
information and is even moreso now; we might choose to rename it to
something more generic like "AnalyzeStackConfiguration" in future, but
that'd be a breaking change and therefore requires more coordination.
2024-06-17 08:34:46 -07:00
Liam Cervante
1bb78c14c2
deferred actions: always enable deferred actions in stacks (#35321) 2024-06-12 10:02:29 +02:00
Liam Cervante
fc390038f3
stacks: add tests for and refactor steps when a provider can't be configured (#35294) 2024-06-06 13:36:57 +02:00