Skip to content

Commit

Permalink
feat(organization_vpc): added organization_vpc and peering connection…
Browse files Browse the repository at this point in the history
…s resources
  • Loading branch information
vmyroslav committed Feb 19, 2025
1 parent c5094e3 commit d6b12c3
Show file tree
Hide file tree
Showing 43 changed files with 3,260 additions and 67 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ build:
# }
# }
#}

build-dev: $(BUILD_DEV_DIR)
$(GO) build -gcflags='all=-N -l' -o $(BUILD_DEV_BIN)

Expand Down
36 changes: 36 additions & 0 deletions docs/data-sources/aws_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_aws_org_vpc_peering_connection Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
Gets information about an AWS VPC peering connection.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_aws_org_vpc_peering_connection (Data Source)

Gets information about an AWS VPC peering connection.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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) The AWS region of the peered VPC. For example, `eu-central-1`.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.

### Read-Only

- `aws_vpc_peering_connection_id` (String) The ID of the AWS VPC peering connection.
- `id` (String) The ID of this resource.
- `peering_connection_id` (String) The ID of the peering connection.
- `state` (String) State of the peering connection. The possible values are `ACTIVE`, `APPROVED`, `APPROVED_PEER_REQUESTED`, `DELETED`, `DELETED_BY_PEER`, `DELETING`, `ERROR`, `INVALID_SPECIFICATION`, `PENDING_PEER` and `REJECTED_BY_PEER`.
37 changes: 37 additions & 0 deletions docs/data-sources/azure_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_azure_org_vpc_peering_connection Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
Gets information about about an Azure VPC peering connection.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_azure_org_vpc_peering_connection (Data Source)

Gets information about about an Azure VPC peering connection.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `azure_subscription_id` (String) The ID of the Azure subscription in UUID4 format. Changing this property forces recreation of the resource.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.
- `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.

### Read-Only

- `id` (String) The ID of this 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.
- `peering_connection_id` (String) The ID of the cloud provider for the peering connection.
- `state` (String) State of the peering connection
34 changes: 34 additions & 0 deletions docs/data-sources/gcp_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_gcp_org_vpc_peering_connection Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The GCP VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_gcp_org_vpc_peering_connection (Data Source)

The GCP VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `gcp_project_id` (String) Google Cloud project ID. Changing this property forces recreation of the resource.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.
- `peer_vpc` (String) Google Cloud VPC network name. Changing this property forces recreation of the resource.

### Read-Only

- `id` (String) The ID of this resource.
- `self_link` (String) Computed Google Cloud network peering link.
- `state` (String) State of the peering connection.
35 changes: 35 additions & 0 deletions docs/data-sources/organization_vpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_organization_vpc Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
Gets information about an existing VPC in an Aiven organization.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_organization_vpc (Data Source)

Gets information about an existing VPC in an Aiven organization.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `organization_id` (String) The ID of the organization.
- `organization_vpc_id` (String) The ID of the Aiven Organization VPC.

### Read-Only

- `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.
- `create_time` (String) Time of creation of the VPC.
- `id` (String) The ID of this resource.
- `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 `ACTIVE`, `APPROVED`, `DELETED` and `DELETING`.
- `update_time` (String) Time of the last update of the VPC.
75 changes: 75 additions & 0 deletions docs/resources/aws_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_aws_org_vpc_peering_connection Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an AWS VPC peering connection with an Aiven Organization VPC.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_aws_org_vpc_peering_connection (Resource)

Creates and manages an AWS VPC peering connection with an Aiven Organization VPC.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.

## Example Usage

```terraform
resource "aiven_organization_vpc" "example_vpc" {
organization_id = data.aiven_organization.example.id
cloud_name = "aws-eu-central-1"
network_cidr = "10.0.0.0/24"
}
resource "aiven_aws_org_vpc_peering_connection" "example_peering" {
organization_id = aiven_organization_vpc.example_vpc.organization_id
organization_vpc_id = aiven_organization_vpc.example_vpc.organization_vpc_id
aws_account_id = var.aws_id
aws_vpc_id = "vpc-1a2b3c4d5e6f7g8h9"
aws_vpc_region = "aws-us-east-2"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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) The AWS region of the peered VPC. For example, `eu-central-1`.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.

