Radek Simko
0fe906fa8c
make copyrightfix
2026-02-17 13:56:34 +00:00
stephybun
c9d024062a
Generate Resource Config: set state in proto req ( #37895 )
...
build / Build for windows_amd64 (push) Blocked by required conditions
build / Build for freebsd_arm (push) Blocked by required conditions
build / Build for linux_arm (push) Blocked by required conditions
build / Build for darwin_arm64 (push) Blocked by required conditions
build / Build for linux_arm64 (push) Blocked by required conditions
build / Build for windows_arm64 (push) Blocked by required conditions
build / Build Docker image for linux_386 (push) Blocked by required conditions
build / Build Docker image for linux_amd64 (push) Blocked by required conditions
build / Build Docker image for linux_arm (push) Blocked by required conditions
build / Build Docker image for linux_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_386 (push) Blocked by required conditions
build / Build e2etest for windows_386 (push) Blocked by required conditions
build / Build e2etest for darwin_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_amd64 (push) Blocked by required conditions
build / Build e2etest for windows_amd64 (push) Blocked by required conditions
build / Build e2etest for linux_arm (push) Blocked by required conditions
build / Build e2etest for darwin_arm64 (push) Blocked by required conditions
build / Build e2etest for linux_arm64 (push) Blocked by required conditions
build / Run e2e test for linux_386 (push) Blocked by required conditions
build / Run e2e test for windows_386 (push) Blocked by required conditions
build / Run e2e test for darwin_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_amd64 (push) Blocked by required conditions
build / Run e2e test for windows_amd64 (push) Blocked by required conditions
build / Run e2e test for linux_arm (push) Blocked by required conditions
build / Run e2e test for linux_arm64 (push) Blocked by required conditions
build / Run terraform-exec test for linux amd64 (push) Blocked by required conditions
Quick Checks / Unit Tests (push) Waiting to run
Quick Checks / Race Tests (push) Waiting to run
Quick Checks / End-to-end Tests (push) Waiting to run
Quick Checks / Code Consistency Checks (push) Waiting to run
* marshal state and set in the proto req for generate resource config
* changelog
* set state in the proto req for generate resource config in plugin6
* add GRPC tests for GenerateResourceConfig
* remove changelog entry since this fix is backported to 1.14
2025-12-10 15:19:29 +01:00
Samsondeen
a7504719ef
list: send non-null "config" object to provider when not present in the list block ( #37620 )
2025-09-24 09:30:59 +02:00
Kristin Laemmert
df113486a1
actions: remove references to action types, linked resources ( #37616 )
...
* action renaming
* actions: remove references to action types
* actions: remove references to linked_resources or action types from the plan proto
2025-09-16 08:46:22 -04:00
Daniel Schmidt
871451122f
actions: move schema to single action type and remove linked resources
...
we want to leave the door open to evolve the design in the future based on feedback
2025-09-15 17:09:22 +02:00
Daniel Schmidt
176263d936
actions: remove future action types
...
removing them for now, this gives us more flexibility in the future since the schema is not yet locked in
2025-08-29 16:25:41 +02:00
Daniel Banck
2563b07813
Allow list events with only warnings ( #37415 )
...
This updates the event processing logic. Terraform now allows error and
warning diagnostics for list events with all other fields set to null.
The combination of a warning with a valid result is still possible.
2025-08-08 11:24:05 +02:00
Daniel Schmidt
a2ce38ce12
use gomock generated mocks for the action invoke stream API
2025-07-10 16:06:44 +02:00
Daniel Schmidt
ac132d1b15
add provider implementation for actions
2025-07-10 16:06:44 +02:00
Samsondeen
e178088a5b
unwrap nested config ( #37235 )
2025-06-13 13:28:19 +02:00
Samsondeen
cacd7861e5
add nested config block to list block ( #37229 )
2025-06-11 15:37:45 +02:00
Samsondeen
685ff9f192
Schema representation of list block config and results ( #37209 )
2025-06-10 20:08:54 +02:00
Daniel Banck
cb58a15f3d
Implement ListResource RPC (TF-25509) ( #37092 )
...
* Implement ListResource RPC via callbacks
* Implement ListResource with iterators
* Change `ListResourceResponse` to slice
* Turn ListResourceResponse into a struct
* Add a limit for ListResource
* explicitly cancel stream when listing resources
---------
Co-authored-by: Samsondeen Dare <samsondeen.dare@hashicorp.com>
2025-06-04 09:40:10 +02:00
Daniel Banck
44ae7da18e
Update Plugin Protocol for List and Implement ValidateListResourceConfig ( #37007 )
...
* Minor auto-formatting changes
* Add list RPC and schema protobuf definitions
* make protobuf
* make generate
* Add ValidateListResourceConfig implementation
2025-05-19 10:20:52 +02:00
Daniel Banck
421fe3580f
Check GetResourceIdentitySchemas diagnostics and return early ( #36999 )
2025-05-16 13:55:12 +02:00
Austin Valle
5c4c669882
Fix ImportResourceState RPC response decoding for identity data ( #36806 )
...
* Fix `ImportResourceState` RPC response decoding for identity data
* add tests for importy by identity
* re-run action for flakey UI test
2025-04-01 18:03:06 +02: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
James Bardin
6f5007efe7
grpc mock tests
2024-09-30 10:51:04 -04:00
Jeff Bonhag
8b2941455a
Upgrade go-tfe from 1.51.0 to 1.58.0 ( #35495 )
...
* go get github.com/hashicorp/go-tfe@v1.58.0
* Switch to go.uber.org/mock for mocks
2024-08-08 11:31:49 +02:00
Daniel Schmidt
5b8f77d2a4
stacks: add deferred actions to plugin protocol
...
We are moving the deferred reason from plans/deferring to providers
to have a single representation of deferred reason to be used from
providers to the plan. Using the plan's representation causes circular
dependencies.
Co-authored-by: Matej Risek <matej.risek@hashicorp.com>
2024-04-08 13:32:41 +02:00
Brian Flad
c7a44bfc9a
Support Private State with MoveResourceState ( #34575 )
...
This change ensures that providers receive the source private state and can store potentially differing private state as part of a move, rather than always copying the source private state to the target. This functionality has not yet been released and therefore there are no compatibility concerns.
2024-01-26 07:46:31 -05:00
James Bardin
f9713485a5
add mock tests for GetProviderSchemaOptional
2023-09-05 18:05:32 -04:00
hashicorp-copywrite[bot]
53c34ff49c
Update copyright file headers to BUSL-1.1
2023-08-10 23:43:27 +01:00
hashicorp-copywrite[bot]
325d18262e
[COMPLIANCE] Add Copyright and License Headers
2023-05-02 15:33:06 +00:00
Brian Flad
0b404f4a95
Return early on GetProviderSchema RPC responses with error diagnostics
...
Reference: https://github.com/hashicorp/terraform/issues/31047
Prevent potential panics and immediately return provider-defined errors diagnostics.
Previously:
```
--- FAIL: TestGRPCProvider_GetSchema_ResponseErrorDiagnostic (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x17fa752]
goroutine 13 [running]:
testing.tRunner.func1.2({0x191a100, 0x2236330})
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1392 +0x39f
panic({0x191a100, 0x2236330})
/usr/local/Cellar/go/1.18.2/libexec/src/runtime/panic.go:838 +0x207
github.com/hashicorp/terraform/internal/plugin6/convert.ProtoToConfigSchema(0x0)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/convert/schema.go:110 +0x52
github.com/hashicorp/terraform/internal/plugin6/convert.ProtoToProviderSchema(...)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/convert/schema.go:98
github.com/hashicorp/terraform/internal/plugin6.(*GRPCProvider).GetProviderSchema(0xc00004a200)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/grpc_provider.go:152 +0x29a
github.com/hashicorp/terraform/internal/plugin6.TestGRPCProvider_GetSchema_ResponseErrorDiagnostic(0x0?)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin6/grpc_provider_test.go:158 +0x265
testing.tRunner(0xc0001031e0, 0x1a733d8)
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1486 +0x35f
```
Previously:
```
--- FAIL: TestGRPCProvider_GetSchema_ResponseErrorDiagnostic (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x18a2732]
goroutine 7 [running]:
testing.tRunner.func1.2({0x1a5e720, 0x250be50})
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1392 +0x39f
panic({0x1a5e720, 0x250be50})
/usr/local/Cellar/go/1.18.2/libexec/src/runtime/panic.go:838 +0x207
github.com/hashicorp/terraform/internal/plugin/convert.ProtoToConfigSchema(0x0)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/convert/schema.go:104 +0x52
github.com/hashicorp/terraform/internal/plugin/convert.ProtoToProviderSchema(...)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/convert/schema.go:92
github.com/hashicorp/terraform/internal/plugin.(*GRPCProvider).GetProviderSchema(0xc00004a600)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/grpc_provider.go:149 +0x29a
github.com/hashicorp/terraform/internal/plugin.TestGRPCProvider_GetSchema_ResponseErrorDiagnostic(0x0?)
/Users/bflad/src/github.com/hashicorp/terraform/internal/plugin/grpc_provider_test.go:130 +0x265
testing.tRunner(0xc0001031e0, 0x1be9500)
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1486 +0x35f
```
2022-06-03 14:27:55 -04:00
Chris Arcand
369264865e
internal/plugin[6]: Add generated mocks
2021-10-28 20:16:26 -05:00
Martin Atkins
b40a4fb741
Move plugin/ and plugin6/ to internal/plugin{,6}/
...
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.
If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00