From cb557be1642ba6ce0eebec1c88063d7d51b1b3ba Mon Sep 17 00:00:00 2001 From: Dean Huynh Date: Wed, 6 Mar 2024 13:54:36 -0800 Subject: [PATCH] Add import docs and clean up docs for all resources and data sources (#97) --- docs/data-sources/destination.md | 4 +-- docs/data-sources/destination_metadata.md | 4 +-- docs/data-sources/role.md | 4 +-- docs/data-sources/source.md | 4 +-- docs/data-sources/source_metadata.md | 4 +-- docs/data-sources/tracking_plan.md | 4 +-- docs/data-sources/user.md | 4 +-- docs/data-sources/warehouse.md | 4 +-- docs/data-sources/warehouse_metadata.md | 4 +-- docs/data-sources/workspace.md | 4 +-- docs/resources/destination.md | 28 +++++++++++++++ docs/resources/destination_filter.md | 35 +++++++++++++++--- docs/resources/destination_subscription.md | 28 +++++++++++++++ docs/resources/function.md | 32 +++++++++++++++-- docs/resources/insert_function_instance.md | 28 +++++++++++++++ docs/resources/label.md | 32 +++++++++++++++-- docs/resources/profiles_warehouse.md | 32 ++++++++++++++--- docs/resources/reverse_etl_model.md | 28 +++++++++++++++ docs/resources/source.md | 28 +++++++++++++++ .../source_tracking_plan_connection.md | 32 +++++++++++++++-- docs/resources/source_warehouse_connection.md | 9 +++-- docs/resources/tracking_plan.md | 28 +++++++++++++++ docs/resources/transformation.md | 28 +++++++++++++++ docs/resources/user.md | 36 +++++++++++++++++-- docs/resources/user_group.md | 28 +++++++++++++++ docs/resources/warehouse.md | 32 +++++++++++++++-- go.mod | 4 ++- go.sum | 24 +++++++++++++ internal/provider/destination_data_source.go | 2 +- .../provider/destination_filter_resource.go | 6 ++-- .../destination_metadata_data_source.go | 2 +- internal/provider/destination_resource.go | 4 ++- .../destination_subscription_resource.go | 3 ++ internal/provider/docs/utils.go | 20 +++++++++++ internal/provider/function_resource.go | 4 ++- .../insert_function_instance_resource.go | 3 ++ internal/provider/label_resource.go | 4 ++- .../provider/profiles_warehouse_resource.go | 6 ++-- .../provider/reverse_etl_model_resource.go | 3 ++ internal/provider/role_data_source.go | 1 + internal/provider/source_data_source.go | 1 + .../provider/source_metadata_data_source.go | 2 +- internal/provider/source_resource.go | 3 ++ ...ource_tracking_plan_connection_resource.go | 4 ++- .../source_warehouse_connection_resource.go | 4 ++- .../provider/tracking_plan_data_source.go | 1 + internal/provider/tracking_plan_resource.go | 3 ++ internal/provider/transformation_resource.go | 3 ++ internal/provider/user_data_source.go | 2 +- internal/provider/user_group_resource.go | 3 ++ internal/provider/user_resource.go | 4 ++- internal/provider/warehouse_data_source.go | 2 +- .../warehouse_metadata_data_source.go | 2 +- internal/provider/warehouse_resource.go | 4 ++- internal/provider/workspace_data_source.go | 2 +- 55 files changed, 567 insertions(+), 63 deletions(-) create mode 100644 internal/provider/docs/utils.go diff --git a/docs/data-sources/destination.md b/docs/data-sources/destination.md index ef35489..ddd7bc8 100644 --- a/docs/data-sources/destination.md +++ b/docs/data-sources/destination.md @@ -3,12 +3,12 @@ page_title: "segment_destination Data Source - terraform-provider-segment" subcategory: "" description: |- - The destination + Reads a Destination. For more information, visit the Segment docs https://segment.com/docs/connections/destinations/. --- # segment_destination (Data Source) -The destination +Reads a Destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/). ## Example Usage diff --git a/docs/data-sources/destination_metadata.md b/docs/data-sources/destination_metadata.md index f13fc51..bce03d5 100644 --- a/docs/data-sources/destination_metadata.md +++ b/docs/data-sources/destination_metadata.md @@ -3,12 +3,12 @@ page_title: "segment_destination_metadata Data Source - terraform-provider-segment" subcategory: "" description: |- - The destination metadata + Reads a Destination metadata. For more information, visit the Segment docs https://segment.com/docs/connections/destinations/catalog/. --- # segment_destination_metadata (Data Source) -The destination metadata +Reads a Destination metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/catalog/). ## Example Usage diff --git a/docs/data-sources/role.md b/docs/data-sources/role.md index 2f807af..b344b13 100644 --- a/docs/data-sources/role.md +++ b/docs/data-sources/role.md @@ -3,12 +3,12 @@ page_title: "segment_role Data Source - terraform-provider-segment" subcategory: "" description: |- - + Reads a Role. For more information, visit the Segment docs https://segment.com/docs/segment-app/iam/roles/. --- # segment_role (Data Source) - +Reads a Role. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/roles/). ## Example Usage diff --git a/docs/data-sources/source.md b/docs/data-sources/source.md index c01a0fa..559a3f2 100644 --- a/docs/data-sources/source.md +++ b/docs/data-sources/source.md @@ -3,12 +3,12 @@ page_title: "segment_source Data Source - terraform-provider-segment" subcategory: "" description: |- - + Reads a Source. For more information, visit the Segment docs https://segment.com/docs/connections/sources/. --- # segment_source (Data Source) - +Reads a Source. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/). ## Example Usage diff --git a/docs/data-sources/source_metadata.md b/docs/data-sources/source_metadata.md index 28c2ada..41911e9 100644 --- a/docs/data-sources/source_metadata.md +++ b/docs/data-sources/source_metadata.md @@ -3,12 +3,12 @@ page_title: "segment_source_metadata Data Source - terraform-provider-segment" subcategory: "" description: |- - The source metadata + Reads a Source metadata. For more information, visit the Segment docs https://segment.com/docs/connections/sources/catalog/. --- # segment_source_metadata (Data Source) -The source metadata +Reads a Source metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/catalog/). ## Example Usage diff --git a/docs/data-sources/tracking_plan.md b/docs/data-sources/tracking_plan.md index b72844e..5f7e383 100644 --- a/docs/data-sources/tracking_plan.md +++ b/docs/data-sources/tracking_plan.md @@ -3,12 +3,12 @@ page_title: "segment_tracking_plan Data Source - terraform-provider-segment" subcategory: "" description: |- - + Configures a Tracking Plan. For more information, visit the Segment docs https://segment.com/docs/protocols/tracking-plan/create/. --- # segment_tracking_plan (Data Source) - +Configures a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/tracking-plan/create/). ## Example Usage diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index 17bc4aa..61a3ad6 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -3,12 +3,12 @@ page_title: "segment_user Data Source - terraform-provider-segment" subcategory: "" description: |- - A user belonging to a Segment Workspace. + Reads a user. For more information, visit the Segment docs https://segment.com/docs/segment-app/iam/concepts/#team-members. --- # segment_user (Data Source) -A user belonging to a Segment Workspace. +Reads a user. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#team-members). ## Example Usage diff --git a/docs/data-sources/warehouse.md b/docs/data-sources/warehouse.md index c1d01c9..ce6c0fc 100644 --- a/docs/data-sources/warehouse.md +++ b/docs/data-sources/warehouse.md @@ -3,12 +3,12 @@ page_title: "segment_warehouse Data Source - terraform-provider-segment" subcategory: "" description: |- - The warehouse + Configures a Warehouse. For more information, visit the Segment docs https://segment.com/docs/connections/storage/. --- # segment_warehouse (Data Source) -The warehouse +Configures a Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/). ## Example Usage diff --git a/docs/data-sources/warehouse_metadata.md b/docs/data-sources/warehouse_metadata.md index 0348268..9026241 100644 --- a/docs/data-sources/warehouse_metadata.md +++ b/docs/data-sources/warehouse_metadata.md @@ -3,12 +3,12 @@ page_title: "segment_warehouse_metadata Data Source - terraform-provider-segment" subcategory: "" description: |- - The warehouse metadata + Reads a Warehouse metadata. For more information, visit the Segment docs https://segment.com/docs/connections/storage/catalog/. --- # segment_warehouse_metadata (Data Source) -The warehouse metadata +Reads a Warehouse metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/catalog/). ## Example Usage diff --git a/docs/data-sources/workspace.md b/docs/data-sources/workspace.md index 31dd8c6..e2c2d91 100644 --- a/docs/data-sources/workspace.md +++ b/docs/data-sources/workspace.md @@ -3,12 +3,12 @@ page_title: "segment_workspace Data Source - terraform-provider-segment" subcategory: "" description: |- - The Workspace. + Reads the Workspace. --- # segment_workspace (Data Source) -The Workspace. +Reads the Workspace. ## Example Usage diff --git a/docs/resources/destination.md b/docs/resources/destination.md index a7dea2b..39c95b2 100644 --- a/docs/resources/destination.md +++ b/docs/resources/destination.md @@ -3,12 +3,40 @@ page_title: "segment_destination Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Destination. For more information, visit the Segment docs https://segment.com/docs/connections/destinations/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_destination.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_destination.example --- # segment_destination (Resource) +Configures a Destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: +```terraform +import { + to = segment_destination.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_destination.example +``` ## Example Usage diff --git a/docs/resources/destination_filter.md b/docs/resources/destination_filter.md index 5a61cb2..8eb37ca 100644 --- a/docs/resources/destination_filter.md +++ b/docs/resources/destination_filter.md @@ -3,15 +3,40 @@ page_title: "segment_destination_filter Resource - terraform-provider-segment" subcategory: "" description: |- - Destination filters let you send or block events, properties, and user traits from reaching a destination. Enabled filters are applied on every matching event in transit to this destination. - To import a Destination filter into Terraform, use the following format: 'destination-id:filter-id' + Configures a filter for a destination. For more information, visit the Segment docs https://segment.com/docs/connections/destinations/destination-filters/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with :. For example: + terraform + import { + to = segment_destination_filter.example + id = ":" + } + + Otherwise, use terraform import with :. For example: + console + terraform import segment_destination_filter.example : --- # segment_destination_filter (Resource) -Destination filters let you send or block events, properties, and user traits from reaching a destination. Enabled filters are applied on every matching event in transit to this destination. - - To import a Destination filter into Terraform, use the following format: 'destination-id:filter-id' +Configures a filter for a destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/destination-filters/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with `:`. For example: + +```terraform +import { + to = segment_destination_filter.example + id = ":" +} +``` + +Otherwise, use `terraform import` with `:`. For example: + +```console +terraform import segment_destination_filter.example : +``` ## Example Usage diff --git a/docs/resources/destination_subscription.md b/docs/resources/destination_subscription.md index 172cb53..dc6bed9 100644 --- a/docs/resources/destination_subscription.md +++ b/docs/resources/destination_subscription.md @@ -3,12 +3,40 @@ page_title: "segment_destination_subscription Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Destination subscription to an action. For more information, visit the Segment docs https://segment.com/docs/connections/destinations/actions/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_destination_subscription.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_destination_subscription.example --- # segment_destination_subscription (Resource) +Configures a Destination subscription to an action. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/actions/). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_destination_subscription.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_destination_subscription.example +``` ## Example Usage diff --git a/docs/resources/function.md b/docs/resources/function.md index eec2539..bb81cc5 100644 --- a/docs/resources/function.md +++ b/docs/resources/function.md @@ -3,12 +3,40 @@ page_title: "segment_function Resource - terraform-provider-segment" subcategory: "" description: |- - The function + Configures a Function. For more information, visit the Segment docs https://segment.com/docs/connections/functions/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_function.example + id = "" + } + + Otherwise, use terraform import with . For example: + console + terraform import segment_function.example --- # segment_function (Resource) -The function +Configures a Function. For more information, visit the [Segment docs](https://segment.com/docs/connections/functions/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_function.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_function.example +``` ## Example Usage diff --git a/docs/resources/insert_function_instance.md b/docs/resources/insert_function_instance.md index 2e65d13..fec2505 100644 --- a/docs/resources/insert_function_instance.md +++ b/docs/resources/insert_function_instance.md @@ -3,12 +3,40 @@ page_title: "segment_insert_function_instance Resource - terraform-provider-segment" subcategory: "" description: |- + Configures an Insert Function. For more information, visit the Segment docs https://segment.com/docs/connections/functions/insert-functions/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_insert_function_instance.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_insert_function_instance.example --- # segment_insert_function_instance (Resource) +Configures an Insert Function. For more information, visit the [Segment docs](https://segment.com/docs/connections/functions/insert-functions/). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_insert_function_instance.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_insert_function_instance.example +``` ## Example Usage diff --git a/docs/resources/label.md b/docs/resources/label.md index 2f9a6b4..9907176 100644 --- a/docs/resources/label.md +++ b/docs/resources/label.md @@ -3,12 +3,40 @@ page_title: "segment_label Resource - terraform-provider-segment" subcategory: "" description: |- - A label associated with the current Workspace. To import a label into Terraform, use the following format: 'key:value'. + Configures a Label. For more information, visit the Segment docs https://segment.com/docs/segment-app/iam/labels/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with :. For example: + terraform + import { + to = segment_label.example + id = ":" + } + + Otherwise, use terraform import with :. For example: + console + terraform import segment_label.example : --- # segment_label (Resource) -A label associated with the current Workspace. To import a label into Terraform, use the following format: 'key:value'. +Configures a Label. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/labels/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with `:`. For example: + +```terraform +import { + to = segment_label.example + id = ":" +} +``` + +Otherwise, use `terraform import` with `:`. For example: + +```console +terraform import segment_label.example : +``` ## Example Usage diff --git a/docs/resources/profiles_warehouse.md b/docs/resources/profiles_warehouse.md index d325bec..9d885f3 100644 --- a/docs/resources/profiles_warehouse.md +++ b/docs/resources/profiles_warehouse.md @@ -3,15 +3,37 @@ page_title: "segment_profiles_warehouse Resource - terraform-provider-segment" subcategory: "" description: |- - A Profiles Sync Warehouse is a central repository of data collected from your workspace. It is what commonly comes to mind when you think about a relational database: structured data that fits into rows and columns. - To import a Profiles Warehouse into Terraform, use the following format: 'space-id:warehouse-id' + Configures a Profiles Sync Warehouse. For more information, visit the Segment docs https://segment.com/docs/unify/profiles-sync/overview/.\n\n## Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with :. For example: + terraform + import { + to = segment_profiles_warehouse.example + id = ":" + } + + Otherwise, use terraform import with :. For example: + console + terraform import segment_profiles_warehouse.example : --- # segment_profiles_warehouse (Resource) -A Profiles Sync Warehouse is a central repository of data collected from your workspace. It is what commonly comes to mind when you think about a relational database: structured data that fits into rows and columns. - - To import a Profiles Warehouse into Terraform, use the following format: 'space-id:warehouse-id' +Configures a Profiles Sync Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/unify/profiles-sync/overview/).\n\n## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with `:`. For example: + +```terraform +import { + to = segment_profiles_warehouse.example + id = ":" +} +``` + +Otherwise, use `terraform import` with `:`. For example: + +```console +terraform import segment_profiles_warehouse.example : +``` ## Example Usage diff --git a/docs/resources/reverse_etl_model.md b/docs/resources/reverse_etl_model.md index d11f914..6414e8a 100644 --- a/docs/resources/reverse_etl_model.md +++ b/docs/resources/reverse_etl_model.md @@ -3,12 +3,40 @@ page_title: "segment_reverse_etl_model Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Reverse ETL Model. For more information, visit the Segment docs https://segment.com/docs/connections/reverse-etl/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_reverse_etl_model.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_reverse_etl_model.example --- # segment_reverse_etl_model (Resource) +Configures a Reverse ETL Model. For more information, visit the [Segment docs](https://segment.com/docs/connections/reverse-etl/). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_reverse_etl_model.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_reverse_etl_model.example +``` ## Example Usage diff --git a/docs/resources/source.md b/docs/resources/source.md index 11d9d7b..9593bd2 100644 --- a/docs/resources/source.md +++ b/docs/resources/source.md @@ -3,12 +3,40 @@ page_title: "segment_source Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Source. For more information, visit the Segment docs https://segment.com/docs/connections/sources/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_source.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_source.example --- # segment_source (Resource) +Configures a Source. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: +```terraform +import { + to = segment_source.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_source.example +``` ## Example Usage diff --git a/docs/resources/source_tracking_plan_connection.md b/docs/resources/source_tracking_plan_connection.md index 5a369a0..72f07ff 100644 --- a/docs/resources/source_tracking_plan_connection.md +++ b/docs/resources/source_tracking_plan_connection.md @@ -3,12 +3,40 @@ page_title: "segment_source_tracking_plan_connection Resource - terraform-provider-segment" subcategory: "" description: |- - Represents a connection between a Source and a Tracking Plan. To import a connection into Terraform, use the following format: 'sourceid:trackingplan_id'. + Configures a connection between a Source and a Tracking Plan. For more information, visit the Segment docs https://segment.com/docs/protocols/validate/connect-sources/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with :. For example: + terraform + import { + to = segment_source_tracking_plan_connection.example + id = ":" + } + + Otherwise, use terraform import with :. For example: + console + terraform import segment_source_tracking_plan_connection.example : --- # segment_source_tracking_plan_connection (Resource) -Represents a connection between a Source and a Tracking Plan. To import a connection into Terraform, use the following format: 'source_id:tracking_plan_id'. +Configures a connection between a Source and a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/validate/connect-sources/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with `:`. For example: + +```terraform +import { + to = segment_source_tracking_plan_connection.example + id = ":" +} +``` + +Otherwise, use `terraform import` with `:`. For example: + +```console +terraform import segment_source_tracking_plan_connection.example : +``` ## Example Usage diff --git a/docs/resources/source_warehouse_connection.md b/docs/resources/source_warehouse_connection.md index 0d34191..453cd1b 100644 --- a/docs/resources/source_warehouse_connection.md +++ b/docs/resources/source_warehouse_connection.md @@ -3,12 +3,17 @@ page_title: "segment_source_warehouse_connection Resource - terraform-provider-segment" subcategory: "" description: |- - Represents a connection between a source and a warehouse + Configures a connection between a source and a warehouse. + Import + This resource is not intended to be imported. Instead, you can create a new connection between the Source and the Warehouse, and any existing connections will be handled automatically. --- # segment_source_warehouse_connection (Resource) -Represents a connection between a source and a warehouse +Configures a connection between a source and a warehouse. + +## Import +This resource is not intended to be imported. Instead, you can create a new connection between the Source and the Warehouse, and any existing connections will be handled automatically. ## Example Usage diff --git a/docs/resources/tracking_plan.md b/docs/resources/tracking_plan.md index 06b91ca..a89f1ff 100644 --- a/docs/resources/tracking_plan.md +++ b/docs/resources/tracking_plan.md @@ -3,12 +3,40 @@ page_title: "segment_tracking_plan Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Tracking Plan. For more information, visit the Segment docs https://segment.com/docs/protocols/tracking-plan/create/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_tracking_plan.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_tracking_plan.example --- # segment_tracking_plan (Resource) +Configures a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/tracking-plan/create/). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_tracking_plan.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_tracking_plan.example +``` ## Example Usage diff --git a/docs/resources/transformation.md b/docs/resources/transformation.md index 7e81bdb..5dabb3e 100644 --- a/docs/resources/transformation.md +++ b/docs/resources/transformation.md @@ -3,12 +3,40 @@ page_title: "segment_transformation Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a Transformation. For more information, visit the Segment docs https://segment.com/docs/protocols/transform/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_transformation.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_transformation.example --- # segment_transformation (Resource) +Configures a Transformation. For more information, visit the [Segment docs](https://segment.com/docs/protocols/transform/). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_transformation.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_transformation.example +``` ## Example Usage diff --git a/docs/resources/user.md b/docs/resources/user.md index 3b7b9a2..8b84336 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -3,12 +3,44 @@ page_title: "segment_user Resource - terraform-provider-segment" subcategory: "" description: |- - A user or invite belonging to a Segment Workspace. Only users may be imported. + Configures a user or invite. For more information, visit the Segment docs https://segment.com/docs/segment-app/iam/concepts/#team-members. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_user.example + id = "" + } + + Otherwise, use terraform import with . For example: + console + terraform import segment_user.example + + Only users may be imported. --- # segment_user (Resource) -A user or invite belonging to a Segment Workspace. Only users may be imported. +Configures a user or invite. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#team-members). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_user.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_user.example +``` + + **Only users may be imported.** ## Example Usage diff --git a/docs/resources/user_group.md b/docs/resources/user_group.md index f889fc0..2ad747b 100644 --- a/docs/resources/user_group.md +++ b/docs/resources/user_group.md @@ -3,12 +3,40 @@ page_title: "segment_user_group Resource - terraform-provider-segment" subcategory: "" description: |- + Configures a User Group. For more information, visit the Segment docs https://segment.com/docs/segment-app/iam/concepts/#user-groups. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_user_group.example + id = "" + } + Otherwise, use terraform import with . For example: + console + terraform import segment_user_group.example --- # segment_user_group (Resource) +Configures a User Group. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#user-groups). +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_user_group.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_user_group.example +``` ## Example Usage diff --git a/docs/resources/warehouse.md b/docs/resources/warehouse.md index f514515..d800d58 100644 --- a/docs/resources/warehouse.md +++ b/docs/resources/warehouse.md @@ -3,12 +3,40 @@ page_title: "segment_warehouse Resource - terraform-provider-segment" subcategory: "" description: |- - The warehouse + Configures a Warehouse. For more information, visit the Segment docs https://segment.com/docs/connections/storage/. + Import + In Terraform v1.5.0 and later, use an import block https://developer.hashicorp.com/terraform/language/import with . For example: + terraform + import { + to = segment_warehouse.example + id = "" + } + + Otherwise, use terraform import with . For example: + console + terraform import segment_warehouse.example --- # segment_warehouse (Resource) -The warehouse +Configures a Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/). + +## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ``. For example: + +```terraform +import { + to = segment_warehouse.example + id = "" +} +``` + +Otherwise, use `terraform import` with ``. For example: + +```console +terraform import segment_warehouse.example +``` ## Example Usage diff --git a/go.mod b/go.mod index 6a0412d..80c2bfb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/segmentio/terraform-provider-segment -go 1.19 +go 1.21 + +toolchain go1.21.7 require ( github.com/avast/retry-go/v4 v4.5.1 diff --git a/go.sum b/go.sum index 81220e6..1a4d5df 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -8,6 +9,7 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= @@ -24,29 +26,38 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitfield/gotestdox v0.2.1 h1:Zj8IMLAO5/oiAKoMmtN96eyFiPZraJRTH2p0zDgtxc0= github.com/bitfield/gotestdox v0.2.1/go.mod h1:D+gwtS0urjBrzguAkTM2wodsTQYFHdpx8eqRJ3N+9pY= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git/v5 v5.10.1 h1:tu8/D8i+TWxgKpzQ3Vc43e+kkhXqtsZCKI/egajKnxk= +github.com/go-git/go-git/v5 v5.10.1/go.mod h1:uEuHjxkHap8kAl//V5F/nNWwqIYtP/402ddd05mp0wg= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -124,14 +135,20 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -160,21 +177,25 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/segmentio/public-api-sdk-go v0.0.0-20231114153454-3be55fde5c99 h1:55dfJRsEeZLLFln+0gQ1pNZvalFMyeMV9nTPQwShkok= github.com/segmentio/public-api-sdk-go v0.0.0-20231114153454-3be55fde5c99/go.mod h1:1mLoKkR7t90unwNx7qx9PicO3AX5NflFD7ny3TvLExU= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -185,6 +206,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -193,6 +215,7 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21 github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68= @@ -311,6 +334,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/provider/destination_data_source.go b/internal/provider/destination_data_source.go index 9892ee3..d1c684d 100644 --- a/internal/provider/destination_data_source.go +++ b/internal/provider/destination_data_source.go @@ -33,7 +33,7 @@ func (d *destinationDataSource) Metadata(_ context.Context, req datasource.Metad func (d *destinationDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The destination", + Description: "Reads a Destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The unique identifier of this instance of a Destination. Config API note: analogous to `name`.", diff --git a/internal/provider/destination_filter_resource.go b/internal/provider/destination_filter_resource.go index 6c206aa..1d1a2de 100644 --- a/internal/provider/destination_filter_resource.go +++ b/internal/provider/destination_filter_resource.go @@ -6,6 +6,7 @@ import ( "regexp" "strings" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -47,9 +48,8 @@ func (r *destinationFilterResource) Metadata(_ context.Context, req resource.Met // Schema defines the schema for the resource. func (r *destinationFilterResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: `Destination filters let you send or block events, properties, and user traits from reaching a destination. Enabled filters are applied on every matching event in transit to this destination. - - To import a Destination filter into Terraform, use the following format: 'destination-id:filter-id'`, + Description: "Configures a filter for a destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/destination-filters/).\n\n" + + docs.GenerateImportDocs(":", "segment_destination_filter"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/destination_metadata_data_source.go b/internal/provider/destination_metadata_data_source.go index c7ab9c2..137373d 100644 --- a/internal/provider/destination_metadata_data_source.go +++ b/internal/provider/destination_metadata_data_source.go @@ -379,7 +379,7 @@ func (d *destinationMetadataDataSource) Metadata(_ context.Context, req datasour // Schema defines the schema for the data source. func (d *destinationMetadataDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The destination metadata", + Description: "Reads a Destination metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/catalog/).", Attributes: destinationMetadataSchema(), } } diff --git a/internal/provider/destination_resource.go b/internal/provider/destination_resource.go index c41c72e..47ed98d 100644 --- a/internal/provider/destination_resource.go +++ b/internal/provider/destination_resource.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -48,7 +49,8 @@ func (r *destinationResource) Metadata(_ context.Context, req resource.MetadataR // Schema defines the schema for the resource. func (r *destinationResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "", + Description: "Configures a Destination. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/).\n\n" + + docs.GenerateImportDocs("", "segment_destination"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/destination_subscription_resource.go b/internal/provider/destination_subscription_resource.go index 8583794..4adcca4 100644 --- a/internal/provider/destination_subscription_resource.go +++ b/internal/provider/destination_subscription_resource.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -38,6 +39,8 @@ func (r *destinationSubscriptionResource) Metadata(_ context.Context, req resour func (r *destinationSubscriptionResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Destination subscription to an action. For more information, visit the [Segment docs](https://segment.com/docs/connections/destinations/actions/).\n\n" + + docs.GenerateImportDocs("", "segment_destination_subscription"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/docs/utils.go b/internal/provider/docs/utils.go new file mode 100644 index 0000000..4661de9 --- /dev/null +++ b/internal/provider/docs/utils.go @@ -0,0 +1,20 @@ +package docs + +func GenerateImportDocs(idFormat string, resourceName string) string { + return `## Import + +In Terraform v1.5.0 and later, use an [import block](https://developer.hashicorp.com/terraform/language/import) with ` + "`" + idFormat + "`" + `. For example: + +` + "```" + `terraform +import { + to = ` + resourceName + `.example + id = "` + idFormat + `" +} +` + "```" + ` + +Otherwise, use ` + "`terraform import`" + ` with ` + "`" + idFormat + "`" + `. For example: + +` + "```" + `console +terraform import ` + resourceName + `.example ` + idFormat + ` +` + "```" +} diff --git a/internal/provider/function_resource.go b/internal/provider/function_resource.go index adcf390..4dd18bc 100644 --- a/internal/provider/function_resource.go +++ b/internal/provider/function_resource.go @@ -5,6 +5,7 @@ import ( "fmt" "regexp" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" @@ -39,7 +40,8 @@ func (r *functionResource) Metadata(_ context.Context, req resource.MetadataRequ func (r *functionResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The function", + Description: "Configures a Function. For more information, visit the [Segment docs](https://segment.com/docs/connections/functions/).\n\n" + + docs.GenerateImportDocs("", "segment_function"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/insert_function_instance_resource.go b/internal/provider/insert_function_instance_resource.go index cad70d3..618c2a4 100644 --- a/internal/provider/insert_function_instance_resource.go +++ b/internal/provider/insert_function_instance_resource.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -38,6 +39,8 @@ func (r *insertFunctionInstanceResource) Metadata(_ context.Context, req resourc func (r *insertFunctionInstanceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures an Insert Function. For more information, visit the [Segment docs](https://segment.com/docs/connections/functions/insert-functions/).\n\n" + + docs.GenerateImportDocs("", "segment_insert_function_instance"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/label_resource.go b/internal/provider/label_resource.go index 25387bc..3aee3bf 100644 --- a/internal/provider/label_resource.go +++ b/internal/provider/label_resource.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/segmentio/public-api-sdk-go/api" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -55,7 +56,8 @@ func (r *labelResource) Metadata(_ context.Context, req resource.MetadataRequest func (r *labelResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "A label associated with the current Workspace. To import a label into Terraform, use the following format: 'key:value'.", + Description: "Configures a Label. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/labels/).\n\n" + + docs.GenerateImportDocs(":", "segment_label"), Attributes: map[string]schema.Attribute{ "key": schema.StringAttribute{ Description: "The key that represents the name of this label.", diff --git a/internal/provider/profiles_warehouse_resource.go b/internal/provider/profiles_warehouse_resource.go index c27cd7e..5d9dd0a 100644 --- a/internal/provider/profiles_warehouse_resource.go +++ b/internal/provider/profiles_warehouse_resource.go @@ -6,6 +6,7 @@ import ( "fmt" "strings" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -39,9 +40,8 @@ func (r *profilesWarehouseResource) Metadata(_ context.Context, req resource.Met func (r *profilesWarehouseResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: `A Profiles Sync Warehouse is a central repository of data collected from your workspace. It is what commonly comes to mind when you think about a relational database: structured data that fits into rows and columns. - - To import a Profiles Warehouse into Terraform, use the following format: 'space-id:warehouse-id'`, + Description: `Configures a Profiles Sync Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/unify/profiles-sync/overview/).\n\n` + + docs.GenerateImportDocs(":", "segment_profiles_warehouse"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ diff --git a/internal/provider/reverse_etl_model_resource.go b/internal/provider/reverse_etl_model_resource.go index fb2bbc6..99039fe 100644 --- a/internal/provider/reverse_etl_model_resource.go +++ b/internal/provider/reverse_etl_model_resource.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -37,6 +38,8 @@ func (r *reverseETLModelResource) Metadata(_ context.Context, req resource.Metad func (r *reverseETLModelResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Reverse ETL Model. For more information, visit the [Segment docs](https://segment.com/docs/connections/reverse-etl/).\n\n" + + docs.GenerateImportDocs("", "segment_reverse_etl_model"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/role_data_source.go b/internal/provider/role_data_source.go index 9ad0066..8b65e76 100644 --- a/internal/provider/role_data_source.go +++ b/internal/provider/role_data_source.go @@ -51,6 +51,7 @@ func (d *roleDataSource) Metadata(_ context.Context, req datasource.MetadataRequ func (d *roleDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Reads a Role. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/roles/).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/source_data_source.go b/internal/provider/source_data_source.go index 4a57eff..c65eb9b 100644 --- a/internal/provider/source_data_source.go +++ b/internal/provider/source_data_source.go @@ -52,6 +52,7 @@ func (d *sourceDataSource) Metadata(_ context.Context, req datasource.MetadataRe func (d *sourceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Reads a Source. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/source_metadata_data_source.go b/internal/provider/source_metadata_data_source.go index 9ac8122..65d0dd6 100644 --- a/internal/provider/source_metadata_data_source.go +++ b/internal/provider/source_metadata_data_source.go @@ -172,7 +172,7 @@ func sourceMetadataSchema() map[string]schema.Attribute { // Schema defines the schema for the data source. func (d *sourceMetadataDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The source metadata", + Description: "Reads a Source metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/catalog/).", Attributes: sourceMetadataSchema(), } } diff --git a/internal/provider/source_resource.go b/internal/provider/source_resource.go index 8735c23..d0d6615 100644 --- a/internal/provider/source_resource.go +++ b/internal/provider/source_resource.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -43,6 +44,8 @@ func (r *sourceResource) Metadata(_ context.Context, req resource.MetadataReques func (r *sourceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Source. For more information, visit the [Segment docs](https://segment.com/docs/connections/sources/).\n\n" + + docs.GenerateImportDocs("", "segment_source"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/source_tracking_plan_connection_resource.go b/internal/provider/source_tracking_plan_connection_resource.go index d27c3f8..553f877 100644 --- a/internal/provider/source_tracking_plan_connection_resource.go +++ b/internal/provider/source_tracking_plan_connection_resource.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" "github.com/segmentio/public-api-sdk-go/api" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" ) @@ -54,7 +55,8 @@ func (r *sourceTrackingPlanConnectionResource) ImportState(ctx context.Context, func (r *sourceTrackingPlanConnectionResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "Represents a connection between a Source and a Tracking Plan. To import a connection into Terraform, use the following format: 'source_id:tracking_plan_id'.", + Description: "Configures a connection between a Source and a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/validate/connect-sources/).\n\n" + + docs.GenerateImportDocs(":", "segment_source_tracking_plan_connection"), Attributes: map[string]schema.Attribute{ "source_id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/source_warehouse_connection_resource.go b/internal/provider/source_warehouse_connection_resource.go index b969697..69901ab 100644 --- a/internal/provider/source_warehouse_connection_resource.go +++ b/internal/provider/source_warehouse_connection_resource.go @@ -38,7 +38,9 @@ func (r *sourceWarehouseConnectionResource) Metadata(_ context.Context, req reso func (r *sourceWarehouseConnectionResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "Represents a connection between a source and a warehouse", + Description: "Configures a connection between a source and a warehouse.\n\n" + + `## Import +This resource is not intended to be imported. Instead, you can create a new connection between the Source and the Warehouse, and any existing connections will be handled automatically.`, Attributes: map[string]schema.Attribute{ "source_id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/tracking_plan_data_source.go b/internal/provider/tracking_plan_data_source.go index 18ab99f..43b47a7 100644 --- a/internal/provider/tracking_plan_data_source.go +++ b/internal/provider/tracking_plan_data_source.go @@ -50,6 +50,7 @@ func (d *trackingPlanDataSource) Metadata(_ context.Context, req datasource.Meta func (d *trackingPlanDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/tracking-plan/create/).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/tracking_plan_resource.go b/internal/provider/tracking_plan_resource.go index 615e1e8..95e1e0a 100644 --- a/internal/provider/tracking_plan_resource.go +++ b/internal/provider/tracking_plan_resource.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" @@ -38,6 +39,8 @@ func (r *trackingPlanResource) Metadata(_ context.Context, req resource.Metadata func (r *trackingPlanResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Tracking Plan. For more information, visit the [Segment docs](https://segment.com/docs/protocols/tracking-plan/create/).\n\n" + + docs.GenerateImportDocs("", "segment_tracking_plan"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/transformation_resource.go b/internal/provider/transformation_resource.go index 4b51a5b..94a3e3f 100644 --- a/internal/provider/transformation_resource.go +++ b/internal/provider/transformation_resource.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework/path" @@ -37,6 +38,8 @@ func (r *transformationResource) Metadata(_ context.Context, req resource.Metada func (r *transformationResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a Transformation. For more information, visit the [Segment docs](https://segment.com/docs/protocols/transform/).\n\n" + + docs.GenerateImportDocs("", "segment_transformation"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/user_data_source.go b/internal/provider/user_data_source.go index 9cfbec3..35154fc 100644 --- a/internal/provider/user_data_source.go +++ b/internal/provider/user_data_source.go @@ -50,7 +50,7 @@ func (d *userDataSource) Metadata(_ context.Context, req datasource.MetadataRequ func (d *userDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "A user belonging to a Segment Workspace.", + Description: "Reads a user. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#team-members).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/user_group_resource.go b/internal/provider/user_group_resource.go index 9222415..0a34770 100644 --- a/internal/provider/user_group_resource.go +++ b/internal/provider/user_group_resource.go @@ -5,6 +5,7 @@ import ( "fmt" "regexp" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" @@ -40,6 +41,8 @@ func (r *userGroupResource) Metadata(_ context.Context, req resource.MetadataReq func (r *userGroupResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ + Description: "Configures a User Group. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#user-groups).\n\n" + + docs.GenerateImportDocs("", "segment_user_group"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/user_resource.go b/internal/provider/user_resource.go index 2ea6162..2011401 100644 --- a/internal/provider/user_resource.go +++ b/internal/provider/user_resource.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/segmentio/public-api-sdk-go/api" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -48,7 +49,8 @@ func (r *userResource) Metadata(_ context.Context, req resource.MetadataRequest, func (r *userResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "A user or invite belonging to a Segment Workspace. Only users may be imported.", + Description: "Configures a user or invite. For more information, visit the [Segment docs](https://segment.com/docs/segment-app/iam/concepts/#team-members).\n\n" + + docs.GenerateImportDocs("", "segment_user") + "\n\n **Only users may be imported.**", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/warehouse_data_source.go b/internal/provider/warehouse_data_source.go index 4e199bb..2c3d912 100644 --- a/internal/provider/warehouse_data_source.go +++ b/internal/provider/warehouse_data_source.go @@ -33,7 +33,7 @@ func (d *warehouseDataSource) Metadata(_ context.Context, req datasource.Metadat func (d *warehouseDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The warehouse", + Description: "Configures a Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/).", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Required: true, diff --git a/internal/provider/warehouse_metadata_data_source.go b/internal/provider/warehouse_metadata_data_source.go index 3a67d96..9d3b407 100644 --- a/internal/provider/warehouse_metadata_data_source.go +++ b/internal/provider/warehouse_metadata_data_source.go @@ -160,7 +160,7 @@ func (d *warehouseMetadataDataSource) Read(ctx context.Context, req datasource.R // Schema defines the schema for the data source. func (d *warehouseMetadataDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The warehouse metadata", + Description: "Reads a Warehouse metadata. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/catalog/).", Attributes: warehouseMetadataSchema(), } } diff --git a/internal/provider/warehouse_resource.go b/internal/provider/warehouse_resource.go index ae4cef3..aac3e81 100644 --- a/internal/provider/warehouse_resource.go +++ b/internal/provider/warehouse_resource.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/segmentio/terraform-provider-segment/internal/provider/docs" "github.com/segmentio/terraform-provider-segment/internal/provider/models" "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" @@ -41,7 +42,8 @@ func (r *warehouseResource) Metadata(_ context.Context, req resource.MetadataReq func (r *warehouseResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The warehouse", + Description: "Configures a Warehouse. For more information, visit the [Segment docs](https://segment.com/docs/connections/storage/).\n\n" + + docs.GenerateImportDocs("", "segment_warehouse"), Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/workspace_data_source.go b/internal/provider/workspace_data_source.go index 427b75b..07970aa 100644 --- a/internal/provider/workspace_data_source.go +++ b/internal/provider/workspace_data_source.go @@ -36,7 +36,7 @@ func (d *workspaceDataSource) Metadata(_ context.Context, req datasource.Metadat func (d *workspaceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "The Workspace.", + Description: "Reads the Workspace.", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Computed: true,