Skip to content

Commit

Permalink
Merge pull request #2018 from aiven/staceys-doc-1294
Browse files Browse the repository at this point in the history
docs: add EOL notice and migration guide for M3DB
  • Loading branch information
vmyroslav authored Jan 28, 2025
2 parents adb78df + 9d02fec commit dc81b70
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 20 deletions.
33 changes: 33 additions & 0 deletions docs/guides/update-deprecated-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,36 @@ resource "aiven_redis_user" "caching_example_user" {
```bash
terraform state list
```
## Migrate from M3DB to Thanos Metrics
Migrate your Aiven for M3 databases to [Aiven for Thanos Metrics](https://aiven.io/docs/products/metrics).
1. Create an Aiven for Thanos Metrics service to migrate your Aiven for M3 databases to using the `aiven_thanos` resource:
```hcl
resource "aiven_thanos" "example_thanos" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "business-4"
service_name = "example-thanos-service"
}
```
2. In the Aiven Console, [migrate your M3DB database to this Thanos service](https://aiven.io/docs/products/metrics/howto/migrate-m3db-thanos).
3. After the migration, remove the `aiven_m3db` and `aiven_m3db_user` resources.
-> **Note**
Aiven for Metrics does not have service users. You can grant access to the service using [project roles and permissions](https://registry.terraform.io/providers/aiven/aiven/latest/docs/resources/organization_permission).
4. To preview the changes, run:
```bash
terraform plan
```
5. To apply the changes, run:
```bash
terraform apply --auto-approve
```
19 changes: 10 additions & 9 deletions docs/resources/m3db.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_m3db Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an Aiven for M3DB https://aiven.io/docs/products/m3db service.
Creates and manages an Aiven for M3 https://aiven.io/docs/products/m3db service.
---

# aiven_m3db (Resource)

Creates and manages an [Aiven for M3DB](https://aiven.io/docs/products/m3db) service.
Creates and manages an [Aiven for M3](https://aiven.io/docs/products/m3db) service.

## Example Usage

~> **End of life notice**
**After 30 April 2025** all running Aiven for M3 services will be powered off and deleted, making data from these services inaccessible.
You cannot create M3DB services in Aiven projects that didn't have M3DB services before.
To avoid interruptions to your service, [migrate to Aiven for Thanos Metrics](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources#migrate-from-m3db-to-thanos-metrics)
before the end of life date.


## Example Usage
```terraform
resource "aiven_m3db" "example_m3db" {
project = data.aiven_project.example_project.project
Expand All @@ -31,7 +36,6 @@ resource "aiven_m3db" "example_m3db" {
}
}
```

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

Expand Down Expand Up @@ -310,11 +314,8 @@ Read-Only:
- `route` (String)
- `ssl` (Boolean)
- `usage` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_m3db.example_m3db PROJECT/SERVICE_NAME
```
18 changes: 9 additions & 9 deletions docs/resources/m3db_user.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "aiven_m3db_user Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an Aiven for M3DB service user.
Creates and manages an Aiven for M3 service user.
---

# aiven_m3db_user (Resource)

Creates and manages an Aiven for M3DB service user.
Creates and manages an Aiven for M3 service user.

## Example Usage
~> **End of life notice**
**After 30 April 2025** all running Aiven for M3 services will be powered off and deleted, making data from these services inaccessible.
You cannot create M3DB services in Aiven projects that didn't have M3DB services before.
To avoid interruptions to your service, [migrate to Aiven for Thanos Metrics](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources#migrate-from-m3db-to-thanos-metrics)
before the end of life date.


## Example Usage
```terraform
resource "aiven_m3db_user" "example_service_user" {
service_name = aiven_m3db.example_m3db.service_name
Expand All @@ -20,7 +24,6 @@ resource "aiven_m3db_user" "example_service_user" {
password = var.service_user_pw
}
```

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

Expand Down Expand Up @@ -50,11 +53,8 @@ Optional:
- `delete` (String)
- `read` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_m3db_user.example_service_user PROJECT/SERVICE_NAME/USERNAME
```
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/m3db/m3db.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func aivenM3DBSchema() map[string]*schema.Schema {
}
func ResourceM3DB() *schema.Resource {
return &schema.Resource{
Description: "Creates and manages an [Aiven for M3DB](https://aiven.io/docs/products/m3db) service.",
Description: "Creates and manages an [Aiven for M3](https://aiven.io/docs/products/m3db) service.",
CreateContext: schemautil.ResourceServiceCreateWrapper(schemautil.ServiceTypeM3),
ReadContext: schemautil.ResourceServiceRead,
UpdateContext: schemautil.ResourceServiceUpdate,
Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/m3db/m3db_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var aivenM3DBUserSchema = map[string]*schema.Schema{

func ResourceM3DBUser() *schema.Resource {
return &schema.Resource{
Description: "Creates and manages an Aiven for M3DB service user.",
Description: "Creates and manages an Aiven for M3 service user.",
CreateContext: schemautil.ResourceServiceUserCreate,
UpdateContext: schemautil.ResourceServiceUserUpdate,
ReadContext: schemautil.ResourceServiceUserRead,
Expand Down
33 changes: 33 additions & 0 deletions templates/guides/update-deprecated-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,36 @@ resource "aiven_redis_user" "caching_example_user" {
```bash
terraform state list
```
## Migrate from M3DB to Thanos Metrics
Migrate your Aiven for M3 databases to [Aiven for Thanos Metrics](https://aiven.io/docs/products/metrics).
1. Create an Aiven for Thanos Metrics service to migrate your Aiven for M3 databases to using the `aiven_thanos` resource:
```hcl
resource "aiven_thanos" "example_thanos" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "business-4"
service_name = "example-thanos-service"
}
```
2. In the Aiven Console, [migrate your M3DB database to this Thanos service](https://aiven.io/docs/products/metrics/howto/migrate-m3db-thanos).
3. After the migration, remove the `aiven_m3db` and `aiven_m3db_user` resources.
-> **Note**
Aiven for Metrics does not have service users. You can grant access to the service using [project roles and permissions](https://registry.terraform.io/providers/aiven/aiven/latest/docs/resources/organization_permission).
4. To preview the changes, run:
```bash
terraform plan
```
5. To apply the changes, run:
```bash
terraform apply --auto-approve
```
28 changes: 28 additions & 0 deletions templates/resources/m3db.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---
# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}


~> **End of life notice**
**After 30 April 2025** all running Aiven for M3 services will be powered off and deleted, making data from these services inaccessible.
You cannot create M3DB services in Aiven projects that didn't have M3DB services before.
To avoid interruptions to your service, [migrate to Aiven for Thanos Metrics](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources#migrate-from-m3db-to-thanos-metrics)
before the end of life date.


{{ if .HasExample -}}
## Example Usage
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
## Import
Import is supported using the following syntax:
{{ codefile "shell" .ImportFile }}
{{- end }}
27 changes: 27 additions & 0 deletions templates/resources/m3db_user.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---
# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

~> **End of life notice**
**After 30 April 2025** all running Aiven for M3 services will be powered off and deleted, making data from these services inaccessible.
You cannot create M3DB services in Aiven projects that didn't have M3DB services before.
To avoid interruptions to your service, [migrate to Aiven for Thanos Metrics](https://registry.terraform.io/providers/aiven/aiven/latest/docs/guides/update-deprecated-resources#migrate-from-m3db-to-thanos-metrics)
before the end of life date.


{{ if .HasExample -}}
## Example Usage
{{ tffile .ExampleFile }}
{{- end }}
{{ .SchemaMarkdown | trimspace }}
{{ if .HasImport -}}
## Import
Import is supported using the following syntax:
{{ codefile "shell" .ImportFile }}
{{- end }}

0 comments on commit dc81b70

Please sign in to comment.