### Optional

- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `aws_vpc_peering_connection_id` (String) The ID of the AWS VPC peering connection.
- `id` (String) The ID of this resource.
- `peering_connection_id` (String) The ID of the peering connection.
- `state` (String) State of the peering connection. The possible values are `ACTIVE`, `APPROVED`, `APPROVED_PEER_REQUESTED`, `DELETED`, `DELETED_BY_PEER`, `DELETING`, `ERROR`, `INVALID_SPECIFICATION`, `PENDING_PEER` and `REJECTED_BY_PEER`.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `default` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_aws_org_vpc_peering_connection.example ORGANIZATION_ID/ORGANIZATION_VPC_ID/AWS_ACCOUNT_ID/AWS_VPC_ID/AWS_REGION
```
78 changes: 78 additions & 0 deletions docs/resources/azure_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_azure_org_vpc_peering_connection Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an Azure VPC peering connection with an Aiven VPC.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_azure_org_vpc_peering_connection (Resource)

Creates and manages an Azure VPC peering connection with an Aiven VPC.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.

## Example Usage

```terraform
resource "aiven_organization_vpc" "example_vpc" {
organization_id = data.aiven_organization.example.id
cloud_name = "azure-germany-westcentral"
network_cidr = "10.0.0.0/24"
}
resource "aiven_azure_org_vpc_peering_connection" "example_peering" {
organization_id = aiven_organization_vpc.example_vpc.organization_id
organization_vpc_id = aiven_organization_vpc.example_vpc.organization_vpc_id
azure_subscription_id = "12345678-1234-1234-1234-123456789012"
vnet_name = "my-vnet"
peer_resource_group = "my-resource-group"
peer_azure_app_id = "87654321-4321-4321-4321-210987654321"
peer_azure_tenant_id = "11111111-2222-3333-4444-555555555555"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `azure_subscription_id` (String) The ID of the Azure subscription in UUID4 format. Changing this property forces recreation of the resource.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.
- `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.

### Optional

- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `peering_connection_id` (String) The ID of the cloud provider for the peering connection.
- `state` (String) State of the peering connection

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `default` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_azure_org_vpc_peering_connection.example ORGANIZATION_ID/ORGANIZATION_VPC_ID/AZURE_SUBSCRIPTION_ID/VNET_NAME/RESOURCE_GROUP
```
72 changes: 72 additions & 0 deletions docs/resources/gcp_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_gcp_org_vpc_peering_connection Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages a Google Cloud VPC peering connection.
This resource is in the beta stage and may change without notice. Set
the PROVIDER_AIVEN_ENABLE_BETA environment variable to use the resource.
---

# aiven_gcp_org_vpc_peering_connection (Resource)

Creates and manages a Google Cloud VPC peering connection.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.

## Example Usage

```terraform
resource "aiven_organization_vpc" "example_vpc" {
organization_id = data.aiven_organization.example.id
cloud_name = "google-europe-west10"
network_cidr = "10.0.0.0/24"
}
resource "aiven_gcp_org_vpc_peering_connection" "example" {
organization_id = aiven_organization_vpc.example_vpc.organization_id
organization_vpc_id = aiven_organization_vpc.example_vpc.organization_vpc_id
gcp_project_id = "my-gcp-project-123" # Your GCP project ID
peer_vpc = "my-vpc-network" # Your GCP VPC network name
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `gcp_project_id` (String) Google Cloud project ID. Changing this property forces recreation of the resource.
- `organization_id` (String) Identifier of the organization.
- `organization_vpc_id` (String) Identifier of the organization VPC.
- `peer_vpc` (String) Google Cloud VPC network name. Changing this property forces recreation of the resource.

### Optional

- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `self_link` (String) Computed Google Cloud network peering link.
- `state` (String) State of the peering connection.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `default` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_gcp_org_vpc_peering_connection.example ORGANIZATION_ID/ORGANIZATION_VPC_ID/GCP_PROJECT_ID/VPC_NAME
```
Loading

0 comments on commit d6b12c3

Please sign in to comment.