Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ci(lint): add prealloc #1

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fc0c830
docs: update app users description (#1562)
staceysalamon-aiven Jan 26, 2024
5f02b88
build(deps): bump github.com/hashicorp/terraform-plugin-docs from 0.1…
dependabot[bot] Jan 26, 2024
8e9889d
docs: improve descriptions for billing groups (#1557)
staceysalamon-aiven Jan 26, 2024
589a638
ci(lint): add errorlint (#1561)
Jan 26, 2024
4a02b72
docs: update flink_application_version docs (#1514)
jeff-held-aiven Jan 26, 2024
30719c7
feat: dragonfly support
Serpentiel Jan 24, 2024
ca0c70c
feat: dragonfly support (#1554)
jeff-held-aiven Jan 26, 2024
d785c52
chore(changelog): fix typo (#1563)
Serpentiel Jan 29, 2024
0b079c1
build(deps): bump github.com/hashicorp/terraform-plugin-go from 0.20.…
dependabot[bot] Jan 29, 2024
a679624
build(deps): bump github.com/aiven/go-api-schemas from 1.56.0 to 1.57…
dependabot[bot] Jan 29, 2024
e0881b9
chore(kafka_topic): remove insufficient brokers retry logic (#1560)
ivan-savciuc Jan 29, 2024
9122dec
docs: add import and usage example for `aiven_flink_application_deplo…
rriski Jan 29, 2024
354b536
fix(org): removal of org group member (#1567)
ivan-savciuc Jan 29, 2024
c544477
chore: release v4.13.3 (#1568)
ivan-savciuc Jan 29, 2024
58d1bca
build(deps): bump github.com/hashicorp/terraform-plugin-mux from 0.13…
dependabot[bot] Jan 30, 2024
0a431b1
build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2…
dependabot[bot] Jan 30, 2024
749509f
fix(kafkaschema): diff suppress json object, acceptance tests (#1569)
Serpentiel Jan 30, 2024
4f0d554
build(deps): bump nick-invision/retry from 2 to 3 (#1573)
dependabot[bot] Feb 1, 2024
28780b0
build(deps): bump github.com/aiven/go-api-schemas from 1.57.0 to 1.58…
dependabot[bot] Feb 5, 2024
be9f640
ci(lint): add prealloc
Feb 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-

- uses: nick-invision/retry@v2
- uses: nick-invision/retry@v3
if: always()
with:
timeout_minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sweep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
go-version-file: go.mod

- uses: nick-invision/retry@v2
- uses: nick-invision/retry@v3
if: always()
with:
timeout_minutes: 15
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ linters:
- unconvert
- unused
- stylecheck
- errorlint
- prealloc

issues:
exclude:
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ nav_order: 1

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

<!-- TODO: uncomment when dragonfly is supported -->
<!-- - Dragonfly support -->
- Fix `aiven_kafka_schema` JSON object diff suppress function

## [4.13.3] - 2024-01-29

- Update example code in flink_application_version docs to be valid and not use deprecated schema members
- Fix `aiven_organization_user_group_member` deletion

## [4.13.2] - 2024-01-25

- Fix `aiven_organization_group_memeber` fill model
- Fix `aiven_organization_group_member` fill model
- Add `aiven_flink` service deletiong check

## [4.13.1] - 2024-01-19
Expand Down
36 changes: 18 additions & 18 deletions docs/data-sources/billing_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "aiven_billing_group Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Billing Group data source provides information about the existing Aiven Account.
Provides information about an existing billing group.
---

# aiven_billing_group (Data Source)

The Billing Group data source provides information about the existing Aiven Account.
Provides information about an existing billing group.

## Example Usage

Expand All @@ -23,23 +23,23 @@ data "aiven_billing_group" "foo" {

### Required

- `billing_group_id` (String) The id of the billing group. To set up proper dependencies please refer to this variable as a reference.
- `billing_group_id` (String) The ID of the billing group. To set up proper dependencies please refer to this variable as a reference.

### Read-Only

- `account_id` (String) Account id
- `address_lines` (Set of String) Address lines
- `billing_currency` (String) Billing currency
- `billing_emails` (Set of String) Billing contact emails
- `billing_extra_text` (String) Billing extra text
- `card_id` (String) Credit card id
- `city` (String) City
- `company` (String) Company name
- `copy_from_billing_group` (String) ID of the billing group to copy from
- `country_code` (String) Country code
- `account_id` (String) Account ID.
- `address_lines` (Set of String) Address lines 1 and 2. For example, street, PO box, or building.
- `billing_currency` (String) Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- `billing_emails` (Set of String) Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- `billing_extra_text` (String) Additional information to include on your invoice (for example, a reference number).
- `card_id` (String) Credit card ID.
- `city` (String) City, district, suburb, town, or village.
- `company` (String) Your company name.
- `copy_from_billing_group` (String) ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- `country_code` (String) Two-letter country code.
- `id` (String) The ID of this resource.
- `name` (String) Billing Group name
- `parent_id` (String) An optional property to link a billing group to an already existing organization or account by using its ID. To set up proper dependencies please refer to this variable as a reference.
- `state` (String) State
- `vat_id` (String) VAT id
- `zip_code` (String) Zip Code
- `name` (String) Name of the billing group.
- `parent_id` (String) Link a billing group to an existing organization or account by using its ID. To set up proper dependencies please refer to this variable as a reference.
- `state` (String) State or province.
- `vat_id` (String) The VAT identification number for your company.
- `zip_code` (String) Zip or postal code.
1 change: 1 addition & 0 deletions docs/data-sources/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Read-Only:
- `consumer_enable_auto_commit` (Boolean)
- `consumer_request_max_bytes` (Number)
- `consumer_request_timeout_ms` (Number)
- `name_strategy` (String)
- `name_strategy_validation` (Boolean)
- `producer_acks` (String)
- `producer_compression_type` (String)
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Read-Only:
- `redis_pubsub_client_output_buffer_limit` (Number)
- `redis_ssl` (Boolean)
- `redis_timeout` (Number)
- `redis_version` (String)
- `service_log` (Boolean)
- `service_to_fork_from` (String)
- `static_ips` (Boolean)
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/service_integration_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ Read-Only:
- `host` (String)
- `password` (String)
- `port` (Number)
- `ssl_client_certificate` (String)
- `ssl_client_key` (String)
- `ssl_mode` (String)
- `ssl_root_cert` (String)
- `username` (String)
Expand Down
34 changes: 17 additions & 17 deletions docs/resources/billing_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "aiven_billing_group Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The Billing Group resource allows the creation and management of Aiven Billing Groups and association with the Projects.
Creates and manages billing groups and assigns them to projects.
---

# aiven_billing_group (Resource)

The Billing Group resource allows the creation and management of Aiven Billing Groups and association with the Projects.
Creates and manages billing groups and assigns them to projects.

## Example Usage

Expand All @@ -30,25 +30,25 @@ resource "aiven_project" "pr1" {

### Required

- `name` (String) Billing Group name
- `name` (String) Name of the billing group.

### Optional

- `account_id` (String, Deprecated) Account id
- `address_lines` (Set of String) Address lines
- `billing_currency` (String) Billing currency
- `billing_emails` (Set of String) Billing contact emails
- `billing_extra_text` (String) Billing extra text
- `card_id` (String) Credit card id
- `city` (String) City
- `company` (String) Company name
- `copy_from_billing_group` (String) ID of the billing group to copy from
- `country_code` (String) Country code
- `parent_id` (String) An optional property to link a billing group to an already existing organization or account by using its ID. To set up proper dependencies please refer to this variable as a reference.
- `state` (String) State
- `account_id` (String, Deprecated) Account ID.
- `address_lines` (Set of String) Address lines 1 and 2. For example, street, PO box, or building.
- `billing_currency` (String) Billing currency for the billing group. Supported currencies are: AUD, CAD, CHF, DKK, EUR, GBP, JPY, NOK, NZD, SEK, SGD, and USD.
- `billing_emails` (Set of String) Email address of billing contacts. Invoices and other payment notifications are emailed to all billing contacts.
- `billing_extra_text` (String) Additional information to include on your invoice (for example, a reference number).
- `card_id` (String) Credit card ID.
- `city` (String) City, district, suburb, town, or village.
- `company` (String) Your company name.
- `copy_from_billing_group` (String) ID of the billing group to copy the company name, address, currency, billing contacts, and extra text from.
- `country_code` (String) Two-letter country code.
- `parent_id` (String) Link a billing group to an existing organization or account by using its ID. To set up proper dependencies please refer to this variable as a reference.
- `state` (String) State or province.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `vat_id` (String) VAT id
- `zip_code` (String) Zip Code
- `vat_id` (String) The VAT identification number for your company.
- `zip_code` (String) Zip or postal code.

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Optional:
- `backup_hour` (Number) The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.
- `backup_minute` (Number) The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.
- `cassandra` (Block List, Max: 1) cassandra configuration values. (see [below for nested schema](#nestedblock--cassandra_user_config--cassandra))
- `cassandra_version` (String) Cassandra major version.
- `cassandra_version` (String) Cassandra version.
- `ip_filter` (List of String, Deprecated) Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'.
- `ip_filter_object` (Block List, Max: 1024) Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'. (see [below for nested schema](#nestedblock--cassandra_user_config--ip_filter_object))
- `ip_filter_string` (List of String) Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'.
Expand Down
17 changes: 17 additions & 0 deletions docs/resources/flink_application_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ description: |-

The Flink Application Deployment resource allows the creation and management of Aiven Flink Application Deployments.

## Example Usage

```terraform
resource "aiven_flink_application_deployment" "deployment" {
project = data.aiven_project.foo.project
service_name = aiven_flink.foo.service_name
application_id = aiven_flink_application.foo_app.application_id
version_id = aiven_flink_application_version.foo_app_version.application_version_id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -45,3 +54,11 @@ Optional:
- `delete` (String)
- `read` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
terraform import aiven_flink_application_deployment.foo_deploy project/service/application_id/application_version_id/deployment_id
```
8 changes: 4 additions & 4 deletions docs/resources/flink_application_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ resource "aiven_flink_application_version" "foo" {
service_name = aiven_flink.foo.service_name
application_id = aiven_flink_application.foo.application_id
statement = <<EOT
INSERT INTO kafka_known_pizza SELECT * FROM kafka_pizza WHERE shop LIKE '%Luigis Pizza%'"
INSERT INTO kafka_known_pizza SELECT * FROM kafka_pizza WHERE shop LIKE '%Luigis Pizza%'
EOT
sinks {
sink {
create_table = <<EOT
"CREATE TABLE kafka_known_pizza (
CREATE TABLE kafka_known_pizza (
shop STRING,
name STRING
) WITH (
Expand All @@ -35,7 +35,7 @@ resource "aiven_flink_application_version" "foo" {
EOT
integration_id = aiven_service_integration.flink_to_kafka.integration_id
}
sources {
source {
create_table = <<EOT
CREATE TABLE kafka_pizza (
shop STRING,
Expand Down
1 change: 1 addition & 0 deletions docs/resources/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ Optional:
- `consumer_enable_auto_commit` (Boolean) If true the consumer's offset will be periodically committed to Kafka in the background. The default value is `true`.
- `consumer_request_max_bytes` (Number) Maximum number of bytes in unencoded message keys and values by a single request. The default value is `67108864`.
- `consumer_request_timeout_ms` (Number) The maximum total time to wait for messages for a request if the maximum number of messages has not yet been reached. The default value is `1000`.
- `name_strategy` (String) Name strategy to use when selecting subject for storing schemas. The default value is `topic_name`.
- `name_strategy_validation` (Boolean) If true, validate that given schema is registered under expected subject name by the used name strategy when producing messages. The default value is `true`.
- `producer_acks` (String) The number of acknowledgments the producer requires the leader to have received before considering a request complete. If set to 'all' or '-1', the leader will wait for the full set of in-sync replicas to acknowledge the record. The default value is `1`.
- `producer_compression_type` (String) Specify the default compression type for producers. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'none' which is the default and equivalent to no compression.
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/organization_application_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "aiven_organization_application_user Resource - terraform-provider-aiven"
subcategory: ""
description: |-
Creates and manages an organization application user in Aiven. Please note that this resource is in beta and may change without notice. To use this resource, please set the PROVIDERAIVENENABLE_BETA environment variable.
Creates and manages an organization application user. Application users can be used for programmatic access to the platform. This features is in the limited availability stage. Contact [email protected] to try this feature. Please note that this resource is in beta and may change without notice. To use this resource, please set the PROVIDERAIVENENABLE_BETA environment variable.
---

# aiven_organization_application_user (Resource)

Creates and manages an organization application user in Aiven. Please note that this resource is in beta and may change without notice. To use this resource, please set the PROVIDER_AIVEN_ENABLE_BETA environment variable.
Creates and manages an organization application user. Application users can be used for programmatic access to the platform. This features is in the limited availability stage. Contact [email protected] to try this feature. Please note that this resource is in beta and may change without notice. To use this resource, please set the PROVIDER_AIVEN_ENABLE_BETA environment variable.



Expand Down
1 change: 1 addition & 0 deletions docs/resources/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Optional:
- `redis_pubsub_client_output_buffer_limit` (Number) Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan.
- `redis_ssl` (Boolean) Require SSL to access Redis. The default value is `true`.
- `redis_timeout` (Number) Redis idle connection timeout in seconds. The default value is `300`.
- `redis_version` (String) Redis major version.
- `service_log` (Boolean) Store logs for the service so that they are available in the HTTP API and console.
- `service_to_fork_from` (String) Name of another service to fork from. This has effect only when a new service is being created.
- `static_ips` (Boolean) Use static public IP addresses.
Expand Down
4 changes: 3 additions & 1 deletion docs/resources/service_integration_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ Optional:
Required:

- `host` (String) Hostname or IP address of the server.
- `password` (String, Sensitive) Password.
- `port` (Number) Port number of the server.
- `username` (String) User name.

Optional:

- `password` (String, Sensitive) Password.
- `ssl_client_certificate` (String) Client certificate.
- `ssl_client_key` (String) Client key.
- `ssl_mode` (String) SSL Mode. The default value is `verify-full`.
- `ssl_root_cert` (String) SSL Root Cert.

Expand Down
65 changes: 56 additions & 9 deletions examples/flink/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,30 @@ variable "aiven_api_token" {
type = string
}

variable "aiven_card_id" {
type = string
}

provider "aiven" {
api_token = var.aiven_api_token
}

resource "aiven_project" "project" {
data "aiven_project" "prj" {
project = "flink-project"
card_id = var.aiven_card_id
}

resource "aiven_flink" "flink" {
project = aiven_project.project.project
project = data.aiven_project.prj.project
cloud_name = "google-europe-west1"
plan = "business-8"
service_name = "demo-flink"
}

resource "aiven_kafka" "kafka" {
project = aiven_project.project.project
project = data.aiven_project.prj.project
cloud_name = "google-europe-west1"
plan = "business-8"
service_name = "demo-kafka"
}

resource "aiven_service_integration" "flink_to_kafka" {
project = aiven_project.project.project
project = data.aiven_project.prj.project
integration_type = "flink"
destination_service_name = aiven_flink.flink.service_name
source_service_name = aiven_kafka.kafka.service_name
Expand All @@ -61,3 +56,55 @@ resource "aiven_kafka_topic" "sink" {
topic_name = "sink_topic"
}

resource "aiven_flink_application" "app" {
project = data.aiven_project.prj.project
service_name = aiven_flink.flink.service_name
name = "test-app"
}


resource "aiven_flink_application_version" "app_version" {
project = data.aiven_project.prj.project
service_name = aiven_flink.flink.service_name
application_id = aiven_flink_application.app.application_id
statement = <<EOT
INSERT INTO kafka_known_pizza SELECT * FROM kafka_pizza WHERE shop LIKE '%Luigis Pizza%'
EOT
sink {
create_table = <<EOT
CREATE TABLE kafka_known_pizza (
shop STRING,
name STRING
) WITH (
'connector' = 'kafka',
'properties.bootstrap.servers' = '',
'scan.startup.mode' = 'earliest-offset',
'topic' = 'sink_topic',
'value.format' = 'json'
)
EOT
integration_id = aiven_service_integration.flink_to_kafka.integration_id
}
source {
create_table = <<EOT
CREATE TABLE kafka_pizza (
shop STRING,
name STRING
) WITH (
'connector' = 'kafka',
'properties.bootstrap.servers' = '',
'scan.startup.mode' = 'earliest-offset',
'topic' = 'source_topic',
'value.format' = 'json'
)
EOT
integration_id = aiven_service_integration.flink_to_kafka.integration_id
}
}

resource "aiven_flink_application_deployment" "deployment" {
project = data.aiven_project.prj.project
service_name = aiven_flink.flink.service_name
application_id = aiven_flink_application.app.application_id
version_id = aiven_flink_application_version.app_version.application_version_id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import aiven_flink_application_deployment.foo_deploy project/service/application_id/application_version_id/deployment_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resource "aiven_flink_application_deployment" "deployment" {
project = data.aiven_project.foo.project
service_name = aiven_flink.foo.service_name
application_id = aiven_flink_application.foo_app.application_id
version_id = aiven_flink_application_version.foo_app_version.application_version_id
}
Loading
Loading