From 55e28ab95cb8e3f2c7eda4f5cb8be9afa6839999 Mon Sep 17 00:00:00 2001 From: bradcypert Date: Thu, 8 Jan 2026 17:27:21 -0500 Subject: [PATCH 1/2] Use callouts to highlight user action post-TF-generation --- docs/terraform/customize/plan-modification.mdx | 6 +++++- docs/terraform/customize/validation-dependencies.mdx | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/terraform/customize/plan-modification.mdx b/docs/terraform/customize/plan-modification.mdx index 7d7da62c..c3e51c39 100644 --- a/docs/terraform/customize/plan-modification.mdx +++ b/docs/terraform/customize/plan-modification.mdx @@ -3,6 +3,8 @@ title: "Plan Modification" description: "Learn how to customize Terraform plan behavior." --- +import { Callout } from "@/mdx/components"; + # Plan Modification ## Custom Attribute Plan Modification @@ -25,7 +27,9 @@ components: x-speakeasy-plan-modifiers: AgeModifier ``` -In this scenario, when Speakeasy next generates the Terraform provider, it will bootstrap a custom plan modifier file, located at `internal/planmodifiers/int64planmodifier/age_modifier.go`, and import the schema configuration wherever `x-speakeasy-plan-modifiers: AgeModifier` is referenced. + + Once you've added the `x-speakeasy-plan-modifiers` extension with a modifier, Speakeasy's next Terraform provider generation will bootstrap a custom plan modifier file. Using the previous YAML snippet as an example, the modifier will be located at `internal/planmodifiers/int64planmodifier/age_modifier.go`, and import the schema configuration wherever `x-speakeasy-plan-modifiers: AgeModifier` is referenced. + The `x-speakeasy-plan-modifiers` extension supports an array of names as well, such as: diff --git a/docs/terraform/customize/validation-dependencies.mdx b/docs/terraform/customize/validation-dependencies.mdx index 009789dc..8861bcf2 100644 --- a/docs/terraform/customize/validation-dependencies.mdx +++ b/docs/terraform/customize/validation-dependencies.mdx @@ -4,6 +4,8 @@ description: | Add custom validation logic and manage attribute dependencies in Terraform providers. --- +import { Callout } from "@/mdx/components"; + # Validation and Dependencies ## Prevent Conflicting Attributes @@ -163,8 +165,9 @@ components: type: integer x-speakeasy-plan-validators: AgeValidator ``` - -In this scenario, when Speakeasy next generates the Terraform provider, it will bootstrap a custom validator file located at `internal/validators/int64validators/age_validator.go`, and import the schema configuration wherever `x-speakeasy-plan-validators: AgeValidator` is referenced. You can modify the validator file to contain your logic. + + Once you've added the `x-speakeasy-plan-validators` extension with a modifier, Speakeasy's next Terraform provider generation will bootstrap a custom validator file. Using the previous YAML snippet as an example, the modifier will be located at `internal/validators/int64validators/age_validator.go`, and import the schema configuration wherever `x-speakeasy-plan-validators: AgeValidator` is referenced. You can modify the validator file to contain your logic. + #### Implementation Notes From 28ab75c5096058e2c11b4bc44cd766ad8dfb1e5c Mon Sep 17 00:00:00 2001 From: Brad Date: Fri, 9 Jan 2026 11:27:57 -0500 Subject: [PATCH 2/2] Fix duplicate heading in plan-modification documentation Removed duplicate heading for implementation notes. --- docs/terraform/customize/plan-modification.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/terraform/customize/plan-modification.mdx b/docs/terraform/customize/plan-modification.mdx index c3e51c39..86fe7375 100644 --- a/docs/terraform/customize/plan-modification.mdx +++ b/docs/terraform/customize/plan-modification.mdx @@ -41,8 +41,6 @@ x-speakeasy-plan-modifiers: ### Implementation Notes -### Implementation notes - A plan modifier is a type that implements the plan modifier interface defined by the `terraform-plugin-framework`. A unique plan modifier is bootstrapped in the appropriate subfolder for the Terraform type that it is applied to, which is usually one of the following: - `boolplanmodifiers`