terraform-plugin-framework
terraform-plugin-framework copied to clipboard
A next-generation framework for building Terraform providers.
### Module version ```console % go list -m github.com/hashicorp/terraform-plugin-framework/... github.com/hashicorp/terraform-plugin-framework v0.1.0 ``` ### Actual Behavior The [`Plan.SetAttribute`](https://github.com/hashicorp/terraform-plugin-framework/blob/1a7927fec93459115be87f283dd1ee7941b30578/tfsdk/plan.go#L62) and [`State.SetAttribute`](https://github.com/hashicorp/terraform-plugin-framework/blob/1a7927fec93459115be87f283dd1ee7941b30578/tfsdk/state.go#L65) methods do not currently support setting a _Null_ value via `state.SetAttribute(ctx,...
### Module version ``` main@b0e3081ddbdab74c40ed0def9b8c23816a93d8fe ``` ### Use-cases Several types have semantically equivalent representations that are not byte-for-byte equivalent like Terraform requires. A JSON type comes to mind, in which...
Terraform Core allows a number of per-resource/data source _meta-arguments_ that override or enhance Terraform behaviors. The framework currently allows top-level schema attributes that conflict with these, causing who-knows-what (potentially silent)...
The `Provider.InternalValidate()` and `Resource.InternalValidate()` (which calls `schemaMap.InternalValidate()`, `Importer.InternalValidate()`) exported functions in `terraform-plugin-sdk` provide a way for callers to validate that, for example: - `Optional` and `Required` cannot both be set...
(I originally wrote up a longer version of this which included a lot more background information and historical context, but then when I submitted it GitHub encountered an error and...
It's very confusing to have `types.String` that doesn't define an actual type constraint, and instead holds a value. Maybe `types.StringValue` is clearer?
### Module version ``` v0.4.2 ``` ### Relevant provider source code ```go package provider import ( "context" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" ) type optionalTypesResourceType struct{} func (t optionalTypesResourceType) GetSchema(ctx context.Context) (tfsdk.Schema,...
### Module version ``` v0.4.2 ``` ### Use-cases As part of fixing #150, the `GetAttribute()` method on `Config`, `Plan`, and `State` will skip `tftypes.ErrInvalidStep` errors and instead return null values...
### Module version ``` 0.4.0 ``` ### Use-cases If the user has computed configuration provided to a provider: ```hcl resource "example_foo" "bar" { id = 123 } provider "example" {...
We use [go-cmp](https://github.com/google/go-cmp) pretty extensively in our tests to compare values. This works great, except when comparing diagnostics. As documented in google/go-cmp#279, our diagnostic detail output usually gets truncated, mostly...