From 666dfe07987f0c238465fb1201edea661f308616 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Tue, 17 Dec 2024 15:19:55 +0100 Subject: [PATCH] fix: display project_vpc_id computed on plan --- CHANGELOG.md | 7 +- docs/data-sources/account_team_project.md | 2 +- docs/data-sources/alloydbomni.md | 2 +- docs/data-sources/cassandra.md | 2 +- docs/data-sources/clickhouse.md | 2 +- docs/data-sources/dragonfly.md | 2 +- docs/data-sources/flink.md | 2 +- docs/data-sources/grafana.md | 2 +- docs/data-sources/kafka.md | 2 +- docs/data-sources/kafka_connect.md | 2 +- docs/data-sources/kafka_mirrormaker.md | 2 +- docs/data-sources/m3aggregator.md | 2 +- docs/data-sources/m3db.md | 2 +- docs/data-sources/mysql.md | 2 +- docs/data-sources/opensearch.md | 2 +- docs/data-sources/pg.md | 2 +- docs/data-sources/project_user.md | 2 +- docs/data-sources/redis.md | 2 +- docs/data-sources/thanos.md | 2 +- docs/data-sources/valkey.md | 2 +- docs/resources/account_team_project.md | 2 +- docs/resources/alloydbomni.md | 2 +- docs/resources/cassandra.md | 2 +- docs/resources/clickhouse.md | 2 +- docs/resources/dragonfly.md | 2 +- docs/resources/flink.md | 2 +- docs/resources/grafana.md | 2 +- docs/resources/kafka.md | 2 +- docs/resources/kafka_connect.md | 2 +- docs/resources/kafka_mirrormaker.md | 2 +- docs/resources/m3aggregator.md | 2 +- docs/resources/m3db.md | 2 +- docs/resources/mysql.md | 2 +- docs/resources/opensearch.md | 2 +- docs/resources/organization_group_project.md | 2 +- docs/resources/organization_permission.md | 2 +- docs/resources/pg.md | 2 +- docs/resources/project_user.md | 2 +- docs/resources/redis.md | 2 +- docs/resources/thanos.md | 2 +- docs/resources/valkey.md | 2 +- go.mod | 2 +- go.sum | 2 + internal/schemautil/custom_diff.go | 68 ++++++++++++++++++++ internal/schemautil/helpers.go | 34 ++++++---- internal/schemautil/schemautil.go | 25 +++++++ internal/schemautil/service.go | 37 ++++++++--- 47 files changed, 191 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c93a29042..2fa53b75d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ nav_order: 1 +## [MAJOR.MINOR.PATCH] - YYYY-MM-DD + +- Display automatically assigned `project_vpc_id` on `terraform plan` +- Do not suppress zero values for new resources on `terraform plan` +- Allow to set `""` to `project_vpc_id` to deploy services without VPC + ## [4.31.1] - 2024-12-23 - Validate whether the `aiven_project.billing_group` field has changed before calling admin API @@ -18,7 +24,6 @@ nav_order: 1 - Add `alloydbomni` BETA resource and datasource - Add `aiven_alloydbomni_user` BETA resource and datasource - Add `aiven_alloydbomni_database` BETA resource and datasource -- Fix `terraform plan`: new resources don't display zero values for user configuration options - Add `aiven_service_integration` resource and datasource field `destination_service_project`: Destination service project name - Add `aiven_service_integration` resource and datasource field `source_service_project`: Source service project name - Change `aiven_account_team_project` resource and datasource field `team_type` (enum): remove diff --git a/docs/data-sources/account_team_project.md b/docs/data-sources/account_team_project.md index 4dcc54d51..626955fda 100644 --- a/docs/data-sources/account_team_project.md +++ b/docs/data-sources/account_team_project.md @@ -32,4 +32,4 @@ data "aiven_account_team_project" "account_team_project1" { ### Read-Only - `id` (String) The ID of this resource. -- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. +- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:projects:write`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. diff --git a/docs/data-sources/alloydbomni.md b/docs/data-sources/alloydbomni.md index 4ebaee6ed..2402f08fa 100644 --- a/docs/data-sources/alloydbomni.md +++ b/docs/data-sources/alloydbomni.md @@ -41,7 +41,7 @@ the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_account_credentials` (String, Sensitive) Your [Google service account key](https://cloud.google.com/iam/docs/service-account-creds#key-types) in JSON format. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) diff --git a/docs/data-sources/cassandra.md b/docs/data-sources/cassandra.md index d557f0f74..1a5a3a8c4 100644 --- a/docs/data-sources/cassandra.md +++ b/docs/data-sources/cassandra.md @@ -43,7 +43,7 @@ data "aiven_cassandra" "example_cassandra" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/clickhouse.md b/docs/data-sources/clickhouse.md index 12380951c..adcc60d31 100644 --- a/docs/data-sources/clickhouse.md +++ b/docs/data-sources/clickhouse.md @@ -43,7 +43,7 @@ data "aiven_clickhouse" "example_clickhouse" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/dragonfly.md b/docs/data-sources/dragonfly.md index e6f06d457..fbc0dcc58 100644 --- a/docs/data-sources/dragonfly.md +++ b/docs/data-sources/dragonfly.md @@ -43,7 +43,7 @@ data "aiven_dragonfly" "example_dragonfly" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/flink.md b/docs/data-sources/flink.md index cad91e81f..7d9c0dd9e 100644 --- a/docs/data-sources/flink.md +++ b/docs/data-sources/flink.md @@ -43,7 +43,7 @@ data "aiven_flink" "example_flink" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/grafana.md b/docs/data-sources/grafana.md index 7966f40d6..d55d0a1ed 100644 --- a/docs/data-sources/grafana.md +++ b/docs/data-sources/grafana.md @@ -43,7 +43,7 @@ data "aiven_grafana" "example_grafana" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/kafka.md b/docs/data-sources/kafka.md index 672cbaf8a..deb690c24 100644 --- a/docs/data-sources/kafka.md +++ b/docs/data-sources/kafka.md @@ -45,7 +45,7 @@ data "aiven_kafka" "example_kafka" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/kafka_connect.md b/docs/data-sources/kafka_connect.md index d26bc00d6..2dbc39e55 100644 --- a/docs/data-sources/kafka_connect.md +++ b/docs/data-sources/kafka_connect.md @@ -42,7 +42,7 @@ data "aiven_kafka_connect" "example_kafka_connect" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/kafka_mirrormaker.md b/docs/data-sources/kafka_mirrormaker.md index cd7ad0602..d98ee9346 100644 --- a/docs/data-sources/kafka_mirrormaker.md +++ b/docs/data-sources/kafka_mirrormaker.md @@ -42,7 +42,7 @@ data "aiven_kafka_mirrormaker" "mm1" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/m3aggregator.md b/docs/data-sources/m3aggregator.md index ceebd9d25..9f49f0891 100644 --- a/docs/data-sources/m3aggregator.md +++ b/docs/data-sources/m3aggregator.md @@ -43,7 +43,7 @@ data "aiven_m3aggregator" "m3a" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/m3db.md b/docs/data-sources/m3db.md index b4a855091..0afbc299f 100644 --- a/docs/data-sources/m3db.md +++ b/docs/data-sources/m3db.md @@ -43,7 +43,7 @@ data "aiven_m3db" "example_m3db" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/mysql.md b/docs/data-sources/mysql.md index 2cc3128ca..a0909ca6b 100644 --- a/docs/data-sources/mysql.md +++ b/docs/data-sources/mysql.md @@ -43,7 +43,7 @@ data "aiven_mysql" "mysql1" { - `mysql` (List of Object, Sensitive) MySQL specific server provided values (see [below for nested schema](#nestedatt--mysql)) - `mysql_user_config` (List of Object) Mysql user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedatt--mysql_user_config)) - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/opensearch.md b/docs/data-sources/opensearch.md index 690426c4e..16f5c85ce 100644 --- a/docs/data-sources/opensearch.md +++ b/docs/data-sources/opensearch.md @@ -43,7 +43,7 @@ data "aiven_opensearch" "os1" { - `opensearch` (List of Object, Sensitive) OpenSearch server provided values (see [below for nested schema](#nestedatt--opensearch)) - `opensearch_user_config` (List of Object) Opensearch user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedatt--opensearch_user_config)) - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/pg.md b/docs/data-sources/pg.md index 06b6abbb8..023ed2728 100644 --- a/docs/data-sources/pg.md +++ b/docs/data-sources/pg.md @@ -43,7 +43,7 @@ data "aiven_pg" "example_postgres" { - `pg` (List of Object, Sensitive) Values provided by the PostgreSQL server. (see [below for nested schema](#nestedatt--pg)) - `pg_user_config` (List of Object) Pg user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedatt--pg_user_config)) - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/project_user.md b/docs/data-sources/project_user.md index 72e44b36b..d983a6273 100644 --- a/docs/data-sources/project_user.md +++ b/docs/data-sources/project_user.md @@ -31,4 +31,4 @@ data "aiven_project_user" "mytestuser" { - `accepted` (Boolean) Whether the user has accepted the request to join the project. Users get an invite and become project members after accepting the invite. - `id` (String) The ID of this resource. -- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. +- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:projects:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. diff --git a/docs/data-sources/redis.md b/docs/data-sources/redis.md index 984a235cc..df20dcb8c 100644 --- a/docs/data-sources/redis.md +++ b/docs/data-sources/redis.md @@ -41,7 +41,7 @@ data "aiven_redis" "redis1" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `redis` (List of Object, Sensitive) Redis server provided values (see [below for nested schema](#nestedatt--redis)) - `redis_user_config` (List of Object) Redis user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedatt--redis_user_config)) - `service_host` (String) The hostname of the service. diff --git a/docs/data-sources/thanos.md b/docs/data-sources/thanos.md index 77fe64d0b..274785956 100644 --- a/docs/data-sources/thanos.md +++ b/docs/data-sources/thanos.md @@ -41,7 +41,7 @@ data "aiven_thanos" "example_thanos" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/data-sources/valkey.md b/docs/data-sources/valkey.md index e1b4060eb..5f1681ae1 100644 --- a/docs/data-sources/valkey.md +++ b/docs/data-sources/valkey.md @@ -41,7 +41,7 @@ data "aiven_valkey" "example_valkey" { - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing). -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_host` (String) The hostname of the service. - `service_integrations` (Set of Object) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedatt--service_integrations)) - `service_password` (String, Sensitive) Password used for connecting to the service, if applicable diff --git a/docs/resources/account_team_project.md b/docs/resources/account_team_project.md index b321e822e..6d2a3f992 100644 --- a/docs/resources/account_team_project.md +++ b/docs/resources/account_team_project.md @@ -48,7 +48,7 @@ resource "aiven_account_team_project" "main" { ### Optional - `project_name` (String) The name of an already existing project -- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. +- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:projects:write`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) ### Read-Only diff --git a/docs/resources/alloydbomni.md b/docs/resources/alloydbomni.md index d7184a1bb..9b9ce8070 100644 --- a/docs/resources/alloydbomni.md +++ b/docs/resources/alloydbomni.md @@ -63,7 +63,7 @@ resource "aiven_alloydbomni" "example_alloydbomni" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_account_credentials` (String, Sensitive) Your [Google service account key](https://cloud.google.com/iam/docs/service-account-creds#key-types) in JSON format. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again diff --git a/docs/resources/cassandra.md b/docs/resources/cassandra.md index 4a1795096..fdb72d6e0 100644 --- a/docs/resources/cassandra.md +++ b/docs/resources/cassandra.md @@ -49,7 +49,7 @@ resource "aiven_cassandra" "example_cassandra" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/clickhouse.md b/docs/resources/clickhouse.md index cd22b02f5..8c2c4c7a5 100644 --- a/docs/resources/clickhouse.md +++ b/docs/resources/clickhouse.md @@ -41,7 +41,7 @@ resource "aiven_clickhouse" "example_clickhouse" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/dragonfly.md b/docs/resources/dragonfly.md index b838c2bc8..6a133a6d5 100644 --- a/docs/resources/dragonfly.md +++ b/docs/resources/dragonfly.md @@ -43,7 +43,7 @@ resource "aiven_dragonfly" "example_dragonfly" { - `dragonfly_user_config` (Block List, Max: 1) Dragonfly user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--dragonfly_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/flink.md b/docs/resources/flink.md index b4edd3b11..d47e8d14a 100644 --- a/docs/resources/flink.md +++ b/docs/resources/flink.md @@ -45,7 +45,7 @@ resource "aiven_flink" "example_flink" { - `flink_user_config` (Block List, Max: 1) Flink user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--flink_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/grafana.md b/docs/resources/grafana.md index 0aab220ec..b4f3b124b 100644 --- a/docs/resources/grafana.md +++ b/docs/resources/grafana.md @@ -49,7 +49,7 @@ resource "aiven_grafana" "example_grafana" { - `grafana_user_config` (Block List, Max: 1) Grafana user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--grafana_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/kafka.md b/docs/resources/kafka.md index 60d2c0209..4db60b7a8 100644 --- a/docs/resources/kafka.md +++ b/docs/resources/kafka.md @@ -60,7 +60,7 @@ resource "aiven_kafka" "example_kafka" { - `karapace` (Boolean, Deprecated) Switch the service to use [Karapace](https://aiven.io/docs/products/kafka/karapace) for schema registry and REST proxy. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/kafka_connect.md b/docs/resources/kafka_connect.md index 67c323264..ded9616e7 100644 --- a/docs/resources/kafka_connect.md +++ b/docs/resources/kafka_connect.md @@ -84,7 +84,7 @@ resource "aiven_service_integration" "kafka_connect_integration" { - `kafka_connect_user_config` (Block List, Max: 1) KafkaConnect user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--kafka_connect_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/kafka_mirrormaker.md b/docs/resources/kafka_mirrormaker.md index 7487caa8d..b0be4af59 100644 --- a/docs/resources/kafka_mirrormaker.md +++ b/docs/resources/kafka_mirrormaker.md @@ -48,7 +48,7 @@ resource "aiven_kafka_mirrormaker" "mm1" { - `kafka_mirrormaker_user_config` (Block List, Max: 1) KafkaMirrormaker user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--kafka_mirrormaker_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/m3aggregator.md b/docs/resources/m3aggregator.md index ebb2d5610..30e767464 100644 --- a/docs/resources/m3aggregator.md +++ b/docs/resources/m3aggregator.md @@ -45,7 +45,7 @@ resource "aiven_m3aggregator" "m3a" { - `m3aggregator_user_config` (Block List, Max: 1) M3aggregator user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--m3aggregator_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/m3db.md b/docs/resources/m3db.md index 49e5de062..a415bba4d 100644 --- a/docs/resources/m3db.md +++ b/docs/resources/m3db.md @@ -50,7 +50,7 @@ resource "aiven_m3db" "example_m3db" { - `m3db_user_config` (Block List, Max: 1) M3db user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--m3db_user_config)) - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/mysql.md b/docs/resources/mysql.md index 131ede067..4e69a4c45 100644 --- a/docs/resources/mysql.md +++ b/docs/resources/mysql.md @@ -54,7 +54,7 @@ resource "aiven_mysql" "mysql1" { - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `mysql` (Block List, Max: 1) MySQL specific server provided values (see [below for nested schema](#nestedblock--mysql)) - `mysql_user_config` (Block List, Max: 1) Mysql user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--mysql_user_config)) -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/opensearch.md b/docs/resources/opensearch.md index 2ef982315..236d60442 100644 --- a/docs/resources/opensearch.md +++ b/docs/resources/opensearch.md @@ -55,7 +55,7 @@ resource "aiven_opensearch" "os1" { - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `opensearch` (Block List, Max: 1) OpenSearch server provided values (see [below for nested schema](#nestedblock--opensearch)) - `opensearch_user_config` (Block List, Max: 1) Opensearch user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--opensearch_user_config)) -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/organization_group_project.md b/docs/resources/organization_group_project.md index 8b817cd87..3ad480c17 100644 --- a/docs/resources/organization_group_project.md +++ b/docs/resources/organization_group_project.md @@ -51,7 +51,7 @@ resource "aiven_organization_group_project" "example" { - `group_id` (String) The ID of the user group. - `project` (String) The project that the users in the group are members of. -- `role` (String) [Project-level role](https://aiven.io/docs/platform/reference/project-member-privileges) assigned to all users in the group. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. +- `role` (String) [Project-level role](https://aiven.io/docs/platform/reference/project-member-privileges) assigned to all users in the group. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `service:configuration:write`, `service:logs:read`, `project:services:read`, `project:services:write`, `project:audit_logs:read`, `service:data:write`, `service:secrets:read`, `service:users:write`, `role:services:maintenance`, `role:services:recover`, `organization:audit_logs:read`, `organization:projects:write`, `organization:users:write`, `organization:app_users:write`, `organization:groups:write`, `organization:idps:write`, `organization:domains:write` and `role:organization:admin`. ### Optional diff --git a/docs/resources/organization_permission.md b/docs/resources/organization_permission.md index 222ab9a70..8e87d5938 100644 --- a/docs/resources/organization_permission.md +++ b/docs/resources/organization_permission.md @@ -95,7 +95,7 @@ resource "aiven_organization_permission" "example_org_permissions" { Required: -- `permissions` (Set of String) List of [roles and permissions](https://aiven.io/docs/platform/concepts/permissions) to grant. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. +- `permissions` (Set of String) List of [roles and permissions](https://aiven.io/docs/platform/concepts/permissions) to grant. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:projects:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. - `principal_id` (String) ID of the user or group to grant permissions to. Only active users who have accepted an [invite](https://aiven.io/docs/platform/howto/manage-org-users) to join the organization can be granted permissions. - `principal_type` (String) The type of principal. The possible values are `user` and `user_group`. diff --git a/docs/resources/pg.md b/docs/resources/pg.md index a969c8a89..23637770a 100644 --- a/docs/resources/pg.md +++ b/docs/resources/pg.md @@ -67,7 +67,7 @@ resource "aiven_pg" "example_postgres" { - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. - `pg` (Block List, Max: 1) Values provided by the PostgreSQL server. (see [below for nested schema](#nestedblock--pg)) - `pg_user_config` (Block List, Max: 1) Pg user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--pg_user_config)) -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/project_user.md b/docs/resources/project_user.md index 34b6bdae4..0333c11b9 100644 --- a/docs/resources/project_user.md +++ b/docs/resources/project_user.md @@ -33,7 +33,7 @@ resource "aiven_project_user" "mytestuser" { ### Required - `email` (String) Email address of the user in lowercase. Changing this property forces recreation of the resource. -- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. +- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `organization:app_users:write`, `organization:audit_logs:read`, `organization:domains:write`, `organization:groups:write`, `organization:idps:write`, `organization:projects:write`, `organization:users:write`, `project:audit_logs:read`, `project:integrations:read`, `project:integrations:write`, `project:networking:read`, `project:networking:write`, `project:permissions:read`, `project:services:read`, `project:services:write`, `read_only`, `role:organization:admin`, `role:services:maintenance`, `role:services:recover`, `service:configuration:write`, `service:data:write`, `service:logs:read`, `service:secrets:read` and `service:users:write`. - `project` (String) The name of 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 diff --git a/docs/resources/redis.md b/docs/resources/redis.md index 6e3d3ba24..6effaf31d 100644 --- a/docs/resources/redis.md +++ b/docs/resources/redis.md @@ -47,7 +47,7 @@ resource "aiven_redis" "redis1" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `redis` (Block List, Max: 1) Redis server provided values (see [below for nested schema](#nestedblock--redis)) - `redis_user_config` (Block List, Max: 1) Redis user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--redis_user_config)) - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) diff --git a/docs/resources/thanos.md b/docs/resources/thanos.md index b3a4c6acf..ac345a938 100644 --- a/docs/resources/thanos.md +++ b/docs/resources/thanos.md @@ -44,7 +44,7 @@ resource "aiven_thanos" "example_thanos" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/docs/resources/valkey.md b/docs/resources/valkey.md index be0bcfa0f..5103c1e5b 100644 --- a/docs/resources/valkey.md +++ b/docs/resources/valkey.md @@ -41,7 +41,7 @@ resource "aiven_valkey" "example_valkey" { - `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing. - `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc. - `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format. -- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data. +- `project_vpc_id` (String) The ID of the the `aiven_project_vpc` to deploy the service in.If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. You can move the service to a different VPC after creation. This migration can take some time to complete if the service has a lot of data.To deploy a service without VPC, set this to an empty string `""`. - `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) - `static_ips` (Set of String) Static IPs that are going to be associated with this service. Please assign a value using the 'toset' function. Once a static ip resource is in the 'assigned' state it cannot be unbound from the node again - `tag` (Block Set) Tags are key-value pairs that allow you to categorize services. (see [below for nested schema](#nestedblock--tag)) diff --git a/go.mod b/go.mod index b7d5a171c..15f25082f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23 require ( github.com/aiven/aiven-go-client/v2 v2.33.0 - github.com/aiven/go-client-codegen v0.74.0 + github.com/aiven/go-client-codegen v0.76.1-0.20241230111653-1207e4a9a7e2 github.com/avast/retry-go v3.0.0+incompatible github.com/dave/jennifer v1.7.1 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 4b08e60f6..db1abd421 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/aiven/go-api-schemas v1.106.0 h1:qncRsbiaGnU9JE9fmTFHclTCBem+t+6EPMXG github.com/aiven/go-api-schemas v1.106.0/go.mod h1:z7dGvufm6If4gOdVr7dWTuFZmll9FOZr5Z5CSxGpebA= github.com/aiven/go-client-codegen v0.74.0 h1:CqZUq8aGdhgcKJuM+YbC8RVUVgnCw9aA6yk0hMfvXWg= github.com/aiven/go-client-codegen v0.74.0/go.mod h1:QKN/GgLMGWd6+gPEucXlZPi5vC3C6RpD3UeBRQOLI1Y= +github.com/aiven/go-client-codegen v0.76.1-0.20241230111653-1207e4a9a7e2 h1:jxk+x0wT64b0Q/4nKS1cPIIc58WCdpprBIoIuHmhCW0= +github.com/aiven/go-client-codegen v0.76.1-0.20241230111653-1207e4a9a7e2/go.mod h1:QKN/GgLMGWd6+gPEucXlZPi5vC3C6RpD3UeBRQOLI1Y= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= diff --git a/internal/schemautil/custom_diff.go b/internal/schemautil/custom_diff.go index 2cbb796dd..06ee048e3 100644 --- a/internal/schemautil/custom_diff.go +++ b/internal/schemautil/custom_diff.go @@ -21,6 +21,7 @@ import ( func CustomizeDiffGenericService(serviceType string) schema.CustomizeDiffFunc { return customdiff.Sequence( SetServiceTypeIfEmpty(serviceType), + CustomizeDiffProjectVPCID, CustomizeDiffDisallowMultipleManyToOneKeys, customdiff.IfValueChange("tag", ShouldNotBeEmpty, @@ -320,3 +321,70 @@ func CustomizeDiffAdditionalDiskSpace(ctx context.Context, diff *schema.Resource // which otherwise will be suppressed by TF return diff.SetNew(k, "0B") } + +// CustomizeDiffProjectVPCID +// 1. Validates project_vpc_id when set +// 2. Sets project_vpc_id when there is only one VPC in the cloud (that's how it works on the backend) +func CustomizeDiffProjectVPCID(ctx context.Context, d *schema.ResourceDiff, _ any) error { + client, err := common.GenClient() + if err != nil { + return err + } + + if d.Id() != "" || HasConfigValue(d, "project_vpc_id") { + v := d.Get("project_vpc_id").(string) + if v != "" { + return validateProjectVPCID(ctx, client, v) + } + + // When a service has VPC ID, and project_vpc_id is set to "", this will force to show the plan. + // If we return nil here, the plan will omit the value. + return d.SetNew("project_vpc_id", "") + } + + // This logic copies the behavior of the backend. + // A new service is created in the VPC of the project in the cloud. + // This code will show it in the plan. + project := d.Get("project").(string) + list, err := client.VpcList(ctx, project) + if err != nil { + return err + } + + vpcIDs := make([]string, 0) + cloudName := d.Get("cloud_name").(string) + for _, v := range list { + if v.CloudName == cloudName { + vpcIDs = append(vpcIDs, v.ProjectVpcId) + } + } + + switch len(vpcIDs) { + case 0: + // It would be nice to set the project_vpc_id to an empty string here, + // but it just won't work because TF takes "" and nil as nothing set. + // That would still result in project_vpc_id marked "known after apply" in the plan, + // even though we know it's going to be empty. + return nil + case 1: + return d.SetNew("project_vpc_id", BuildResourceID(project, vpcIDs[0])) + } + + return fmt.Errorf( + "project %q has multiple active VPCs in cloud %q. Please specify the project_vpc_id: %s", + project, cloudName, strings.Join(vpcIDs, ", "), + ) +} + +func validateProjectVPCID(ctx context.Context, client avngen.Client, projectVPCID string) error { + project, vpcID, err := SplitResourceID2(projectVPCID) + if err != nil { + return err + } + + _, err = client.VpcGet(ctx, project, vpcID) + if avngen.IsNotFound(err) { + return fmt.Errorf("VPC ID %q not found in project %q", vpcID, project) + } + return err +} diff --git a/internal/schemautil/helpers.go b/internal/schemautil/helpers.go index 2f5ef0769..2f12bfadf 100644 --- a/internal/schemautil/helpers.go +++ b/internal/schemautil/helpers.go @@ -26,6 +26,19 @@ func HasConfigValue(d ResourceStateOrResourceDiff, key string) bool { return !(c.IsNull() || c.AsValueMap()[key].IsNull()) } +// GetConfigValue returns the value from config if it exists +// ResourceStateOrResourceDiff.GetOk returns values either from the config or the state, +// and "ok" might return "true" even if the value is not in the config. +func GetConfigValue(d ResourceStateOrResourceDiff, key string) (cty.Value, bool) { + config := d.GetRawConfig() + if config.IsNull() { + return config, false + } + + v, ok := config.AsValueMap()[key] + return v, ok && !v.IsNull() +} + // PlanParameters service plan aparameters type PlanParameters struct { DiskSizeMBDefault int @@ -51,22 +64,19 @@ func GetAPIServiceIntegrations(d ResourceStateOrResourceDiff) []service.ServiceI return apiServiceIntegrations } -func GetProjectVPCIdPointer(d ResourceStateOrResourceDiff) (*string, error) { - vpcID := d.Get("project_vpc_id").(string) - if len(vpcID) == 0 { +// GetProjectVPCIDFromConfig returns the VPC ID from the config if it exists. +// ResourceStateOrResourceDiff.GetOk returns values either from the config or the state for computed fields. +func GetProjectVPCIDFromConfig(d ResourceStateOrResourceDiff) (*string, error) { + v, ok := GetConfigValue(d, "project_vpc_id") + if !ok || v.AsString() == "" { return nil, nil } - var vpcIDPointer *string - - parts := strings.SplitN(vpcID, "/", 2) - if len(parts) != 2 { - return nil, fmt.Errorf("invalid project_vpc_id, should have the following format {project_name}/{project_vpc_id}") + _, vpcID, err := SplitResourceID2(v.AsString()) + if err != nil { + return nil, err } - - p1 := parts[1] - vpcIDPointer = &p1 - return vpcIDPointer, nil + return &vpcID, nil } func GetMaintenanceWindow(d ResourceStateOrResourceDiff) *service.MaintenanceIn { diff --git a/internal/schemautil/schemautil.go b/internal/schemautil/schemautil.go index 5f116c3a6..9e20b0f40 100644 --- a/internal/schemautil/schemautil.go +++ b/internal/schemautil/schemautil.go @@ -12,6 +12,8 @@ import ( "github.com/aiven/aiven-go-client/v2" "github.com/aiven/go-client-codegen/handler/service" "github.com/docker/go-units" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -195,6 +197,29 @@ func ValidateEmailAddress(v any, k string) (ws []string, errors []error) { return } +// ValidateIDN validates that the given string is a valid resource ID with n parts +func ValidateIDN(n int, expected ...string) schema.SchemaValidateDiagFunc { + if n != len(expected) { + panic(fmt.Sprintf("expected %d parts, got %d", n, len(expected))) + } + + return func(i any, _ cty.Path) diag.Diagnostics { + _, err := SplitResourceID(i.(string), n) + if err == nil { + return nil + } + + return diag.Errorf( + "invalid resource id, should have the following format %q", + strings.Join(expected, "/"), + ) + } +} + +func ValidateIDWithProject(expected string) schema.SchemaValidateDiagFunc { + return ValidateIDN(2, "project_name", expected) +} + func BuildResourceID(parts ...string) string { finalParts := make([]string, len(parts)) for idx, part := range parts { diff --git a/internal/schemautil/service.go b/internal/schemautil/service.go index 95dc5de30..99c19df98 100644 --- a/internal/schemautil/service.go +++ b/internal/schemautil/service.go @@ -17,6 +17,7 @@ import ( "github.com/aiven/go-client-codegen/handler/service" "github.com/aiven/go-client-codegen/handler/staticip" "github.com/docker/go-units" + "github.com/hashicorp/go-cty/cty" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -136,10 +137,24 @@ func ServiceCommonSchema() map[string]*schema.Schema { Description: "Aiven internal service type code", }, "project_vpc_id": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Description: "Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.", + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateDiagFunc: func(i interface{}, path cty.Path) diag.Diagnostics { + v := i.(string) + if v == "" { + // This is a workaround. + // The API assigns new services to a VPC if the project has a VPC in the same cloud. + // An empty string here means "no VPC". + return nil + } + return ValidateIDWithProject("project_vpc_id")(i, path) + }, + Description: "The ID of the the `aiven_project_vpc` to deploy the service in." + + "If not set, the service is automatically deployed in a VPC when that project has a VPC in the same cloud. " + + "You can move the service to a different VPC after creation. " + + "This migration can take some time to complete if the service has a lot of data." + + "To deploy a service without VPC, set this to an empty string `\"\"`.", }, "maintenance_window_dow": { Type: schema.TypeString, @@ -427,7 +442,7 @@ func resourceServiceCreate(ctx context.Context, d *schema.ResourceData, m interf return diag.Errorf("error getting default disc space: %s", err) } - vpcID, err := GetProjectVPCIdPointer(d) + vpcID, err := GetProjectVPCIDFromConfig(d) if err != nil { return diag.Errorf("error getting project VPC ID: %s", err) } @@ -522,8 +537,7 @@ func ResourceServiceUpdate(ctx context.Context, d *schema.ResourceData, m interf } } - var vpcID *string - vpcID, err = GetProjectVPCIdPointer(d) + vpcID, err := GetProjectVPCIDFromConfig(d) if err != nil { return diag.Errorf("error getting project VPC ID: %s", err) } @@ -757,10 +771,13 @@ func copyServicePropertiesFromAPIResponseToTerraform( return err } + var vpcID string if s.ProjectVpcId != "" { - if err := d.Set("project_vpc_id", BuildResourceID(project, s.ProjectVpcId)); err != nil { - return err - } + vpcID = BuildResourceID(project, s.ProjectVpcId) + } + + if err := d.Set("project_vpc_id", vpcID); err != nil { + return err } err := FlattenService(serviceType, d, s.UserConfig)