Skip to content

docs: add guide for moving projects #2234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data-sources/alloydbomni.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni (Data Source)

Gets information about an Aiven for AlloyDB Omni service.
Gets information about an Aiven for AlloyDB Omni service.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/alloydbomni_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni_database (Data Source)

Gets information about a database in an Aiven for AlloyDB Omni service.
Gets information about a database in an Aiven for AlloyDB Omni service.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/alloydbomni_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni_user (Data Source)

Gets information about an Aiven for AlloyDB Omni service user.
Gets information about an Aiven for AlloyDB Omni service user.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/aws_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_aws_org_vpc_peering_connection (Data Source)

Gets information about an AWS VPC peering connection.
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.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/azure_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_azure_org_vpc_peering_connection (Data Source)

Gets information about about an Azure VPC peering connection.
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.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/external_identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_external_identity (Data Source)

Links external usernames to Aiven users, ensuring that requesters and approvers are correctly identified for [Aiven for Apache Kafka® Governance approval workflows](https://aiven.io/docs/products/kafka/howto/terraform-governance-approvals).
Links external usernames to Aiven users, ensuring that requesters and approvers are correctly identified for [Aiven for Apache Kafka® Governance approval workflows](https://aiven.io/docs/products/kafka/howto/terraform-governance-approvals).

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/gcp_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_gcp_org_vpc_peering_connection (Data Source)

The GCP VPC Peering Connection data source provides information about the existing Aiven VPC Peering Connection.
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.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_organization_address (Data Source)

Gets information about an organization address.
Gets information about an organization address.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_billing_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_organization_billing_group (Data Source)

Gets information about a billing group.
Gets information about a billing group.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_billing_group_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_organization_billing_group_list (Data Source)

Lists billing groups for an organization.
Lists billing groups for an 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.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_organization_project (Data Source)

Gets information about an Aiven project.
Gets information about an Aiven project.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_user_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gets information about an existing user group in an organization.

```terraform
data "aiven_organization_user_group" "example" {
name = "Example group"
name = "Example group"
organization_id = aiven_organization.main.id
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/organization_vpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_organization_vpc (Data Source)

Gets information about an existing VPC in an Aiven organization.
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.
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/service_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ data "aiven_service_component" "sc1" {
- `id` (String) The ID of this resource.
- `kafka_ssl_ca` (String) Kafka certificate used. The possible values are `letsencrypt` and `project_ca`.
- `port` (Number) Port number for connecting to the service component

86 changes: 86 additions & 0 deletions docs/guides/move-projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
page_title: "Move projects"
---

# Move projects

You can move a project to another [organization or organizational unit](https://aiven.io/docs/platform/concepts/orgs-units-projects) by updating the `aiven_project` or `aiven_organization_project` resource.

Services in the project continue running during the move.

## Move a project within an organization

Users with the organization admin or project admin [role](https://aiven.io/docs/platform/concepts/permissions#organization-roles-and-permissions) can move projects within an organization.

To move a project to another organizational unit in your organization, change the `parent_id` of the project resource. The following example shows an `aiven_project` resource with the `parent_id`
of the destination unit:

```hcl
resource "aiven_organizational_unit" "destination_unit" {
name = "dest-unit"
parent_id = data.aiven_organization.main.id
}

resource "aiven_project" "example_project" {
project = "example-project"
parent_id = aiven_organizational_unit.destination_unit.id
}
```

You can also move a project out of an organizational unit and put it directly under the organization. The following example shows an `aiven_organization_project` resource
with the `parent_id` of the organization:

```hcl
resource "aiven_organization_project" "example_project" {
project_id = "example-project"
organization_id = data.aiven_organization.main.id
parent_id = data.aiven_organization.main.id
billing_group_id = aiven_billing_group.main.id
}
```

## Move a project to another organization

To move a project to a different organization, you must be an [organization admin](https://aiven.io/docs/platform/concepts/permissions#organization-roles-and-permissions) of both organizations.
All users with permission to access the project lose the permissions when you move it to a different organization unless they are members of the target organization.

~> **Note**
To move an `aiven_project` resource to another organization, change the `parent_id` to the ID of the destination organization.

To move an `aiven_organization_project` resource to another organization, you have to change the:

* `organization_id` to the ID of the destination organization
* `parent_id` to the ID of the destination organization or organizational unit
* `billing_group_id` to the ID of one of the billing groups in the destination organization

-> **Tip**
You can get the billing group ID [in the Aiven Console](https://aiven.io/docs/platform/reference/get-resource-IDs) or by using
the `aiven_organization_billing_group_list` data source.

In the following example the project was moved to an organizational unit in another organization:

```hcl
# Destination organization
data "aiven_organization" "dest_org" {
name = "Destination organization"
}

# Destination unit
data "aiven_organizational_unit" "dest_unit" {
name = "Example organizational unit"
parent_id = data.aiven_organization.dest_org.id
}

# Billing groups in destination organization
data "aiven_organization_billing_group_list" "billing_groups" {
organization_id = data.aiven_organization.dest_org.id
}

# Project
resource "aiven_organization_project" "example_project" {
project_id = "example-project"
organization_id = data.aiven_organization.dest_org.id
parent_id = data.aiven_organizational_unit.dest_unit.id
billing_group_id = one([for bg in data.aiven_organization_billing_group_list.billing_groups.billing_groups : bg.billing_group_id if bg.billing_group_name == "Default billing group"])
}
```
2 changes: 1 addition & 1 deletion docs/resources/alloydbomni.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni (Resource)

Creates and manages an Aiven for AlloyDB Omni service.
Creates and manages an Aiven for AlloyDB Omni service.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/alloydbomni_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni_database (Resource)

Creates and manages a database in an Aiven for AlloyDB Omni service.
Creates and manages a database in an Aiven for AlloyDB Omni service.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/alloydbomni_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_alloydbomni_user (Resource)

Creates and manages an Aiven for AlloyDB Omni service user.
Creates and manages an Aiven for AlloyDB Omni service user.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/aws_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_aws_org_vpc_peering_connection (Resource)

Creates and manages an AWS VPC peering connection with an Aiven Organization VPC.
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.
Expand All @@ -20,16 +20,16 @@ the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
```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"
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"
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"
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/resources/azure_org_vpc_peering_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_azure_org_vpc_peering_connection (Resource)

Creates and manages an Azure VPC peering connection with an Aiven VPC.
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.
Expand All @@ -20,14 +20,14 @@ the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
```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"
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"
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"
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/azure_privatelink_connection_approval.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ resource "aiven_pg" "default" {
}

resource "aiven_azure_privatelink" "privatelink" {
project = var.aiven_project_id
service_name = aiven_pg.default.name
project = var.aiven_project_id
service_name = aiven_pg.default.name
user_subscription_ids = [
var.azure_subscription_id
]
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/billing_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "aiven_billing_group" "example_billing_group" {
name = "example-billing-group"
billing_currency = "USD"
vat_id = "123ABC"
parent_id = data.aiven_organization.main.id
parent_id = data.aiven_organization.main.id
}

resource "aiven_project" "example_project" {
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/clickhouse_grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "aiven_clickhouse_grant" "role_privileges" {
}

# Global privileges
privilege_grant {
privilege_grant {
privilege = "CREATE TEMPORARY TABLE"
database = "*"
}
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/dragonfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Creates and manages an [Aiven for Dragonfly®](https://aiven.io/docs/products/dr

```terraform
resource "aiven_dragonfly" "example_dragonfly" {
project = data.aiven_project.example_project.project
plan = "startup-4"
cloud_name = "google-europe-west1"
service_name = "example-dragonfly-service"

dragonfly_user_config {
cache_mode = true
}
project = data.aiven_project.example_project.project
plan = "startup-4"
cloud_name = "google-europe-west1"
service_name = "example-dragonfly-service"

dragonfly_user_config {
cache_mode = true
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/flink_jar_application.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_flink_jar_application (Resource)

Creates and manages an [Aiven for Apache Flink® jar application](https://aiven.io/docs/products/flink/howto/create-jar-application).
Creates and manages an [Aiven for Apache Flink® jar application](https://aiven.io/docs/products/flink/howto/create-jar-application).

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down
10 changes: 5 additions & 5 deletions docs/resources/flink_jar_application_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

# aiven_flink_jar_application_deployment (Resource)

Creates and manages the deployment of an Aiven for Apache Flink® application.
Creates and manages the deployment of an Aiven for Apache Flink® application.

**This resource is in the beta stage and may change without notice.** Set
the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.
Expand Down Expand Up @@ -39,15 +39,15 @@ resource "aiven_flink_jar_application" "example" {
}

resource "aiven_flink_jar_application_version" "example" {
project = aiven_flink.example.project
service_name = aiven_flink.example.service_name
project = aiven_flink.example.project
service_name = aiven_flink.example.service_name
application_id = aiven_flink_jar_application.example.application_id
source = "./example.jar"
}

resource "aiven_flink_jar_application_deployment" "example" {
project = aiven_flink.example.project
service_name = aiven_flink.example.service_name
project = aiven_flink.example.project
service_name = aiven_flink.example.service_name
application_id = aiven_flink_jar_application.example.application_id
version_id = aiven_flink_jar_application_version.example.application_version_id
}
Expand Down
Loading