Skip to content

Commit

Permalink
Merge branch 'main' into staceys-app-users-doc-907
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentiel authored Mar 22, 2024
2 parents 150be4d + 274eb01 commit 9f7f7ed
Show file tree
Hide file tree
Showing 20 changed files with 187 additions and 122 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ nav_order: 1

## [MAJOR.MINOR.PATCH] - YYYY-MM-DD

## [4.15.0] - 2024-03-21

- Add Dragonfly resource (`aiven_dragonfly`) to allow for the creation and management of Dragonfly services
- Use new user config generator to generate service integration and service integration endpoint configs
- Fix `aiven_kafka_schema` version update
Expand Down
11 changes: 9 additions & 2 deletions docs/data-sources/dragonfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
page_title: "aiven_dragonfly Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Dragonfly data source provides information about the existing Aiven Dragonfly service.
Gets information about an Aiven for Dragonfly® service.
---

# aiven_dragonfly (Data Source)

The Dragonfly data source provides information about the existing Aiven Dragonfly service.
Gets information about an Aiven for Dragonfly® service.

## Example Usage

```terraform
data "aiven_dragonfly" "example_dragonfly" {
project = data.aiven_project.example_project.project
service_name = "example-dragonfly-service"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/service_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Read-Only:

Read-Only:

- `cluster_stats_enabled` (Boolean)
- `index_stats_enabled` (Boolean)
- `pending_task_stats_enabled` (Boolean)
- `pshard_stats_enabled` (Boolean)
Expand Down
25 changes: 23 additions & 2 deletions docs/resources/dragonfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,27 @@
page_title: "aiven_dragonfly Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The Dragonfly resource allows the creation and management of Aiven Dragonfly services.
Creates and manages an Aiven for Dragonfly® https://aiven.io/docs/products/dragonfly/concepts/overview service.
---

# aiven_dragonfly (Resource)

The Dragonfly resource allows the creation and management of Aiven Dragonfly services.
Creates and manages an [Aiven for Dragonfly®](https://aiven.io/docs/products/dragonfly/concepts/overview) service.

## Example Usage

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

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -189,3 +202,11 @@ Read-Only:
### Nested Schema for `dragonfly`

Read-Only:

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_dragonfly.example_dragonfly PROJECT/SERVICE_NAME
```
2 changes: 1 addition & 1 deletion docs/resources/organization_group_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aiven_organization_user_group" "example" {
name = "Example group"
}
resource "aiven_organization_user_group_project" "example" {
resource "aiven_organization_group_project" "example" {
group_id = aiven_organization_user_group.example.group_id
project = aiven_project.example.project
role = "admin"
Expand Down
1 change: 1 addition & 0 deletions docs/resources/service_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Optional:

Optional:

- `cluster_stats_enabled` (Boolean) Enable Datadog Opensearch Cluster Monitoring.
- `index_stats_enabled` (Boolean) Enable Datadog Opensearch Index Monitoring.
- `pending_task_stats_enabled` (Boolean) Enable Datadog Opensearch Pending Task Monitoring.
- `pshard_stats_enabled` (Boolean) Enable Datadog Opensearch Primary Shard Monitoring.
Expand Down
4 changes: 4 additions & 0 deletions examples/data-sources/aiven_dragonfly/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "aiven_dragonfly" "example_dragonfly" {
project = data.aiven_project.example_project.project
service_name = "example-dragonfly-service"
}
12 changes: 12 additions & 0 deletions examples/dragonfly/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
terraform {
required_providers {
aiven = {
source = "aiven/aiven"
version = ">=4.0.0, <5.0.0"
}
}
}

provider "aiven" {
api_token = var.aiven_token
}
10 changes: 10 additions & 0 deletions examples/dragonfly/service.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aiven_dragonfly" "example_dragonfly" {
project = var.aiven_project_name
plan = "startup-4"
cloud_name = "google-europe-west1"
service_name = "example-dragonfly-service"

dragonfly_user_config {
cache_mode = true
}
}
9 changes: 9 additions & 0 deletions examples/dragonfly/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
variable "aiven_token" {
description = "Aiven token"
type = string
}

variable "aiven_project_name" {
description = "Aiven project name"
type = string
}
1 change: 1 addition & 0 deletions examples/resources/aiven_dragonfly/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import aiven_dragonfly.example_dragonfly PROJECT/SERVICE_NAME
10 changes: 10 additions & 0 deletions examples/resources/aiven_dragonfly/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aiven_dragonfly" "example_dragonfly" {
project = data.aiven_project.example_project.project
plan = "startup-4"
cloud_name = "google-europe-west1"
service_name = "example-dragonfly-service"

dragonfly_user_config {
cache_mode = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ resource "aiven_organization_user_group" "example" {
name = "Example group"
}

resource "aiven_organization_user_group_project" "example" {
resource "aiven_organization_group_project" "example" {
group_id = aiven_organization_user_group.example.group_id
project = aiven_project.example.project
role = "admin"
}
}
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ require (
github.com/avast/retry-go v3.0.0+incompatible
github.com/dave/jennifer v1.7.0
github.com/docker/go-units v0.5.0
github.com/ettle/strcase v0.2.0
github.com/google/go-cmp v0.6.0
github.com/gruntwork-io/terratest v0.46.12
github.com/gruntwork-io/terratest v0.46.13
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-framework v1.6.1
github.com/hashicorp/terraform-plugin-framework v1.7.0
github.com/hashicorp/terraform-plugin-go v0.22.1
github.com/hashicorp/terraform-plugin-mux v0.15.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0
Expand Down Expand Up @@ -56,7 +55,7 @@ require (
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/storage v1.36.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/aiven/go-api-schemas v1.65.0
github.com/aiven/go-api-schemas v1.66.0
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
16 changes: 6 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,10 @@ github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiA
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/aiven/aiven-go-client/v2 v2.13.0 h1:N2c+EdRh9gg2PBKAwII6vMy9+WnDnbVU4Uy1mQGmMKg=
github.com/aiven/aiven-go-client/v2 v2.13.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU=
github.com/aiven/aiven-go-client/v2 v2.14.0 h1:4FEbB3baj+jA3Gd3vXpzoN6Vi9lGLCcIAYo75vSnx4k=
github.com/aiven/aiven-go-client/v2 v2.14.0/go.mod h1:x0xhzxWEKAwKv0xY5FvECiI6tesWshcPHvjwl0B/1SU=
github.com/aiven/go-api-schemas v1.65.0 h1:r4ooY83kWwkQQPCq55W4oHitNv+SZ2fzVDxuY3KwU28=
github.com/aiven/go-api-schemas v1.65.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I=
github.com/aiven/go-api-schemas v1.66.0 h1:Bn7E4CLcV9GMOdwmVtPEPud/9AKh/1fw7qT3epV+LXE=
github.com/aiven/go-api-schemas v1.66.0/go.mod h1:/bPxBUHza/2Aeer6hIIdB++GxKiw9K1KCBtRa2rtZ5I=
github.com/aiven/go-client-codegen v0.3.0 h1:RoIHSjMpJ+adYDJPfu9TBHaikQzMPocp1bwD2gqritc=
github.com/aiven/go-client-codegen v0.3.0/go.mod h1:qQ5dwRfNnGS4eAYk7JdC5htQI85g7eA/e71ZLyY8pQw=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
Expand Down Expand Up @@ -265,8 +263,6 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q=
github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
Expand Down Expand Up @@ -394,8 +390,8 @@ github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/gruntwork-io/terratest v0.46.12 h1:yz2mFk0GKnkn2Cofb587mePBkATl9HFMOlfRzZbO4D8=
github.com/gruntwork-io/terratest v0.46.12/go.mod h1:8jNhyxN3JLlzE6rmqJZa7R7UFYtUumt0NkCeJQOtxt4=
github.com/gruntwork-io/terratest v0.46.13 h1:FDaEoZ7DtkomV8pcwLdBV/VsytdjnPRqJkIriYEYwjs=
github.com/gruntwork-io/terratest v0.46.13/go.mod h1:8sxu3Qup8TxtbzOHzq0MUrQffJj/G61/OwlsReaCwpo=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
Expand Down Expand Up @@ -437,8 +433,8 @@ github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8J
github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw=
github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U=
github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
github.com/hashicorp/terraform-plugin-framework v1.6.1 h1:hw2XrmUu8d8jVL52ekxim2IqDc+2Kpekn21xZANARLU=
github.com/hashicorp/terraform-plugin-framework v1.6.1/go.mod h1:aJI+n/hBPhz1J+77GdgNfk5svW12y7fmtxe/5L5IuwI=
github.com/hashicorp/terraform-plugin-framework v1.7.0 h1:wOULbVmfONnJo9iq7/q+iBOBJul5vRovaYJIu2cY/Pw=
github.com/hashicorp/terraform-plugin-framework v1.7.0/go.mod h1:jY9Id+3KbZ17OMpulgnWLSfwxNVYSoYBQFTgsx044CI=
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 h1:gm5b1kHgFFhaKFhm4h2TgvMUlNzFAtUqlcOWnWPm+9E=
github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1/go.mod h1:MsjL1sQ9L7wGwzJ5RjcI6FzEMdyoBnw+XK8ZnOvQOLY=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc=
Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/dragonfly/dragonfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func dragonflySchema() map[string]*schema.Schema {

func ResourceDragonfly() *schema.Resource {
return &schema.Resource{
Description: "The Dragonfly resource allows the creation and management of Aiven Dragonfly services.",
Description: "Creates and manages an [Aiven for Dragonfly®](https://aiven.io/docs/products/dragonfly/concepts/overview) service.",
CreateContext: schemautil.ResourceServiceCreateWrapper(schemautil.ServiceTypeDragonfly),
ReadContext: schemautil.ResourceServiceRead,
UpdateContext: schemautil.ResourceServiceUpdate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func DatasourceDragonfly() *schema.Resource {
return &schema.Resource{
ReadContext: schemautil.DatasourceServiceRead,
Description: "The Dragonfly data source provides information about the existing Aiven Dragonfly service.",
Description: "Gets information about an Aiven for Dragonfly® service.",
Schema: schemautil.ResourceSchemaAsDatasourceSchema(dragonflySchema(), "project", "service_name"),
}
}
5 changes: 5 additions & 0 deletions internal/sdkprovider/userconfig/serviceintegration/datadog.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9f7f7ed

Please sign in to comment.