From e210a844219f948d964dbbb4d88589797f398551 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Tue, 3 Dec 2024 10:27:18 +0100 Subject: [PATCH] feat: add disaster_recovery integration type --- CHANGELOG.md | 1 + docs/data-sources/cassandra.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/redis.md | 2 +- docs/data-sources/thanos.md | 2 +- docs/data-sources/valkey.md | 2 +- docs/resources/cassandra.md | 4 +-- docs/resources/dragonfly.md | 4 +-- docs/resources/flink.md | 4 +-- docs/resources/grafana.md | 4 +-- docs/resources/kafka.md | 4 +-- docs/resources/kafka_connect.md | 4 +-- docs/resources/kafka_mirrormaker.md | 4 +-- docs/resources/m3aggregator.md | 4 +-- docs/resources/m3db.md | 4 +-- docs/resources/mysql.md | 4 +-- docs/resources/opensearch.md | 4 +-- docs/resources/pg.md | 4 +-- docs/resources/redis.md | 4 +-- docs/resources/thanos.md | 4 +-- docs/resources/valkey.md | 4 +-- internal/schemautil/custom_diff.go | 2 +- internal/schemautil/helpers.go | 27 +++++++-------- internal/schemautil/schemautil.go | 25 ++++---------- internal/schemautil/service.go | 48 ++++++++++++++++---------- 35 files changed, 94 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2972aa40a..4545992ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ nav_order: 1 ## [MAJOR.MINOR.PATCH] - YYYY-MM-DD +- Add `disaster_recovery` service integration type support - Add `aiven_opensearch` resource field `opensearch_user_config.opensearch.search_insights_top_queries` - Add `aiven_thanos` resource field `thanos_user_config.private_access`: Allow access to selected service ports from private networks diff --git a/docs/data-sources/cassandra.md b/docs/data-sources/cassandra.md index 39ae598dd..d557f0f74 100644 --- a/docs/data-sources/cassandra.md +++ b/docs/data-sources/cassandra.md @@ -45,7 +45,7 @@ data "aiven_cassandra" "example_cassandra" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/dragonfly.md b/docs/data-sources/dragonfly.md index f174d79b5..e6f06d457 100644 --- a/docs/data-sources/dragonfly.md +++ b/docs/data-sources/dragonfly.md @@ -45,7 +45,7 @@ data "aiven_dragonfly" "example_dragonfly" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/flink.md b/docs/data-sources/flink.md index 8b60397d8..cad91e81f 100644 --- a/docs/data-sources/flink.md +++ b/docs/data-sources/flink.md @@ -45,7 +45,7 @@ data "aiven_flink" "example_flink" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/grafana.md b/docs/data-sources/grafana.md index bdcdd859a..7966f40d6 100644 --- a/docs/data-sources/grafana.md +++ b/docs/data-sources/grafana.md @@ -45,7 +45,7 @@ data "aiven_grafana" "example_grafana" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/kafka.md b/docs/data-sources/kafka.md index 28f09dab3..672cbaf8a 100644 --- a/docs/data-sources/kafka.md +++ b/docs/data-sources/kafka.md @@ -47,7 +47,7 @@ data "aiven_kafka" "example_kafka" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/kafka_connect.md b/docs/data-sources/kafka_connect.md index e4e56cad6..d26bc00d6 100644 --- a/docs/data-sources/kafka_connect.md +++ b/docs/data-sources/kafka_connect.md @@ -44,7 +44,7 @@ data "aiven_kafka_connect" "example_kafka_connect" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/kafka_mirrormaker.md b/docs/data-sources/kafka_mirrormaker.md index 00878fd2e..cd7ad0602 100644 --- a/docs/data-sources/kafka_mirrormaker.md +++ b/docs/data-sources/kafka_mirrormaker.md @@ -44,7 +44,7 @@ data "aiven_kafka_mirrormaker" "mm1" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/m3aggregator.md b/docs/data-sources/m3aggregator.md index 25d0351bd..ceebd9d25 100644 --- a/docs/data-sources/m3aggregator.md +++ b/docs/data-sources/m3aggregator.md @@ -45,7 +45,7 @@ data "aiven_m3aggregator" "m3a" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/m3db.md b/docs/data-sources/m3db.md index 9b2577f2a..b4a855091 100644 --- a/docs/data-sources/m3db.md +++ b/docs/data-sources/m3db.md @@ -45,7 +45,7 @@ data "aiven_m3db" "example_m3db" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/mysql.md b/docs/data-sources/mysql.md index f3d96aa77..2cc3128ca 100644 --- a/docs/data-sources/mysql.md +++ b/docs/data-sources/mysql.md @@ -45,7 +45,7 @@ data "aiven_mysql" "mysql1" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/opensearch.md b/docs/data-sources/opensearch.md index aa0d1b0dd..d3ea5d128 100644 --- a/docs/data-sources/opensearch.md +++ b/docs/data-sources/opensearch.md @@ -45,7 +45,7 @@ data "aiven_opensearch" "os1" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/pg.md b/docs/data-sources/pg.md index 32a8a0732..ac5b9d4a7 100644 --- a/docs/data-sources/pg.md +++ b/docs/data-sources/pg.md @@ -45,7 +45,7 @@ data "aiven_pg" "example_postgres" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/redis.md b/docs/data-sources/redis.md index dded60bb3..984a235cc 100644 --- a/docs/data-sources/redis.md +++ b/docs/data-sources/redis.md @@ -45,7 +45,7 @@ data "aiven_redis" "redis1" { - `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. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/thanos.md b/docs/data-sources/thanos.md index d7a750862..77fe64d0b 100644 --- a/docs/data-sources/thanos.md +++ b/docs/data-sources/thanos.md @@ -43,7 +43,7 @@ data "aiven_thanos" "example_thanos" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/data-sources/valkey.md b/docs/data-sources/valkey.md index a657689c7..e1b4060eb 100644 --- a/docs/data-sources/valkey.md +++ b/docs/data-sources/valkey.md @@ -43,7 +43,7 @@ data "aiven_valkey" "example_valkey" { - `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. - `service_host` (String) The hostname of the service. -- `service_integrations` (List 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_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 - `service_port` (Number) The port of the service - `service_type` (String) Aiven internal service type code diff --git a/docs/resources/cassandra.md b/docs/resources/cassandra.md index b674582e8..7833a3713 100644 --- a/docs/resources/cassandra.md +++ b/docs/resources/cassandra.md @@ -50,7 +50,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -149,7 +149,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/dragonfly.md b/docs/resources/dragonfly.md index 0f1ddb795..37ba3fe08 100644 --- a/docs/resources/dragonfly.md +++ b/docs/resources/dragonfly.md @@ -44,7 +44,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -166,7 +166,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/flink.md b/docs/resources/flink.md index 0c6d8e42f..719928023 100644 --- a/docs/resources/flink.md +++ b/docs/resources/flink.md @@ -46,7 +46,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -130,7 +130,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/grafana.md b/docs/resources/grafana.md index 9a2eb6a6d..1c9feafa9 100644 --- a/docs/resources/grafana.md +++ b/docs/resources/grafana.md @@ -50,7 +50,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -303,7 +303,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/kafka.md b/docs/resources/kafka.md index da81254d4..fcbf18b1b 100644 --- a/docs/resources/kafka.md +++ b/docs/resources/kafka.md @@ -61,7 +61,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -386,7 +386,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/kafka_connect.md b/docs/resources/kafka_connect.md index 116d20c61..e29d49a64 100644 --- a/docs/resources/kafka_connect.md +++ b/docs/resources/kafka_connect.md @@ -85,7 +85,7 @@ resource "aiven_service_integration" "kafka_connect_integration" { - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -236,7 +236,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/kafka_mirrormaker.md b/docs/resources/kafka_mirrormaker.md index fd0b7cda9..c6cfb2d80 100644 --- a/docs/resources/kafka_mirrormaker.md +++ b/docs/resources/kafka_mirrormaker.md @@ -49,7 +49,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -124,7 +124,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/m3aggregator.md b/docs/resources/m3aggregator.md index 168ff46f7..40b01c7c2 100644 --- a/docs/resources/m3aggregator.md +++ b/docs/resources/m3aggregator.md @@ -46,7 +46,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -113,7 +113,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/m3db.md b/docs/resources/m3db.md index 348f8ece9..8bfcc1f6a 100644 --- a/docs/resources/m3db.md +++ b/docs/resources/m3db.md @@ -51,7 +51,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -264,7 +264,7 @@ Required: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/mysql.md b/docs/resources/mysql.md index 181564a13..665869c88 100644 --- a/docs/resources/mysql.md +++ b/docs/resources/mysql.md @@ -55,7 +55,7 @@ resource "aiven_mysql" "mysql1" { - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -237,7 +237,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/opensearch.md b/docs/resources/opensearch.md index 2d6173b4c..45acef729 100644 --- a/docs/resources/opensearch.md +++ b/docs/resources/opensearch.md @@ -56,7 +56,7 @@ resource "aiven_opensearch" "os1" { - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -573,7 +573,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/pg.md b/docs/resources/pg.md index aeecdf055..e65936267 100644 --- a/docs/resources/pg.md +++ b/docs/resources/pg.md @@ -68,7 +68,7 @@ resource "aiven_pg" "example_postgres" { - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -355,7 +355,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/redis.md b/docs/resources/redis.md index 5de553f69..5c6ef2694 100644 --- a/docs/resources/redis.md +++ b/docs/resources/redis.md @@ -50,7 +50,7 @@ resource "aiven_redis" "redis1" { - `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. - `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 List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -184,7 +184,7 @@ Optional: Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/thanos.md b/docs/resources/thanos.md index ef662958f..1a611542d 100644 --- a/docs/resources/thanos.md +++ b/docs/resources/thanos.md @@ -45,7 +45,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -75,7 +75,7 @@ resource "aiven_thanos" "example_thanos" { Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/docs/resources/valkey.md b/docs/resources/valkey.md index 3770f3b5f..dccf3dcef 100644 --- a/docs/resources/valkey.md +++ b/docs/resources/valkey.md @@ -42,7 +42,7 @@ resource "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. - `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. -- `service_integrations` (Block List) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations)) +- `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)) - `tech_emails` (Block Set) The email addresses for [service contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this service. You can also set email contacts at the project level. (see [below for nested schema](#nestedblock--tech_emails)) @@ -72,7 +72,7 @@ resource "aiven_valkey" "example_valkey" { Required: -- `integration_type` (String) Type of the service integration. The only supported value at the moment is `read_replica` +- `integration_type` (String) Type of the service integration. The possible values are `read_replica` and `disaster_recovery`. - `source_service_name` (String) Name of the source service diff --git a/internal/schemautil/custom_diff.go b/internal/schemautil/custom_diff.go index 14711b816..ae07cca94 100644 --- a/internal/schemautil/custom_diff.go +++ b/internal/schemautil/custom_diff.go @@ -62,7 +62,7 @@ func ShouldNotBeEmpty(_ context.Context, _, newValue, _ interface{}) bool { } func CustomizeDiffServiceIntegrationAfterCreation(_ context.Context, d *schema.ResourceDiff, _ interface{}) error { - if len(d.Id()) > 0 && d.HasChange("service_integrations") && len(d.Get("service_integrations").([]interface{})) != 0 { + if len(d.Id()) > 0 && d.HasChange("service_integrations") && len(GetSet(d, "service_integrations")) != 0 { return fmt.Errorf("service_integrations field can only be set during creation of a service") } return nil diff --git a/internal/schemautil/helpers.go b/internal/schemautil/helpers.go index 8bc93a794..cd0f4f6a0 100644 --- a/internal/schemautil/helpers.go +++ b/internal/schemautil/helpers.go @@ -32,22 +32,19 @@ type PlanParameters struct { } func GetAPIServiceIntegrations(d ResourceStateOrResourceDiff) []service.ServiceIntegrationIn { - var apiServiceIntegrations []service.ServiceIntegrationIn - tfServiceIntegrations := d.Get("service_integrations") - if tfServiceIntegrations != nil { - tfServiceIntegrationList := tfServiceIntegrations.([]interface{}) - for _, definition := range tfServiceIntegrationList { - definitionMap := definition.(map[string]interface{}) - sourceService := definitionMap["source_service_name"].(string) - userConfig := make(map[string]any) - integrationType := definitionMap["integration_type"].(string) - apiIntegration := service.ServiceIntegrationIn{ - IntegrationType: service.IntegrationType(integrationType), - SourceService: &sourceService, - UserConfig: &userConfig, - } - apiServiceIntegrations = append(apiServiceIntegrations, apiIntegration) + tfServiceIntegrations := GetSet(d, "service_integrations") + apiServiceIntegrations := make([]service.ServiceIntegrationIn, 0, len(tfServiceIntegrations)) + for _, definition := range tfServiceIntegrations { + definitionMap := definition.(map[string]interface{}) + sourceService := definitionMap["source_service_name"].(string) + userConfig := make(map[string]any) + integrationType := definitionMap["integration_type"].(string) + apiIntegration := service.ServiceIntegrationIn{ + IntegrationType: service.IntegrationType(integrationType), + SourceService: &sourceService, + UserConfig: &userConfig, } + apiServiceIntegrations = append(apiServiceIntegrations, apiIntegration) } return apiServiceIntegrations } diff --git a/internal/schemautil/schemautil.go b/internal/schemautil/schemautil.go index 73fb772e3..870d5a75f 100644 --- a/internal/schemautil/schemautil.go +++ b/internal/schemautil/schemautil.go @@ -74,24 +74,6 @@ func ToOptionalString(val interface{}) string { } } -func ParseOptionalStringToInt64(val interface{}) *int64 { - v, ok := val.(string) - if !ok { - return nil - } - - if v == "" { - return nil - } - - res, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return nil - } - - return &res -} - func CreateOnlyDiffSuppressFunc(_, _, _ string, d *schema.ResourceData) bool { return len(d.Id()) > 0 } @@ -264,7 +246,7 @@ func SplitResourceID4(resourceID string) (string, string, string, string, error) return parts[0], parts[1], parts[2], parts[3], nil } -func FlattenToString(a []interface{}) []string { +func FlattenToString[T any](a []T) []string { r := make([]string, len(a)) for i, v := range a { r[i] = fmt.Sprint(v) @@ -511,3 +493,8 @@ func Remarshal(in, out any) error { } return json.Unmarshal(b, out) } + +// GetSet returns set values by the key +func GetSet(d ResourceStateOrResourceDiff, key string) []any { + return d.Get(key).(*schema.Set).List() +} diff --git a/internal/schemautil/service.go b/internal/schemautil/service.go index db00759b3..fd8a04145 100644 --- a/internal/schemautil/service.go +++ b/internal/schemautil/service.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "fmt" + "slices" "strconv" "strings" "time" @@ -19,6 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/aiven/terraform-provider-aiven/internal/common" + "github.com/aiven/terraform-provider-aiven/internal/schemautil/userconfig" "github.com/aiven/terraform-provider-aiven/internal/sdkprovider/userconfig/converters" ) @@ -72,6 +74,13 @@ func ServiceCommonSchemaWithUserConfig(kind string) map[string]*schema.Schema { return s } +func bootstrapIntegrationTypes() []service.IntegrationType { + return []service.IntegrationType{ + service.IntegrationTypeReadReplica, + service.IntegrationTypeDisasterRecovery, + } +} + func ServiceCommonSchema() map[string]*schema.Schema { return map[string]*schema.Schema{ "project": CommonSchemaProjectReference, @@ -206,7 +215,7 @@ func ServiceCommonSchema() map[string]*schema.Schema { Description: "Service state. One of `POWEROFF`, `REBALANCING`, `REBUILDING` or `RUNNING`", }, "service_integrations": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Computed: true, Description: "Service integrations to specify when creating a service. Not applied after initial service creation", @@ -218,9 +227,10 @@ func ServiceCommonSchema() map[string]*schema.Schema { Description: "Name of the source service", }, "integration_type": { - Type: schema.TypeString, - Required: true, - Description: "Type of the service integration. The only supported value at the moment is `read_replica`", + Type: schema.TypeString, + Required: true, + Description: userconfig.Desc("Type of the service integration").PossibleValuesString(FlattenToString(bootstrapIntegrationTypes())...).Build(), + ValidateFunc: validation.StringInSlice(FlattenToString(bootstrapIntegrationTypes()), false), }, }, }, @@ -413,7 +423,7 @@ func resourceServiceCreate(ctx context.Context, d *schema.ResourceData, m interf cloud := d.Get("cloud_name").(string) terminationProtection := d.Get("termination_protection").(bool) - staticIps := FlattenToString(d.Get("static_ips").(*schema.Set).List()) + staticIps := FlattenToString(GetSet(d, "static_ips")) serviceIntegrations := GetAPIServiceIntegrations(d) var diskSpaceMb *int @@ -519,7 +529,7 @@ func ResourceServiceUpdate(ctx context.Context, d *schema.ResourceData, m interf return nil } - if len(getIntegrationsForTerraform(s.ServiceIntegrations, service.IntegrationTypeAutoscaler)) == 0 { + if len(flattenIntegrations(s.ServiceIntegrations, service.IntegrationTypeAutoscaler)) == 0 { diskSpace, err := getDiskSpaceFromStateOrDiff(ctx, d, client) if err != nil { return diag.Errorf("error getting default disc space: %s", err) @@ -612,18 +622,18 @@ func getTechnicalEmailsForTerraform(s *service.ServiceGetOut) *schema.Set { return schema.NewSet(schema.HashResource(TechEmailsResourceSchema), techEmails) } -func getIntegrationsForTerraform(integrations []service.ServiceIntegrationOut, integrationType service.IntegrationType) []map[string]interface{} { - var filteredIntegrations []map[string]interface{} - for _, integration := range integrations { - if integration.IntegrationType == integrationType { - integrationMap := map[string]interface{}{ - "integration_type": integration.IntegrationType, - "source_service_name": integration.SourceService, - } - filteredIntegrations = append(filteredIntegrations, integrationMap) +// flattenIntegrations converts the service integrations into a list of maps +func flattenIntegrations(integrations []service.ServiceIntegrationOut, kinds ...service.IntegrationType) []map[string]interface{} { + result := make([]map[string]any, 0) + for _, v := range integrations { + if slices.Contains(kinds, v.IntegrationType) { + result = append(result, map[string]any{ + "integration_type": v.IntegrationType, + "source_service_name": v.SourceService, + }) } } - return filteredIntegrations + return result } func ResourceServiceDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { @@ -774,9 +784,9 @@ func copyServicePropertiesFromAPIResponseToTerraform( return fmt.Errorf("cannot set `components` : %w", err) } - // Handle read_replica service integrations - readReplicaIntegrations := getIntegrationsForTerraform(s.ServiceIntegrations, service.IntegrationTypeReadReplica) - if err := d.Set("service_integrations", readReplicaIntegrations); err != nil { + // Handle service integrations + integrations := flattenIntegrations(s.ServiceIntegrations, bootstrapIntegrationTypes()...) + if err := d.Set("service_integrations", integrations); err != nil { return err }