From 9ebaf1668eac894d7903fc7d7132c4e782158fc2 Mon Sep 17 00:00:00 2001 From: Stacey Salamon Date: Wed, 6 Mar 2024 14:42:44 +0100 Subject: [PATCH] docs: improve networking resource documentation --- docs/data-sources/aws_privatelink.md | 16 +++---- .../aws_vpc_peering_connection.md | 29 ++++++++----- docs/data-sources/azure_privatelink.md | 20 ++++----- .../azure_vpc_peering_connection.md | 31 +++++++++----- docs/data-sources/gcp_privatelink.md | 17 +++++--- .../gcp_vpc_peering_connection.md | 16 +++---- docs/data-sources/project_vpc.md | 19 ++++----- docs/resources/aws_privatelink.md | 18 ++++---- docs/resources/aws_vpc_peering_connection.md | 32 ++++++++------ docs/resources/azure_privatelink.md | 25 +++++------ .../azure_privatelink_connection_approval.md | 12 +++--- .../resources/azure_vpc_peering_connection.md | 42 +++++++++++-------- docs/resources/gcp_privatelink.md | 25 ++++++++--- .../gcp_privatelink_connection_approval.md | 28 ++++++++++--- docs/resources/gcp_vpc_peering_connection.md | 14 +++---- docs/resources/project_vpc.md | 14 +++---- .../aiven_aws_privatelink/data-source.tf | 6 +-- .../data-source.tf | 15 +++++-- .../aiven_azure_privatelink/data-source.tf | 6 +-- .../data-soruce.tf | 8 ---- .../data-source.tf | 8 ++++ .../aiven_gcp_privatelink/data-source.tf | 4 ++ .../data-source.tf | 6 +-- .../aiven_project_vpc/data-source.tf | 11 ++--- .../resources/aiven_aws_privatelink/import.sh | 2 +- .../aiven_aws_privatelink/resource.tf | 6 +-- .../import.sh | 2 +- .../resource.tf | 16 +++++-- .../aiven_azure_privatelink/import.sh | 2 +- .../aiven_azure_privatelink/resource.tf | 9 ++-- .../import.sh | 2 +- .../import.sh | 2 +- .../resource.tf | 20 +++++---- .../resources/aiven_gcp_privatelink/import.sh | 1 + .../aiven_gcp_privatelink/resource.tf | 4 ++ .../import.sh | 1 + .../resource.tf | 5 +++ .../resources/aiven_project_vpc/import.sh | 2 +- .../resources/aiven_project_vpc/resource.tf | 4 +- .../service/vpc/aws_privatelink.go | 8 ++-- .../vpc/aws_privatelink_data_source.go | 2 +- .../service/vpc/aws_vpc_peering_connection.go | 12 +++--- .../aws_vpc_peering_connection_data_source.go | 2 +- .../service/vpc/azure_privatelink.go | 12 +++--- .../azure_privatelink_connection_approve.go | 8 ++-- .../vpc/azure_privatelink_data_source.go | 2 +- .../vpc/azure_vpc_peering_connection.go | 18 ++++---- ...zure_vpc_peering_connection_data_source.go | 2 +- .../service/vpc/gcp_privatelink.go | 9 ++-- .../vpc/gcp_privatelink_connection_approve.go | 11 +++-- .../vpc/gcp_privatelink_data_source.go | 2 +- .../service/vpc/gcp_vpc_peering_connection.go | 12 +++--- .../sdkprovider/service/vpc/project_vpc.go | 6 +-- .../service/vpc/project_vpc_data_source.go | 8 ++-- 54 files changed, 355 insertions(+), 259 deletions(-) delete mode 100644 examples/data-sources/aiven_azure_vpc_peering_connection/data-soruce.tf create mode 100644 examples/data-sources/aiven_azure_vpc_peering_connection/data-source.tf create mode 100644 examples/data-sources/aiven_gcp_privatelink/data-source.tf create mode 100644 examples/resources/aiven_gcp_privatelink/import.sh create mode 100644 examples/resources/aiven_gcp_privatelink/resource.tf create mode 100644 examples/resources/aiven_gcp_privatelink_connection_approval/import.sh create mode 100644 examples/resources/aiven_gcp_privatelink_connection_approval/resource.tf diff --git a/docs/data-sources/aws_privatelink.md b/docs/data-sources/aws_privatelink.md index 136b68f23..4a9073563 100644 --- a/docs/data-sources/aws_privatelink.md +++ b/docs/data-sources/aws_privatelink.md @@ -3,19 +3,19 @@ page_title: "aiven_aws_privatelink Data Source - terraform-provider-aiven" subcategory: "" description: |- - The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services. + Gets information about an AWS PrivateLink connection for an Aiven service. --- # aiven_aws_privatelink (Data Source) -The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services. +Gets information about an AWS PrivateLink connection for an Aiven service. ## Example Usage ```terraform -data "aiven_aws_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +data "aiven_aws_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name } ``` @@ -29,7 +29,7 @@ data "aiven_aws_privatelink" "foo" { ### Read-Only -- `aws_service_id` (String) AWS service ID -- `aws_service_name` (String) AWS service name +- `aws_service_id` (String) AWS service ID. +- `aws_service_name` (String) AWS service name. - `id` (String) The ID of this resource. -- `principals` (Set of String) List of allowed principals +- `principals` (Set of String) List of the ARNs of the AWS accounts or IAM users allowed to connect to the VPC endpoint. diff --git a/docs/data-sources/aws_vpc_peering_connection.md b/docs/data-sources/aws_vpc_peering_connection.md index 0f816c2f8..e1de18565 100644 --- a/docs/data-sources/aws_vpc_peering_connection.md +++ b/docs/data-sources/aws_vpc_peering_connection.md @@ -3,20 +3,27 @@ page_title: "aiven_aws_vpc_peering_connection Data Source - terraform-provider-aiven" subcategory: "" description: |- - The AWS VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection. + Gets information about an AWS VPC peering connection. --- # aiven_aws_vpc_peering_connection (Data Source) -The AWS VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection. +Gets information about an AWS VPC peering connection. ## Example Usage ```terraform -data "aiven_aws_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - aws_account_id = "XXXXX" - aws_vpc_id = "XXXXX" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "google-europe-west1" + network_cidr = "192.168.1.0/24" +} + +data "aiven_aws_vpc_peering_connection" "aws_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + aws_account_id = var.aws_id + aws_vpc_id = "vpc-1a2b3c4d5e6f7g8h9" + aws_vpc_region = "aws-us-east-2" } ``` @@ -27,12 +34,12 @@ data "aiven_aws_vpc_peering_connection" "foo" { - `aws_account_id` (String) AWS account ID. Changing this property forces recreation of the resource. - `aws_vpc_id` (String) AWS VPC ID. Changing this property forces recreation of the resource. -- `aws_vpc_region` (String) AWS region of the peered VPC (if not in the same region as Aiven VPC). Changing this property forces recreation of the resource. -- `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. +- `aws_vpc_region` (String) The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource. +- `vpc_id` (String) The ID of the Aiven VPC. Changing this property forces recreation of the resource. ### Read-Only -- `aws_vpc_peering_connection_id` (String) AWS VPC peering connection ID +- `aws_vpc_peering_connection_id` (String) The ID of the AWS VPC peering connection. - `id` (String) The ID of this resource. -- `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `state` (String) The state of the peering connection. +- `state_info` (Map of String) State-specific help or error information. diff --git a/docs/data-sources/azure_privatelink.md b/docs/data-sources/azure_privatelink.md index 90bfe7575..4789efb99 100644 --- a/docs/data-sources/azure_privatelink.md +++ b/docs/data-sources/azure_privatelink.md @@ -3,19 +3,19 @@ page_title: "aiven_azure_privatelink Data Source - terraform-provider-aiven" subcategory: "" description: |- - The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services. + Gets information about an Azure Private Link connection for an Aiven service. --- # aiven_azure_privatelink (Data Source) -The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services. +Gets information about an Azure Private Link connection for an Aiven service. ## Example Usage ```terraform -data "aiven_azure_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +data "aiven_azure_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name } ``` @@ -29,9 +29,9 @@ data "aiven_azure_privatelink" "foo" { ### Read-Only -- `azure_service_alias` (String) Azure Privatelink service alias -- `azure_service_id` (String) Azure Privatelink service ID +- `azure_service_alias` (String) The Azure Private Link service alias. +- `azure_service_id` (String) The Azure Private Link service ID. - `id` (String) The ID of this resource. -- `message` (String) Printable result of the Azure Privatelink request -- `state` (String) Privatelink resource state -- `user_subscription_ids` (Set of String) A List of allowed Subscription IDs. Maximum length: `16`. +- `message` (String) Printable result of the Azure Private Link request. +- `state` (String) The state of the Private Link resource. +- `user_subscription_ids` (Set of String) A list of allowed subscription IDs. Maximum length: `16`. diff --git a/docs/data-sources/azure_vpc_peering_connection.md b/docs/data-sources/azure_vpc_peering_connection.md index 5cb616c8c..17ba06c2d 100644 --- a/docs/data-sources/azure_vpc_peering_connection.md +++ b/docs/data-sources/azure_vpc_peering_connection.md @@ -3,30 +3,41 @@ page_title: "aiven_azure_vpc_peering_connection Data Source - terraform-provider-aiven" subcategory: "" description: |- - The Azure VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection. + Gets information about about an Azure VPC peering connection. --- # aiven_azure_vpc_peering_connection (Data Source) -The Azure VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection. +Gets information about about an Azure VPC peering connection. +## Example Usage +```terraform +data "aiven_azure_vpc_peering_connection" "azure_to_aiven_peering" { + vpc_id = data.aiven_project_vpc.example_vpc.id + azure_subscription_id = "00000000-0000-0000-0000-000000000000" + peer_resource_group = "example-resource-group" + vnet_name = "example-vnet" + peer_azure_app_id = "00000000-0000-0000-0000-000000000000" + peer_azure_tenant_id = "00000000-0000-0000-0000-000000000000" +} +``` ## Schema ### Required -- `azure_subscription_id` (String) Azure Subscription ID. Changing this property forces recreation of the resource. -- `peer_azure_app_id` (String) Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet. Changing this property forces recreation of the resource. -- `peer_azure_tenant_id` (String) Azure tenant id in UUID4 form. Changing this property forces recreation of the resource. -- `peer_resource_group` (String) Azure resource group name of the peered VPC. Changing this property forces recreation of the resource. -- `vnet_name` (String) Azure Network name. Changing this property forces recreation of the resource. -- `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. +- `azure_subscription_id` (String) The ID of the Azure subscription in UUID4 format. Changing this property forces recreation of the resource. +- `peer_azure_app_id` (String) The ID of the Azure app that is allowed to create a peering to the Azure Virtual Network (VNet) in UUID4 format. Changing this property forces recreation of the resource. +- `peer_azure_tenant_id` (String) The Azure tenant ID in UUID4 format. Changing this property forces recreation of the resource. +- `peer_resource_group` (String) The name of the Azure resource group associated with the VNet. Changing this property forces recreation of the resource. +- `vnet_name` (String) The name of the Azure VNet. Changing this property forces recreation of the resource. +- `vpc_id` (String) The ID of the Aiven VPC. Changing this property forces recreation of the resource. ### Read-Only - `id` (String) The ID of this resource. -- `peering_connection_id` (String) Cloud provider identifier for the peering connection if available +- `peering_connection_id` (String) The ID of the cloud provider for the peering connection. - `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `state_info` (Map of String) State-specific help or error information. diff --git a/docs/data-sources/gcp_privatelink.md b/docs/data-sources/gcp_privatelink.md index ce42eb157..7ae5c871b 100644 --- a/docs/data-sources/gcp_privatelink.md +++ b/docs/data-sources/gcp_privatelink.md @@ -3,14 +3,21 @@ page_title: "aiven_gcp_privatelink Data Source - terraform-provider-aiven" subcategory: "" description: |- - The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink for a services. + Gets information about a Google Private Service Connect connection for an Aiven service. --- # aiven_gcp_privatelink (Data Source) -The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink for a services. +Gets information about a Google Private Service Connect connection for an Aiven service. +## Example Usage +```terraform +data "aiven_gcp_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name +} +``` ## Schema @@ -22,7 +29,7 @@ The GCP Privatelink resource allows the creation and management of Aiven GCP Pri ### Read-Only -- `google_service_attachment` (String) Privatelink resource Google Service Attachment +- `google_service_attachment` (String) Google Private Service Connect service attachment. - `id` (String) The ID of this resource. -- `message` (String) Printable result of the GCP Privatelink request -- `state` (String) Privatelink resource state +- `message` (String) Printable result of the Google Cloud Private Service Connect request. +- `state` (String) The state of the Private Service Connect resource. diff --git a/docs/data-sources/gcp_vpc_peering_connection.md b/docs/data-sources/gcp_vpc_peering_connection.md index 957df0928..90fcc34ef 100644 --- a/docs/data-sources/gcp_vpc_peering_connection.md +++ b/docs/data-sources/gcp_vpc_peering_connection.md @@ -13,10 +13,10 @@ The GCP VPC Peering Connection data source provides information about the existi ## Example Usage ```terraform -data "aiven_gcp_vpc_peering_connection" "foo" { +data "aiven_gcp_vpc_peering_connection" "main" { vpc_id = data.aiven_project_vpc.vpc.id - gcp_project_id = "xxxx" - peer_vpc = "xxxx" + gcp_project_id = "example-project" + peer_vpc = "example-network" } ``` @@ -25,13 +25,13 @@ data "aiven_gcp_vpc_peering_connection" "foo" { ### Required -- `gcp_project_id` (String) GCP project ID. Changing this property forces recreation of the resource. -- `peer_vpc` (String) GCP VPC network name. Changing this property forces recreation of the resource. +- `gcp_project_id` (String) Google Cloud project ID. Changing this property forces recreation of the resource. +- `peer_vpc` (String) Google Cloud VPC network name. Changing this property forces recreation of the resource. - `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. ### Read-Only - `id` (String) The ID of this resource. -- `self_link` (String) Computed GCP network peering link -- `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `self_link` (String) Computed Google Cloud network peering link. +- `state` (String) State of the peering connection. +- `state_info` (Map of String) State-specific help or error information. diff --git a/docs/data-sources/project_vpc.md b/docs/data-sources/project_vpc.md index 5feab8077..164b6d401 100644 --- a/docs/data-sources/project_vpc.md +++ b/docs/data-sources/project_vpc.md @@ -3,25 +3,20 @@ page_title: "aiven_project_vpc Data Source - terraform-provider-aiven" subcategory: "" description: |- - The Project VPC data source provides information about the existing Aiven Project VPC. + Gets information about the VPC for an Aiven project. --- # aiven_project_vpc (Data Source) -The Project VPC data source provides information about the existing Aiven Project VPC. +Gets information about the VPC for an Aiven project. ## Example Usage ```terraform -data "aiven_project_vpc" "myvpc" { - project = aiven_project.myproject.project +data "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project cloud_name = "google-europe-west1" } - -# Or -data "aiven_project_vpc" "myvpc_id" { - vpc_id = aiven_project_vpc.vpc.id -} ``` @@ -29,12 +24,12 @@ data "aiven_project_vpc" "myvpc_id" { ### Optional -- `cloud_name` (String) Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information. +- `cloud_name` (String) The cloud provider and region where the service is hosted in the format `CLOUD_PROVIDER-REGION_NAME`. For example, `google-europe-west1` or `aws-us-east-2`. - `project` (String) Identifies the project this resource belongs to. -- `vpc_id` (String) ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned. +- `vpc_id` (String) The ID of the VPC. This can be used to filter out the other VPCs if there are more than one for the project and cloud. ### Read-Only - `id` (String) The ID of this resource. -- `network_cidr` (String) Network address range used by the VPC like 192.168.0.0/24 +- `network_cidr` (String) Network address range used by the VPC. For example, `192.168.0.0/24`. - `state` (String) State of the VPC. The possible values are `APPROVED`, `ACTIVE`, `DELETING` and `DELETED`. diff --git a/docs/resources/aws_privatelink.md b/docs/resources/aws_privatelink.md index a91d91b56..adfe701e0 100644 --- a/docs/resources/aws_privatelink.md +++ b/docs/resources/aws_privatelink.md @@ -3,19 +3,19 @@ page_title: "aiven_aws_privatelink Resource - terraform-provider-aiven" subcategory: "" description: |- - The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services. + Creates and manages an AWS PrivateLink for Aiven services https://aiven.io/docs/platform/howto/use-aws-privatelinks in a VPC. --- # aiven_aws_privatelink (Resource) -The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services. +Creates and manages an [AWS PrivateLink for Aiven services](https://aiven.io/docs/platform/howto/use-aws-privatelinks) in a VPC. ## Example Usage ```terraform -resource "aiven_aws_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +resource "aiven_aws_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name principals = [ "arn:aws:iam::012345678901:user/mwf" @@ -28,7 +28,7 @@ resource "aiven_aws_privatelink" "foo" { ### Required -- `principals` (Set of String) List of allowed principals +- `principals` (Set of String) List of the ARNs of the AWS accounts or IAM users allowed to connect to the VPC endpoint. - `project` (String) Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. - `service_name` (String) Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. @@ -38,8 +38,8 @@ resource "aiven_aws_privatelink" "foo" { ### Read-Only -- `aws_service_id` (String) AWS service ID -- `aws_service_name` (String) AWS service name +- `aws_service_id` (String) AWS service ID. +- `aws_service_name` (String) AWS service name. - `id` (String) The ID of this resource. @@ -58,5 +58,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_aws_privatelink.foo project/service_name +terraform import aiven_aws_privatelink.main PROJECT/SERVICE_NAME ``` diff --git a/docs/resources/aws_vpc_peering_connection.md b/docs/resources/aws_vpc_peering_connection.md index 0415f1ddb..16253c5c4 100644 --- a/docs/resources/aws_vpc_peering_connection.md +++ b/docs/resources/aws_vpc_peering_connection.md @@ -3,20 +3,28 @@ page_title: "aiven_aws_vpc_peering_connection Resource - terraform-provider-aiven" subcategory: "" description: |- - The AWS VPC Peering Connection resource allows the creation and management of Aiven AWS VPC Peering Connections. + Creates and manages an AWS VPC peering connection with an Aiven VPC. --- # aiven_aws_vpc_peering_connection (Resource) -The AWS VPC Peering Connection resource allows the creation and management of Aiven AWS VPC Peering Connections. +Creates and manages an AWS VPC peering connection with an Aiven VPC. ## Example Usage ```terraform -resource "aiven_aws_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - aws_account_id = "XXXXX" - aws_vpc_id = "XXXXX" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "aws-us-east-2" + network_cidr = "192.168.1.0/24" +} + + +resource "aiven_aws_vpc_peering_connection" "aws_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + aws_account_id = var.aws_id + aws_vpc_id = "vpc-1a2b3c4d5e6f7g8h9" + aws_vpc_region = "aws-us-east-2" } ``` @@ -27,8 +35,8 @@ resource "aiven_aws_vpc_peering_connection" "foo" { - `aws_account_id` (String) AWS account ID. Changing this property forces recreation of the resource. - `aws_vpc_id` (String) AWS VPC ID. Changing this property forces recreation of the resource. -- `aws_vpc_region` (String) AWS region of the peered VPC (if not in the same region as Aiven VPC). Changing this property forces recreation of the resource. -- `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. +- `aws_vpc_region` (String) The AWS region of the peered VPC, if different from the Aiven VPC region. Changing this property forces recreation of the resource. +- `vpc_id` (String) The ID of the Aiven VPC. Changing this property forces recreation of the resource. ### Optional @@ -36,10 +44,10 @@ resource "aiven_aws_vpc_peering_connection" "foo" { ### Read-Only -- `aws_vpc_peering_connection_id` (String) AWS VPC peering connection ID +- `aws_vpc_peering_connection_id` (String) The ID of the AWS VPC peering connection. - `id` (String) The ID of this resource. -- `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `state` (String) The state of the peering connection. +- `state_info` (Map of String) State-specific help or error information. ### Nested Schema for `timeouts` @@ -57,5 +65,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_aws_vpc_peering_connection.foo project_name/vpc_id/aws_account_id/aws_vpc_id/aws_vpc_region +terraform import aiven_aws_vpc_peering_connection.aws_to_aiven_peering PROJECT/VPC_ID/AWS_ACCOUNT_ID/AWS_VPC_ID/AWS_VPC_REGION ``` diff --git a/docs/resources/azure_privatelink.md b/docs/resources/azure_privatelink.md index 3e3b0953c..acb160f3d 100644 --- a/docs/resources/azure_privatelink.md +++ b/docs/resources/azure_privatelink.md @@ -3,22 +3,23 @@ page_title: "aiven_azure_privatelink Resource - terraform-provider-aiven" subcategory: "" description: |- - The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services. + Creates and manages an Azure Private Link for selected Aiven services https://aiven.io/docs/platform/howto/use-azure-privatelink in a VPC. --- # aiven_azure_privatelink (Resource) -The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services. +Creates and manages an Azure Private Link for [selected Aiven services](https://aiven.io/docs/platform/howto/use-azure-privatelink) in a VPC. ## Example Usage ```terraform -resource "aiven_azure_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +resource "aiven_azure_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name + user_subscription_ids = [ - "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" + "00000000-0000-0000-0000-000000000000" ] } ``` @@ -30,7 +31,7 @@ resource "aiven_azure_privatelink" "foo" { - `project` (String) Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. - `service_name` (String) Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. -- `user_subscription_ids` (Set of String) A List of allowed Subscription IDs. Maximum length: `16`. +- `user_subscription_ids` (Set of String) A list of allowed subscription IDs. Maximum length: `16`. ### Optional @@ -38,11 +39,11 @@ resource "aiven_azure_privatelink" "foo" { ### Read-Only -- `azure_service_alias` (String) Azure Privatelink service alias -- `azure_service_id` (String) Azure Privatelink service ID +- `azure_service_alias` (String) The Azure Private Link service alias. +- `azure_service_id` (String) The Azure Private Link service ID. - `id` (String) The ID of this resource. -- `message` (String) Printable result of the Azure Privatelink request -- `state` (String) Privatelink resource state +- `message` (String) Printable result of the Azure Private Link request. +- `state` (String) The state of the Private Link resource. ### Nested Schema for `timeouts` @@ -60,5 +61,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_azure_privatelink.foo project/service_name +terraform import aiven_azure_privatelink.main PROJECT/SERVICE_NAME ``` diff --git a/docs/resources/azure_privatelink_connection_approval.md b/docs/resources/azure_privatelink_connection_approval.md index 6193c6238..8df7e518d 100644 --- a/docs/resources/azure_privatelink_connection_approval.md +++ b/docs/resources/azure_privatelink_connection_approval.md @@ -3,12 +3,12 @@ page_title: "aiven_azure_privatelink_connection_approval Resource - terraform-provider-aiven" subcategory: "" description: |- - The Azure privatelink approve resource waits for an aiven privatelink connection on a service and approves it with associated endpoint IP + Approves an Azure Private Link connection to an Aiven service with an associated endpoint IP. --- # aiven_azure_privatelink_connection_approval (Resource) -The Azure privatelink approve resource waits for an aiven privatelink connection on a service and approves it with associated endpoint IP +Approves an Azure Private Link connection to an Aiven service with an associated endpoint IP. ## Example Usage @@ -79,14 +79,14 @@ resource "aiven_azure_privatelink_connection_approval" "approval" { ### Optional -- `endpoint_ip_address` (String) IP address of Azure private endpoint +- `endpoint_ip_address` (String) IP address of Azure private endpoint. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) ### Read-Only - `id` (String) The ID of this resource. -- `privatelink_connection_id` (String) Privatelink connection id -- `state` (String) Privatelink connection state +- `privatelink_connection_id` (String) The ID of the Private Link connection. +- `state` (String) The state of the Private Link connection. ### Nested Schema for `timeouts` @@ -104,5 +104,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_azure_privatelink_connection_approval.approval project/service_name +terraform import aiven_azure_privatelink_connection_approval.approval PROJECT/SERVICE_NAME ``` diff --git a/docs/resources/azure_vpc_peering_connection.md b/docs/resources/azure_vpc_peering_connection.md index a516115d8..4ace739d6 100644 --- a/docs/resources/azure_vpc_peering_connection.md +++ b/docs/resources/azure_vpc_peering_connection.md @@ -3,23 +3,29 @@ page_title: "aiven_azure_vpc_peering_connection Resource - terraform-provider-aiven" subcategory: "" description: |- - The Azure VPC Peering Connection resource allows the creation and management of Aiven VPC Peering Connections. + Creates and manages an Azure VPC peering connection with an Aiven VPC. --- # aiven_azure_vpc_peering_connection (Resource) -The Azure VPC Peering Connection resource allows the creation and management of Aiven VPC Peering Connections. +Creates and manages an Azure VPC peering connection with an Aiven VPC. ## Example Usage ```terraform -resource "aiven_azure_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - azure_subscription_id = "xxxxxx" - peer_resource_group = "my-pr1" - vnet_name = "my-vnet1" - peer_azure_app_id = "xxxxxx" - peer_azure_tenant_id = "xxxxxx" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "google-europe-west1" + network_cidr = "192.168.1.0/24" +} + +resource "aiven_azure_vpc_peering_connection" "azure_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + azure_subscription_id = "00000000-0000-0000-0000-000000000000" + peer_resource_group = "example-resource-group" + vnet_name = "example-vnet" + peer_azure_app_id = "00000000-0000-0000-0000-000000000000" + peer_azure_tenant_id = "00000000-0000-0000-0000-000000000000" } ``` @@ -28,12 +34,12 @@ resource "aiven_azure_vpc_peering_connection" "foo" { ### Required -- `azure_subscription_id` (String) Azure Subscription ID. Changing this property forces recreation of the resource. -- `peer_azure_app_id` (String) Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet. Changing this property forces recreation of the resource. -- `peer_azure_tenant_id` (String) Azure tenant id in UUID4 form. Changing this property forces recreation of the resource. -- `peer_resource_group` (String) Azure resource group name of the peered VPC. Changing this property forces recreation of the resource. -- `vnet_name` (String) Azure Network name. Changing this property forces recreation of the resource. -- `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. +- `azure_subscription_id` (String) The ID of the Azure subscription in UUID4 format. Changing this property forces recreation of the resource. +- `peer_azure_app_id` (String) The ID of the Azure app that is allowed to create a peering to the Azure Virtual Network (VNet) in UUID4 format. Changing this property forces recreation of the resource. +- `peer_azure_tenant_id` (String) The Azure tenant ID in UUID4 format. Changing this property forces recreation of the resource. +- `peer_resource_group` (String) The name of the Azure resource group associated with the VNet. Changing this property forces recreation of the resource. +- `vnet_name` (String) The name of the Azure VNet. Changing this property forces recreation of the resource. +- `vpc_id` (String) The ID of the Aiven VPC. Changing this property forces recreation of the resource. ### Optional @@ -42,9 +48,9 @@ resource "aiven_azure_vpc_peering_connection" "foo" { ### Read-Only - `id` (String) The ID of this resource. -- `peering_connection_id` (String) Cloud provider identifier for the peering connection if available +- `peering_connection_id` (String) The ID of the cloud provider for the peering connection. - `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `state_info` (Map of String) State-specific help or error information. ### Nested Schema for `timeouts` @@ -62,5 +68,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_azure_vpc_peering_connection.foo project_name/vpc_id/azure_subscription_id/vnet_name +terraform import aiven_azure_vpc_peering_connection.azure_to_aiven_peering PROJECT/VPC_ID/AZURE_SUBSCRIPTION_ID/VNET_NAME ``` diff --git a/docs/resources/gcp_privatelink.md b/docs/resources/gcp_privatelink.md index 3d371919d..29c27a2a6 100644 --- a/docs/resources/gcp_privatelink.md +++ b/docs/resources/gcp_privatelink.md @@ -3,14 +3,21 @@ page_title: "aiven_gcp_privatelink Resource - terraform-provider-aiven" subcategory: "" description: |- - The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink for a services. + Creates and manages a Google Private Service Connect for an Aiven service in a VPC. --- # aiven_gcp_privatelink (Resource) -The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink for a services. +Creates and manages a Google Private Service Connect for an Aiven service in a VPC. +## Example Usage +```terraform +resource "aiven_gcp_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name +} +``` ## Schema @@ -26,10 +33,10 @@ The GCP Privatelink resource allows the creation and management of Aiven GCP Pri ### Read-Only -- `google_service_attachment` (String) Privatelink resource Google Service Attachment +- `google_service_attachment` (String) Google Private Service Connect service attachment. - `id` (String) The ID of this resource. -- `message` (String) Printable result of the GCP Privatelink request -- `state` (String) Privatelink resource state +- `message` (String) Printable result of the Google Cloud Private Service Connect request. +- `state` (String) The state of the Private Service Connect resource. ### Nested Schema for `timeouts` @@ -41,3 +48,11 @@ Optional: - `delete` (String) - `read` (String) - `update` (String) + +## Import + +Import is supported using the following syntax: + +```shell +terraform import aiven_gcp_privatelink.main PROJECT/SERVICE_NAME +``` diff --git a/docs/resources/gcp_privatelink_connection_approval.md b/docs/resources/gcp_privatelink_connection_approval.md index 8cc158b32..7b19bf5ff 100644 --- a/docs/resources/gcp_privatelink_connection_approval.md +++ b/docs/resources/gcp_privatelink_connection_approval.md @@ -3,14 +3,22 @@ page_title: "aiven_gcp_privatelink_connection_approval Resource - terraform-provider-aiven" subcategory: "" description: |- - The GCP privatelink approve resource waits for an aiven privatelink connection on a service and approves it with associated endpoint IP + Approves a Google Private Service Connect connection to an Aiven service with an associated endpoint IP. --- # aiven_gcp_privatelink_connection_approval (Resource) -The GCP privatelink approve resource waits for an aiven privatelink connection on a service and approves it with associated endpoint IP +Approves a Google Private Service Connect connection to an Aiven service with an associated endpoint IP. +## Example Usage +```terraform +resource "aiven_gcp_privatelink_connection_approval" "approve" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name + user_ip_address = "10.0.0.100" +} +``` ## Schema @@ -19,7 +27,7 @@ The GCP privatelink approve resource waits for an aiven privatelink connection o - `project` (String) Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. - `service_name` (String) Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. -- `user_ip_address` (String) Privatelink connection user IP address +- `user_ip_address` (String) The Private Service Connect connection user IP address. ### Optional @@ -28,9 +36,9 @@ The GCP privatelink approve resource waits for an aiven privatelink connection o ### Read-Only - `id` (String) The ID of this resource. -- `privatelink_connection_id` (String) Privatelink connection id -- `psc_connection_id` (String) Privatelink connection PSC connection id -- `state` (String) Privatelink connection state +- `privatelink_connection_id` (String) Aiven internal ID for the private link connection. +- `psc_connection_id` (String) The Google Private Service Connect connection ID. +- `state` (String) The state of the connection. ### Nested Schema for `timeouts` @@ -42,3 +50,11 @@ Optional: - `delete` (String) - `read` (String) - `update` (String) + +## Import + +Import is supported using the following syntax: + +```shell +terraform import aiven_gcp_privatelink.main PROJECT/SERVICE_NAME +``` diff --git a/docs/resources/gcp_vpc_peering_connection.md b/docs/resources/gcp_vpc_peering_connection.md index 0bea43b6a..5d9ef7109 100644 --- a/docs/resources/gcp_vpc_peering_connection.md +++ b/docs/resources/gcp_vpc_peering_connection.md @@ -3,12 +3,12 @@ page_title: "aiven_gcp_vpc_peering_connection Resource - terraform-provider-aiven" subcategory: "" description: |- - The GCP VPC Peering Connection resource allows the creation and management of Aiven GCP VPC Peering Connections. + Creates and manages a Google Cloud VPC peering connection. --- # aiven_gcp_vpc_peering_connection (Resource) -The GCP VPC Peering Connection resource allows the creation and management of Aiven GCP VPC Peering Connections. +Creates and manages a Google Cloud VPC peering connection. ## Example Usage @@ -25,8 +25,8 @@ resource "aiven_gcp_vpc_peering_connection" "foo" { ### Required -- `gcp_project_id` (String) GCP project ID. Changing this property forces recreation of the resource. -- `peer_vpc` (String) GCP VPC network name. Changing this property forces recreation of the resource. +- `gcp_project_id` (String) Google Cloud project ID. Changing this property forces recreation of the resource. +- `peer_vpc` (String) Google Cloud VPC network name. Changing this property forces recreation of the resource. - `vpc_id` (String) The VPC the peering connection belongs to. Changing this property forces recreation of the resource. ### Optional @@ -36,9 +36,9 @@ resource "aiven_gcp_vpc_peering_connection" "foo" { ### Read-Only - `id` (String) The ID of this resource. -- `self_link` (String) Computed GCP network peering link -- `state` (String) State of the peering connection -- `state_info` (Map of String) State-specific help or error information +- `self_link` (String) Computed Google Cloud network peering link. +- `state` (String) State of the peering connection. +- `state_info` (Map of String) State-specific help or error information. ### Nested Schema for `timeouts` diff --git a/docs/resources/project_vpc.md b/docs/resources/project_vpc.md index 568f21fb5..b3dd9d5df 100644 --- a/docs/resources/project_vpc.md +++ b/docs/resources/project_vpc.md @@ -3,18 +3,18 @@ page_title: "aiven_project_vpc Resource - terraform-provider-aiven" subcategory: "" description: |- - The Project VPC resource allows the creation and management of Aiven Project VPCs. + Creates and manages a VPC for an Aiven project. --- # aiven_project_vpc (Resource) -The Project VPC resource allows the creation and management of Aiven Project VPCs. +Creates and manages a VPC for an Aiven project. ## Example Usage ```terraform -resource "aiven_project_vpc" "myvpc" { - project = aiven_project.myproject.project +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project cloud_name = "google-europe-west1" network_cidr = "192.168.1.0/24" @@ -29,8 +29,8 @@ resource "aiven_project_vpc" "myvpc" { ### Required -- `cloud_name` (String) Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information. Changing this property forces recreation of the resource. -- `network_cidr` (String) Network address range used by the VPC like 192.168.0.0/24 +- `cloud_name` (String) The cloud provider and region where the service is hosted in the format `CLOUD_PROVIDER-REGION_NAME`. For example, `google-europe-west1` or `aws-us-east-2`. Changing this property forces recreation of the resource. +- `network_cidr` (String) Network address range used by the VPC. For example, `192.168.0.0/24`. - `project` (String) Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. ### Optional @@ -58,5 +58,5 @@ Optional: Import is supported using the following syntax: ```shell -terraform import aiven_project_vpc.myvpc project/id +terraform import aiven_project_vpc.example_vpc PROJECT/ID ``` diff --git a/examples/data-sources/aiven_aws_privatelink/data-source.tf b/examples/data-sources/aiven_aws_privatelink/data-source.tf index 1b4e23272..7883e2cb7 100644 --- a/examples/data-sources/aiven_aws_privatelink/data-source.tf +++ b/examples/data-sources/aiven_aws_privatelink/data-source.tf @@ -1,5 +1,5 @@ -data "aiven_aws_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +data "aiven_aws_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name } diff --git a/examples/data-sources/aiven_aws_vpc_peering_connection/data-source.tf b/examples/data-sources/aiven_aws_vpc_peering_connection/data-source.tf index 943e3c462..cd43479b3 100644 --- a/examples/data-sources/aiven_aws_vpc_peering_connection/data-source.tf +++ b/examples/data-sources/aiven_aws_vpc_peering_connection/data-source.tf @@ -1,5 +1,12 @@ -data "aiven_aws_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - aws_account_id = "XXXXX" - aws_vpc_id = "XXXXX" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "google-europe-west1" + network_cidr = "192.168.1.0/24" +} + +data "aiven_aws_vpc_peering_connection" "aws_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + aws_account_id = var.aws_id + aws_vpc_id = "vpc-1a2b3c4d5e6f7g8h9" + aws_vpc_region = "aws-us-east-2" } diff --git a/examples/data-sources/aiven_azure_privatelink/data-source.tf b/examples/data-sources/aiven_azure_privatelink/data-source.tf index b61c390b5..276af17c2 100644 --- a/examples/data-sources/aiven_azure_privatelink/data-source.tf +++ b/examples/data-sources/aiven_azure_privatelink/data-source.tf @@ -1,5 +1,5 @@ -data "aiven_azure_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +data "aiven_azure_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name } diff --git a/examples/data-sources/aiven_azure_vpc_peering_connection/data-soruce.tf b/examples/data-sources/aiven_azure_vpc_peering_connection/data-soruce.tf deleted file mode 100644 index e9aaaf3e1..000000000 --- a/examples/data-sources/aiven_azure_vpc_peering_connection/data-soruce.tf +++ /dev/null @@ -1,8 +0,0 @@ -data "aiven_azure_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - azure_subscription_id = "xxxxxx" - peer_resource_group = "my-pr1" - vnet_name = "my-vnet1" - peer_azure_app_id = "xxxxxx" - peer_azure_tenant_id = "xxxxxx" -} diff --git a/examples/data-sources/aiven_azure_vpc_peering_connection/data-source.tf b/examples/data-sources/aiven_azure_vpc_peering_connection/data-source.tf new file mode 100644 index 000000000..24aed7696 --- /dev/null +++ b/examples/data-sources/aiven_azure_vpc_peering_connection/data-source.tf @@ -0,0 +1,8 @@ +data "aiven_azure_vpc_peering_connection" "azure_to_aiven_peering" { + vpc_id = data.aiven_project_vpc.example_vpc.id + azure_subscription_id = "00000000-0000-0000-0000-000000000000" + peer_resource_group = "example-resource-group" + vnet_name = "example-vnet" + peer_azure_app_id = "00000000-0000-0000-0000-000000000000" + peer_azure_tenant_id = "00000000-0000-0000-0000-000000000000" +} diff --git a/examples/data-sources/aiven_gcp_privatelink/data-source.tf b/examples/data-sources/aiven_gcp_privatelink/data-source.tf new file mode 100644 index 000000000..ecd93269d --- /dev/null +++ b/examples/data-sources/aiven_gcp_privatelink/data-source.tf @@ -0,0 +1,4 @@ +data "aiven_gcp_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name +} diff --git a/examples/data-sources/aiven_gcp_vpc_peering_connection/data-source.tf b/examples/data-sources/aiven_gcp_vpc_peering_connection/data-source.tf index 56041d25f..e54a6a865 100644 --- a/examples/data-sources/aiven_gcp_vpc_peering_connection/data-source.tf +++ b/examples/data-sources/aiven_gcp_vpc_peering_connection/data-source.tf @@ -1,5 +1,5 @@ -data "aiven_gcp_vpc_peering_connection" "foo" { +data "aiven_gcp_vpc_peering_connection" "main" { vpc_id = data.aiven_project_vpc.vpc.id - gcp_project_id = "xxxx" - peer_vpc = "xxxx" + gcp_project_id = "example-project" + peer_vpc = "example-network" } diff --git a/examples/data-sources/aiven_project_vpc/data-source.tf b/examples/data-sources/aiven_project_vpc/data-source.tf index 9fe8ea1d7..7bf6d543a 100644 --- a/examples/data-sources/aiven_project_vpc/data-source.tf +++ b/examples/data-sources/aiven_project_vpc/data-source.tf @@ -1,9 +1,4 @@ -data "aiven_project_vpc" "myvpc" { - project = aiven_project.myproject.project +data "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project cloud_name = "google-europe-west1" -} - -# Or -data "aiven_project_vpc" "myvpc_id" { - vpc_id = aiven_project_vpc.vpc.id -} +} \ No newline at end of file diff --git a/examples/resources/aiven_aws_privatelink/import.sh b/examples/resources/aiven_aws_privatelink/import.sh index 1393e7442..180d079c9 100644 --- a/examples/resources/aiven_aws_privatelink/import.sh +++ b/examples/resources/aiven_aws_privatelink/import.sh @@ -1 +1 @@ -terraform import aiven_aws_privatelink.foo project/service_name +terraform import aiven_aws_privatelink.main PROJECT/SERVICE_NAME diff --git a/examples/resources/aiven_aws_privatelink/resource.tf b/examples/resources/aiven_aws_privatelink/resource.tf index d4d59ebc4..660c8753b 100644 --- a/examples/resources/aiven_aws_privatelink/resource.tf +++ b/examples/resources/aiven_aws_privatelink/resource.tf @@ -1,6 +1,6 @@ -resource "aiven_aws_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +resource "aiven_aws_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name principals = [ "arn:aws:iam::012345678901:user/mwf" diff --git a/examples/resources/aiven_aws_vpc_peering_connection/import.sh b/examples/resources/aiven_aws_vpc_peering_connection/import.sh index 0d128cd1e..ed876ca0a 100644 --- a/examples/resources/aiven_aws_vpc_peering_connection/import.sh +++ b/examples/resources/aiven_aws_vpc_peering_connection/import.sh @@ -1 +1 @@ -terraform import aiven_aws_vpc_peering_connection.foo project_name/vpc_id/aws_account_id/aws_vpc_id/aws_vpc_region +terraform import aiven_aws_vpc_peering_connection.aws_to_aiven_peering PROJECT/VPC_ID/AWS_ACCOUNT_ID/AWS_VPC_ID/AWS_VPC_REGION diff --git a/examples/resources/aiven_aws_vpc_peering_connection/resource.tf b/examples/resources/aiven_aws_vpc_peering_connection/resource.tf index cbd1816a0..ee4dde6fd 100644 --- a/examples/resources/aiven_aws_vpc_peering_connection/resource.tf +++ b/examples/resources/aiven_aws_vpc_peering_connection/resource.tf @@ -1,5 +1,13 @@ -resource "aiven_aws_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - aws_account_id = "XXXXX" - aws_vpc_id = "XXXXX" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "aws-us-east-2" + network_cidr = "192.168.1.0/24" +} + + +resource "aiven_aws_vpc_peering_connection" "aws_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + aws_account_id = var.aws_id + aws_vpc_id = "vpc-1a2b3c4d5e6f7g8h9" + aws_vpc_region = "aws-us-east-2" } diff --git a/examples/resources/aiven_azure_privatelink/import.sh b/examples/resources/aiven_azure_privatelink/import.sh index df2e4b167..f8c5bce05 100644 --- a/examples/resources/aiven_azure_privatelink/import.sh +++ b/examples/resources/aiven_azure_privatelink/import.sh @@ -1 +1 @@ -terraform import aiven_azure_privatelink.foo project/service_name +terraform import aiven_azure_privatelink.main PROJECT/SERVICE_NAME diff --git a/examples/resources/aiven_azure_privatelink/resource.tf b/examples/resources/aiven_azure_privatelink/resource.tf index 683217d5c..376db501b 100644 --- a/examples/resources/aiven_azure_privatelink/resource.tf +++ b/examples/resources/aiven_azure_privatelink/resource.tf @@ -1,8 +1,9 @@ -resource "aiven_azure_privatelink" "foo" { - project = data.aiven_project.foo.project - service_name = aiven_kafka.bar.service_name +resource "aiven_azure_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name + user_subscription_ids = [ - "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" + "00000000-0000-0000-0000-000000000000" ] } diff --git a/examples/resources/aiven_azure_privatelink_connection_approval/import.sh b/examples/resources/aiven_azure_privatelink_connection_approval/import.sh index fbd5c3553..f9a19830f 100644 --- a/examples/resources/aiven_azure_privatelink_connection_approval/import.sh +++ b/examples/resources/aiven_azure_privatelink_connection_approval/import.sh @@ -1 +1 @@ -terraform import aiven_azure_privatelink_connection_approval.approval project/service_name \ No newline at end of file +terraform import aiven_azure_privatelink_connection_approval.approval PROJECT/SERVICE_NAME \ No newline at end of file diff --git a/examples/resources/aiven_azure_vpc_peering_connection/import.sh b/examples/resources/aiven_azure_vpc_peering_connection/import.sh index 09ab89c9c..324340c53 100644 --- a/examples/resources/aiven_azure_vpc_peering_connection/import.sh +++ b/examples/resources/aiven_azure_vpc_peering_connection/import.sh @@ -1 +1 @@ -terraform import aiven_azure_vpc_peering_connection.foo project_name/vpc_id/azure_subscription_id/vnet_name +terraform import aiven_azure_vpc_peering_connection.azure_to_aiven_peering PROJECT/VPC_ID/AZURE_SUBSCRIPTION_ID/VNET_NAME diff --git a/examples/resources/aiven_azure_vpc_peering_connection/resource.tf b/examples/resources/aiven_azure_vpc_peering_connection/resource.tf index c8f80b177..b2fb1aad5 100644 --- a/examples/resources/aiven_azure_vpc_peering_connection/resource.tf +++ b/examples/resources/aiven_azure_vpc_peering_connection/resource.tf @@ -1,8 +1,14 @@ -resource "aiven_azure_vpc_peering_connection" "foo" { - vpc_id = data.aiven_project_vpc.vpc.id - azure_subscription_id = "xxxxxx" - peer_resource_group = "my-pr1" - vnet_name = "my-vnet1" - peer_azure_app_id = "xxxxxx" - peer_azure_tenant_id = "xxxxxx" +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project + cloud_name = "google-europe-west1" + network_cidr = "192.168.1.0/24" +} + +resource "aiven_azure_vpc_peering_connection" "azure_to_aiven_peering" { + vpc_id = aiven_project_vpc.example_vpc.id + azure_subscription_id = "00000000-0000-0000-0000-000000000000" + peer_resource_group = "example-resource-group" + vnet_name = "example-vnet" + peer_azure_app_id = "00000000-0000-0000-0000-000000000000" + peer_azure_tenant_id = "00000000-0000-0000-0000-000000000000" } diff --git a/examples/resources/aiven_gcp_privatelink/import.sh b/examples/resources/aiven_gcp_privatelink/import.sh new file mode 100644 index 000000000..762880ac4 --- /dev/null +++ b/examples/resources/aiven_gcp_privatelink/import.sh @@ -0,0 +1 @@ +terraform import aiven_gcp_privatelink.main PROJECT/SERVICE_NAME diff --git a/examples/resources/aiven_gcp_privatelink/resource.tf b/examples/resources/aiven_gcp_privatelink/resource.tf new file mode 100644 index 000000000..9fc163e7c --- /dev/null +++ b/examples/resources/aiven_gcp_privatelink/resource.tf @@ -0,0 +1,4 @@ +resource "aiven_gcp_privatelink" "main" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name +} diff --git a/examples/resources/aiven_gcp_privatelink_connection_approval/import.sh b/examples/resources/aiven_gcp_privatelink_connection_approval/import.sh new file mode 100644 index 000000000..762880ac4 --- /dev/null +++ b/examples/resources/aiven_gcp_privatelink_connection_approval/import.sh @@ -0,0 +1 @@ +terraform import aiven_gcp_privatelink.main PROJECT/SERVICE_NAME diff --git a/examples/resources/aiven_gcp_privatelink_connection_approval/resource.tf b/examples/resources/aiven_gcp_privatelink_connection_approval/resource.tf new file mode 100644 index 000000000..881cae436 --- /dev/null +++ b/examples/resources/aiven_gcp_privatelink_connection_approval/resource.tf @@ -0,0 +1,5 @@ +resource "aiven_gcp_privatelink_connection_approval" "approve" { + project = data.aiven_project.example_project.project + service_name = aiven_kafka.example_kafka.service_name + user_ip_address = "10.0.0.100" +} diff --git a/examples/resources/aiven_project_vpc/import.sh b/examples/resources/aiven_project_vpc/import.sh index 83d3b68db..98c964c9b 100644 --- a/examples/resources/aiven_project_vpc/import.sh +++ b/examples/resources/aiven_project_vpc/import.sh @@ -1 +1 @@ -terraform import aiven_project_vpc.myvpc project/id +terraform import aiven_project_vpc.example_vpc PROJECT/ID diff --git a/examples/resources/aiven_project_vpc/resource.tf b/examples/resources/aiven_project_vpc/resource.tf index ccbf986e1..d8244b425 100644 --- a/examples/resources/aiven_project_vpc/resource.tf +++ b/examples/resources/aiven_project_vpc/resource.tf @@ -1,5 +1,5 @@ -resource "aiven_project_vpc" "myvpc" { - project = aiven_project.myproject.project +resource "aiven_project_vpc" "example_vpc" { + project = data.aiven_project.example_project.project cloud_name = "google-europe-west1" network_cidr = "192.168.1.0/24" diff --git a/internal/sdkprovider/service/vpc/aws_privatelink.go b/internal/sdkprovider/service/vpc/aws_privatelink.go index af06f3de6..b84c0244c 100644 --- a/internal/sdkprovider/service/vpc/aws_privatelink.go +++ b/internal/sdkprovider/service/vpc/aws_privatelink.go @@ -20,24 +20,24 @@ var aivenAWSPrivatelinkSchema = map[string]*schema.Schema{ "principals": { Type: schema.TypeSet, Required: true, - Description: "List of allowed principals", + Description: "List of the ARNs of the AWS accounts or IAM users allowed to connect to the VPC endpoint.", Elem: &schema.Schema{Type: schema.TypeString}, }, "aws_service_id": { Type: schema.TypeString, Computed: true, - Description: "AWS service ID", + Description: "AWS service ID.", }, "aws_service_name": { Type: schema.TypeString, Computed: true, - Description: "AWS service name", + Description: "AWS service name.", }, } func ResourceAWSPrivatelink() *schema.Resource { return &schema.Resource{ - Description: "The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services.", + Description: "Creates and manages an [AWS PrivateLink for Aiven services](https://aiven.io/docs/platform/howto/use-aws-privatelinks) in a VPC.", CreateContext: resourceAWSPrivatelinkCreate, ReadContext: resourceAWSPrivatelinkRead, UpdateContext: resourceAWSPrivatelinkUpdate, diff --git a/internal/sdkprovider/service/vpc/aws_privatelink_data_source.go b/internal/sdkprovider/service/vpc/aws_privatelink_data_source.go index 99520d92d..de76572b3 100644 --- a/internal/sdkprovider/service/vpc/aws_privatelink_data_source.go +++ b/internal/sdkprovider/service/vpc/aws_privatelink_data_source.go @@ -12,7 +12,7 @@ import ( func DatasourceAWSPrivatelink() *schema.Resource { return &schema.Resource{ ReadContext: datasourceAWSPrivatelinkRead, - Description: "The AWS Privatelink resource allows the creation and management of Aiven AWS Privatelink for a services.", + Description: "Gets information about an AWS PrivateLink connection for an Aiven service.", Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenAWSPrivatelinkSchema, "project", "service_name"), } } diff --git a/internal/sdkprovider/service/vpc/aws_vpc_peering_connection.go b/internal/sdkprovider/service/vpc/aws_vpc_peering_connection.go index 6bf31f161..f45c1f43f 100644 --- a/internal/sdkprovider/service/vpc/aws_vpc_peering_connection.go +++ b/internal/sdkprovider/service/vpc/aws_vpc_peering_connection.go @@ -19,7 +19,7 @@ var aivenAWSVPCPeeringConnectionSchema = map[string]*schema.Schema{ ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("The VPC the peering connection belongs to.").ForceNew().Build(), + Description: userconfig.Desc("The ID of the Aiven VPC.").ForceNew().Build(), ValidateFunc: validateVPCID, }, "aws_account_id": { @@ -41,28 +41,28 @@ var aivenAWSVPCPeeringConnectionSchema = map[string]*schema.Schema{ DiffSuppressFunc: func(_, _, new string, _ *schema.ResourceData) bool { return new == "" }, - Description: userconfig.Desc("AWS region of the peered VPC (if not in the same region as Aiven VPC).").ForceNew().Build(), + Description: userconfig.Desc("The AWS region of the peered VPC, if different from the Aiven VPC region.").ForceNew().Build(), }, "state": { Computed: true, Type: schema.TypeString, - Description: "State of the peering connection", + Description: "The state of the peering connection.", }, "state_info": { Computed: true, Type: schema.TypeMap, - Description: "State-specific help or error information", + Description: "State-specific help or error information.", }, "aws_vpc_peering_connection_id": { Computed: true, Type: schema.TypeString, - Description: "AWS VPC peering connection ID", + Description: "The ID of the AWS VPC peering connection.", }, } func ResourceAWSVPCPeeringConnection() *schema.Resource { return &schema.Resource{ - Description: "The AWS VPC Peering Connection resource allows the creation and management of Aiven AWS VPC Peering Connections.", + Description: "Creates and manages an AWS VPC peering connection with an Aiven VPC.", CreateContext: resourceAWSVPCPeeringConnectionCreate, ReadContext: resourceAWSVPCPeeringConnectionRead, DeleteContext: resourceAWSVPCPeeringConnectionDelete, diff --git a/internal/sdkprovider/service/vpc/aws_vpc_peering_connection_data_source.go b/internal/sdkprovider/service/vpc/aws_vpc_peering_connection_data_source.go index 8468ddd0b..4ec2f5800 100644 --- a/internal/sdkprovider/service/vpc/aws_vpc_peering_connection_data_source.go +++ b/internal/sdkprovider/service/vpc/aws_vpc_peering_connection_data_source.go @@ -13,7 +13,7 @@ import ( func DatasourceAWSVPCPeeringConnection() *schema.Resource { return &schema.Resource{ ReadContext: datasourceAWSVPCPeeringConnectionRead, - Description: "The AWS VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.", + Description: "Gets information about an AWS VPC peering connection.", Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenAWSVPCPeeringConnectionSchema, "vpc_id", "aws_account_id", "aws_vpc_id", "aws_vpc_region"), } diff --git a/internal/sdkprovider/service/vpc/azure_privatelink.go b/internal/sdkprovider/service/vpc/azure_privatelink.go index 1e58f54e1..16a4d387e 100644 --- a/internal/sdkprovider/service/vpc/azure_privatelink.go +++ b/internal/sdkprovider/service/vpc/azure_privatelink.go @@ -24,33 +24,33 @@ var aivenAzurePrivatelinkSchema = map[string]*schema.Schema{ Required: true, Elem: &schema.Schema{Type: schema.TypeString}, MaxItems: 16, - Description: userconfig.Desc("A List of allowed Subscription IDs").MaxLen(16).Build(), + Description: userconfig.Desc("A list of allowed subscription IDs.").MaxLen(16).Build(), }, "azure_service_id": { Type: schema.TypeString, Computed: true, - Description: "Azure Privatelink service ID", + Description: "The Azure Private Link service ID.", }, "azure_service_alias": { Type: schema.TypeString, Computed: true, - Description: "Azure Privatelink service alias", + Description: "The Azure Private Link service alias.", }, "message": { Type: schema.TypeString, Computed: true, - Description: "Printable result of the Azure Privatelink request", + Description: "Printable result of the Azure Private Link request.", }, "state": { Type: schema.TypeString, Computed: true, - Description: "Privatelink resource state", + Description: "The state of the Private Link resource.", }, } func ResourceAzurePrivatelink() *schema.Resource { return &schema.Resource{ - Description: "The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services.", + Description: "Creates and manages an Azure Private Link for [selected Aiven services](https://aiven.io/docs/platform/howto/use-azure-privatelink) in a VPC.", CreateContext: resourceAzurePrivatelinkCreate, ReadContext: resourceAzurePrivatelinkRead, UpdateContext: resourceAzurePrivatelinkUpdate, diff --git a/internal/sdkprovider/service/vpc/azure_privatelink_connection_approve.go b/internal/sdkprovider/service/vpc/azure_privatelink_connection_approve.go index 4968dcf93..f907b3a2f 100644 --- a/internal/sdkprovider/service/vpc/azure_privatelink_connection_approve.go +++ b/internal/sdkprovider/service/vpc/azure_privatelink_connection_approve.go @@ -20,23 +20,23 @@ var aivenAzurePrivatelinkConnectionApprovalSchema = map[string]*schema.Schema{ Type: schema.TypeString, Optional: true, ForceNew: false, - Description: "IP address of Azure private endpoint", + Description: "IP address of Azure private endpoint.", }, "state": { Type: schema.TypeString, Computed: true, - Description: "Privatelink connection state", + Description: "The state of the Private Link connection.", }, "privatelink_connection_id": { Type: schema.TypeString, Computed: true, - Description: "Privatelink connection id", + Description: "The ID of the Private Link connection.", }, } func ResourceAzurePrivatelinkConnectionApproval() *schema.Resource { return &schema.Resource{ - Description: "The Azure privatelink approve resource waits for an aiven privatelink connection on a service and approves it with associated endpoint IP", + Description: "Approves an Azure Private Link connection to an Aiven service with an associated endpoint IP.", CreateContext: resourceAzurePrivatelinkConnectionApprovalUpdate, ReadContext: resourceAzurePrivatelinkConnectionApprovalRead, UpdateContext: resourceAzurePrivatelinkConnectionApprovalUpdate, diff --git a/internal/sdkprovider/service/vpc/azure_privatelink_data_source.go b/internal/sdkprovider/service/vpc/azure_privatelink_data_source.go index 59ea546b8..e05cba994 100644 --- a/internal/sdkprovider/service/vpc/azure_privatelink_data_source.go +++ b/internal/sdkprovider/service/vpc/azure_privatelink_data_source.go @@ -12,7 +12,7 @@ import ( func DatasourceAzurePrivatelink() *schema.Resource { return &schema.Resource{ ReadContext: datasourceAzurePrivatelinkRead, - Description: "The Azure Privatelink resource allows the creation and management of Aiven Azure Privatelink for a services.", + Description: "Gets information about an Azure Private Link connection for an Aiven service.", Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenAzurePrivatelinkSchema, "project", "service_name"), } } diff --git a/internal/sdkprovider/service/vpc/azure_vpc_peering_connection.go b/internal/sdkprovider/service/vpc/azure_vpc_peering_connection.go index 0ae0c83d9..811ac43a4 100644 --- a/internal/sdkprovider/service/vpc/azure_vpc_peering_connection.go +++ b/internal/sdkprovider/service/vpc/azure_vpc_peering_connection.go @@ -19,26 +19,26 @@ var aivenAzureVPCPeeringConnectionSchema = map[string]*schema.Schema{ ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("The VPC the peering connection belongs to.").ForceNew().Build(), + Description: userconfig.Desc("The ID of the Aiven VPC.").ForceNew().Build(), ValidateFunc: validateVPCID, }, "azure_subscription_id": { ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("Azure Subscription ID.").ForceNew().Build(), + Description: userconfig.Desc("The ID of the Azure subscription in UUID4 format.").ForceNew().Build(), }, "vnet_name": { ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("Azure Network name.").ForceNew().Build(), + Description: userconfig.Desc("The name of the Azure VNet.").ForceNew().Build(), }, "peer_resource_group": { Required: true, ForceNew: true, Type: schema.TypeString, - Description: userconfig.Desc("Azure resource group name of the peered VPC.").ForceNew().Build(), + Description: userconfig.Desc("The name of the Azure resource group associated with the VNet.").ForceNew().Build(), }, "state": { Computed: true, @@ -48,30 +48,30 @@ var aivenAzureVPCPeeringConnectionSchema = map[string]*schema.Schema{ "state_info": { Computed: true, Type: schema.TypeMap, - Description: "State-specific help or error information", + Description: "State-specific help or error information.", }, "peering_connection_id": { Computed: true, Type: schema.TypeString, - Description: "Cloud provider identifier for the peering connection if available", + Description: "The ID of the cloud provider for the peering connection.", }, "peer_azure_app_id": { Required: true, ForceNew: true, Type: schema.TypeString, - Description: userconfig.Desc("Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet.").ForceNew().Build(), + Description: userconfig.Desc("The ID of the Azure app that is allowed to create a peering to the Azure Virtual Network (VNet) in UUID4 format.").ForceNew().Build(), }, "peer_azure_tenant_id": { Required: true, ForceNew: true, Type: schema.TypeString, - Description: userconfig.Desc("Azure tenant id in UUID4 form.").ForceNew().Build(), + Description: userconfig.Desc("The Azure tenant ID in UUID4 format.").ForceNew().Build(), }, } func ResourceAzureVPCPeeringConnection() *schema.Resource { return &schema.Resource{ - Description: "The Azure VPC Peering Connection resource allows the creation and management of Aiven VPC Peering Connections.", + Description: "Creates and manages an Azure VPC peering connection with an Aiven VPC.", CreateContext: resourceAzureVPCPeeringConnectionCreate, ReadContext: resourceAzureVPCPeeringConnectionRead, DeleteContext: resourceAzureVPCPeeringConnectionDelete, diff --git a/internal/sdkprovider/service/vpc/azure_vpc_peering_connection_data_source.go b/internal/sdkprovider/service/vpc/azure_vpc_peering_connection_data_source.go index 9d40051f3..eef72efe0 100644 --- a/internal/sdkprovider/service/vpc/azure_vpc_peering_connection_data_source.go +++ b/internal/sdkprovider/service/vpc/azure_vpc_peering_connection_data_source.go @@ -13,7 +13,7 @@ import ( func DatasourceAzureVPCPeeringConnection() *schema.Resource { return &schema.Resource{ ReadContext: datasourceAzureVPCPeeringConnectionRead, - Description: "The Azure VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.", + Description: "Gets information about about an Azure VPC peering connection.", Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenAzureVPCPeeringConnectionSchema, "vpc_id", "azure_subscription_id", "peer_resource_group", "vnet_name", "peer_azure_app_id", "peer_azure_tenant_id"), } diff --git a/internal/sdkprovider/service/vpc/gcp_privatelink.go b/internal/sdkprovider/service/vpc/gcp_privatelink.go index 8158fc3f1..f3b7e58ea 100644 --- a/internal/sdkprovider/service/vpc/gcp_privatelink.go +++ b/internal/sdkprovider/service/vpc/gcp_privatelink.go @@ -21,24 +21,23 @@ var aivenGCPPrivatelinkSchema = map[string]*schema.Schema{ "message": { Type: schema.TypeString, Computed: true, - Description: "Printable result of the GCP Privatelink request", + Description: "Printable result of the Google Cloud Private Service Connect request.", }, "state": { Type: schema.TypeString, Computed: true, - Description: "Privatelink resource state", + Description: "The state of the Private Service Connect resource.", }, "google_service_attachment": { Type: schema.TypeString, Computed: true, - Description: "Privatelink resource Google Service Attachment", + Description: "Google Private Service Connect service attachment.", }, } func ResourceGCPPrivatelink() *schema.Resource { return &schema.Resource{ - Description: "The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink" + - " for a services.", + Description: "Creates and manages a Google Private Service Connect for an Aiven service in a VPC.", CreateContext: resourceGCPPrivatelinkCreate, ReadContext: resourceGCPPrivatelinkRead, DeleteContext: resourceGCPPrivatelinkDelete, diff --git a/internal/sdkprovider/service/vpc/gcp_privatelink_connection_approve.go b/internal/sdkprovider/service/vpc/gcp_privatelink_connection_approve.go index c928161b0..1b5c65aca 100644 --- a/internal/sdkprovider/service/vpc/gcp_privatelink_connection_approve.go +++ b/internal/sdkprovider/service/vpc/gcp_privatelink_connection_approve.go @@ -19,30 +19,29 @@ var aivenGCPPrivatelinkConnectionApprovalSchema = map[string]*schema.Schema{ "user_ip_address": { Type: schema.TypeString, Required: true, - Description: "Privatelink connection user IP address", + Description: "The Private Service Connect connection user IP address.", }, "privatelink_connection_id": { Type: schema.TypeString, Computed: true, - Description: "Privatelink connection id", + Description: "Aiven internal ID for the private link connection.", }, "state": { Type: schema.TypeString, Computed: true, - Description: "Privatelink connection state", + Description: "The state of the connection.", }, "psc_connection_id": { Type: schema.TypeString, Computed: true, - Description: "Privatelink connection PSC connection id", + Description: "The Google Private Service Connect connection ID.", }, } func ResourceGCPPrivatelinkConnectionApproval() *schema.Resource { return &schema.Resource{ - Description: "The GCP privatelink approve resource waits for an aiven privatelink connection on a " + - "service and approves it with associated endpoint IP", + Description: "Approves a Google Private Service Connect connection to an Aiven service with an associated endpoint IP.", CreateContext: resourceGCPPrivatelinkConnectionApprovalUpdate, ReadContext: resourceGCPPrivatelinkConnectionApprovalRead, UpdateContext: resourceGCPPrivatelinkConnectionApprovalUpdate, diff --git a/internal/sdkprovider/service/vpc/gcp_privatelink_data_source.go b/internal/sdkprovider/service/vpc/gcp_privatelink_data_source.go index 2af366d5e..4a4fbc974 100644 --- a/internal/sdkprovider/service/vpc/gcp_privatelink_data_source.go +++ b/internal/sdkprovider/service/vpc/gcp_privatelink_data_source.go @@ -12,7 +12,7 @@ import ( func DatasourceGCPPrivatelink() *schema.Resource { return &schema.Resource{ ReadContext: datasourceGCPPrivatelinkRead, - Description: "The GCP Privatelink resource allows the creation and management of Aiven GCP Privatelink for a services.", + Description: "Gets information about a Google Private Service Connect connection for an Aiven service.", Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenGCPPrivatelinkSchema, "project", "service_name"), } } diff --git a/internal/sdkprovider/service/vpc/gcp_vpc_peering_connection.go b/internal/sdkprovider/service/vpc/gcp_vpc_peering_connection.go index 49beb34fb..521e18449 100644 --- a/internal/sdkprovider/service/vpc/gcp_vpc_peering_connection.go +++ b/internal/sdkprovider/service/vpc/gcp_vpc_peering_connection.go @@ -29,34 +29,34 @@ var aivenGCPVPCPeeringConnectionSchema = map[string]*schema.Schema{ ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("GCP project ID.").ForceNew().Build(), + Description: userconfig.Desc("Google Cloud project ID.").ForceNew().Build(), }, "peer_vpc": { ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("GCP VPC network name.").ForceNew().Build(), + Description: userconfig.Desc("Google Cloud VPC network name.").ForceNew().Build(), }, "state": { Computed: true, Type: schema.TypeString, - Description: "State of the peering connection", + Description: "State of the peering connection.", }, "state_info": { Computed: true, Type: schema.TypeMap, - Description: "State-specific help or error information", + Description: "State-specific help or error information.", }, "self_link": { Computed: true, Type: schema.TypeString, - Description: "Computed GCP network peering link", + Description: "Computed Google Cloud network peering link.", }, } func ResourceGCPVPCPeeringConnection() *schema.Resource { return &schema.Resource{ - Description: "The GCP VPC Peering Connection resource allows the creation and management of Aiven GCP VPC Peering Connections.", + Description: "Creates and manages a Google Cloud VPC peering connection.", CreateContext: resourceGCPVPCPeeringConnectionCreate, ReadContext: resourceGCPVPCPeeringConnectionRead, DeleteContext: resourceGCPVPCPeeringConnectionDelete, diff --git a/internal/sdkprovider/service/vpc/project_vpc.go b/internal/sdkprovider/service/vpc/project_vpc.go index 83598f2a0..aa2eac572 100644 --- a/internal/sdkprovider/service/vpc/project_vpc.go +++ b/internal/sdkprovider/service/vpc/project_vpc.go @@ -22,13 +22,13 @@ var aivenProjectVPCSchema = map[string]*schema.Schema{ ForceNew: true, Required: true, Type: schema.TypeString, - Description: userconfig.Desc("Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.").ForceNew().Build(), + Description: userconfig.Desc("The cloud provider and region where the service is hosted in the format `CLOUD_PROVIDER-REGION_NAME`. For example, `google-europe-west1` or `aws-us-east-2`.").ForceNew().Build(), }, "network_cidr": { ForceNew: true, Required: true, Type: schema.TypeString, - Description: "Network address range used by the VPC like 192.168.0.0/24", + Description: "Network address range used by the VPC. For example, `192.168.0.0/24`.", }, "state": { Computed: true, @@ -39,7 +39,7 @@ var aivenProjectVPCSchema = map[string]*schema.Schema{ func ResourceProjectVPC() *schema.Resource { return &schema.Resource{ - Description: "The Project VPC resource allows the creation and management of Aiven Project VPCs.", + Description: "Creates and manages a VPC for an Aiven project.", CreateContext: resourceProjectVPCCreate, ReadContext: resourceProjectVPCRead, DeleteContext: resourceProjectVPCDelete, diff --git a/internal/sdkprovider/service/vpc/project_vpc_data_source.go b/internal/sdkprovider/service/vpc/project_vpc_data_source.go index b40e69550..3068de451 100644 --- a/internal/sdkprovider/service/vpc/project_vpc_data_source.go +++ b/internal/sdkprovider/service/vpc/project_vpc_data_source.go @@ -26,13 +26,13 @@ func DatasourceProjectVPC() *schema.Resource { }, "cloud_name": { Type: schema.TypeString, - Description: "Defines where the cloud provider and region where the service is hosted in. See the Service resource for additional information.", + Description: "The cloud provider and region where the service is hosted in the format `CLOUD_PROVIDER-REGION_NAME`. For example, `google-europe-west1` or `aws-us-east-2`.", Optional: true, ConflictsWith: []string{"vpc_id"}, }, "vpc_id": { Type: schema.TypeString, - Description: "ID of the VPC. This can be used to filter out the specific VPC if there are more than one datasource returned.", + Description: "The ID of the VPC. This can be used to filter out the other VPCs if there are more than one for the project and cloud.", Optional: true, ConflictsWith: []string{"project", "cloud_name"}, ValidateDiagFunc: func(i interface{}, _ cty.Path) diag.Diagnostics { @@ -46,7 +46,7 @@ func DatasourceProjectVPC() *schema.Resource { "network_cidr": { Computed: true, Type: schema.TypeString, - Description: "Network address range used by the VPC like 192.168.0.0/24", + Description: "Network address range used by the VPC. For example, `192.168.0.0/24`.", }, "state": { Computed: true, @@ -57,7 +57,7 @@ func DatasourceProjectVPC() *schema.Resource { return &schema.Resource{ ReadContext: datasourceProjectVPCRead, - Description: "The Project VPC data source provides information about the existing Aiven Project VPC.", + Description: "Gets information about the VPC for an Aiven project.", Schema: aivenProjectVPCDataSourceSchema, } }