diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cfed1be..e4ac819 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,53 +1,53 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile -{ - "name": "Existing Dockerfile", - "build": { - // Sets the run context to one level up instead of the .devcontainer folder. - // "context": "." - // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. - "dockerfile": "../Dockerfile" - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [ - 8080 - ], - "customizations": { - "vscode": { - "extensions": [ - "innoverio.vscode-dbt-power-user", - "ms-python.python", - "eamodio.gitlens", - "GitHub.vscode-pull-request-github", - "nemesv.copy-file-name" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": true, - "configureZshAsDefaultShell": true, - "installOhMyZsh": true, - "upgradePackages": true, - "username": "automatic", - "userUid": "automatic", - "userGid": "automatic" - }, - "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {} - }, - - // "runArgs": ["--env-file",".env"] - - // Uncomment the next line to run commands after the container is created. - // "postCreateCommand": "cat /etc/os-release", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "devcontainer" -} +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "Existing Dockerfile", + "build": { + // Sets the run context to one level up instead of the .devcontainer folder. + // "context": "." + // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. + "dockerfile": "../Dockerfile" + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 8080 + ], + "customizations": { + "vscode": { + "extensions": [ + "innoverio.vscode-dbt-power-user", + "ms-python.python", + "eamodio.gitlens", + "GitHub.vscode-pull-request-github", + "nemesv.copy-file-name" + ] + } + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true, + "upgradePackages": true, + "username": "automatic", + "userUid": "automatic", + "userGid": "automatic" + }, + "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {} + }, + + // "runArgs": ["--env-file",".env"] + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "devcontainer" +} diff --git a/.env.template b/.env.template index d273717..5fea79e 100644 --- a/.env.template +++ b/.env.template @@ -1,2 +1,2 @@ -CLICKHOUSE_USER=admin +CLICKHOUSE_USER=admin1 TF_VAR_clickhouse_password=clickhouse \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a83348d..8ad88d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,40 +1,40 @@ -name: Build and push image - -on: - # pull_request: - # branches: [ main ] - workflow_dispatch: - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ghcr.io/kzzzr/dbt_clickhouse_lab:ci - labels: ${{ steps.meta.outputs.labels }} +name: Build and push image + +on: + # pull_request: + # branches: [ main ] + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ghcr.io/kzzzr/dbt_clickhouse_lab:ci + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb8a664..0ca0165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,30 +1,30 @@ -name: Continuous Integration Tests - -on: - pull_request: - branches: [ main ] -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -jobs: - - ci_test: - name: Clickhouse CI - timeout-minutes: 5 - runs-on: ubuntu-latest - services: - clickhouse: - image: clickhouse/clickhouse-server:23.3 - ports: - - 9000:9000 - - 8123:8123 - container: - image: ghcr.io/kzzzr/dbt_clickhouse_lab:ci - steps: - - uses: actions/checkout@v3 - - run: dbt --version - - run: dbt debug --target ci - - run: dbt deps --target ci - - run: dbt run-operation init_s3_sources --target ci - - run: dbt build --target ci +name: Continuous Integration Tests + +on: + pull_request: + branches: [ main ] +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + + ci_test: + name: Clickhouse CI + timeout-minutes: 5 + runs-on: ubuntu-latest + services: + clickhouse: + image: clickhouse/clickhouse-server:23.3 + ports: + - 9000:9000 + - 8123:8123 + container: + image: ghcr.io/kzzzr/dbt_clickhouse_lab:ci + steps: + - uses: actions/checkout@v3 + - run: dbt --version + - run: dbt debug --target ci + - run: dbt deps --target ci + - run: dbt run-operation init_s3_sources --target ci + - run: dbt build --target ci diff --git a/.gitignore b/.gitignore index 50de3d5..a1bc6df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,44 +1,44 @@ -target/ -dbt_packages/ -logs/ - -.env - -# Local .terraform directories -**/.terraform/* - -# .tfstate files -*.tfstate -*.tfstate.* - -# Crash log files -crash.log -crash.*.log - -# Exclude all .tfvars files, which are likely to contain sensitive data, such as -# password, private keys, and other secrets. These should not be part of version -# control as they are data points which are potentially sensitive and subject -# to change depending on the environment. -*.tfvars -*.tfvars.json - -# Ignore override files as they are usually used to override resources locally and so -# are not checked in -override.tf -override.tf.json -*_override.tf -*_override.tf.json - -# Include override files you do wish to add to version control using negated pattern -# !example_override.tf - -# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan -# example: *tfplan* - -# Ignore CLI configuration files -.terraformrc -terraform.rc - -.terraform.lock.hcl - +target/ +dbt_packages/ +logs/ + +.env + +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Exclude all .tfvars files, which are likely to contain sensitive data, such as +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject +# to change depending on the environment. +*.tfvars +*.tfvars.json + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc + +.terraform.lock.hcl + .DS_Store \ No newline at end of file diff --git a/.user.yml b/.user.yml new file mode 100644 index 0000000..9114b59 --- /dev/null +++ b/.user.yml @@ -0,0 +1 @@ +id: 5cab8abc-a560-49ec-b59c-d4deb5c9905d diff --git a/Dockerfile b/Dockerfile index 1cb29e5..f2001ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,29 @@ -ARG DBT_VERSION=1.0.0 -FROM fishtownanalytics/dbt:${DBT_VERSION} - -# Terraform configuration file -# COPY terraformrc root/.terraformrc - -# Install utils -RUN apt -y update \ - && apt -y upgrade \ - && apt -y install curl wget gpg unzip - -# Install dbt adapter -RUN set -ex \ - && python -m pip install --upgrade pip setuptools \ - && python -m pip install --upgrade dbt-clickhouse - -# Install yc CLI -RUN curl https://storage.yandexcloud.net/yandexcloud-yc/install.sh | \ - bash -s -- -a - -# Install Terraform -ARG TERRAFORM_VERSION=1.4.6 -RUN curl -sL https://hashicorp-releases.yandexcloud.net/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \ - && unzip terraform.zip \ - && install -o root -g root -m 0755 terraform /usr/local/bin/terraform \ - && rm -rf terraform terraform.zip - -# Set default directory for dbt profiles -ENV DBT_PROFILES_DIR=. +ARG DBT_VERSION=1.0.0 +FROM fishtownanalytics/dbt:${DBT_VERSION} + +# Terraform configuration file +# COPY terraformrc root/.terraformrc + +# Install utils +RUN apt -y update \ + && apt -y upgrade \ + && apt -y install curl wget gpg unzip + +# Install dbt adapter +RUN set -ex \ + && python -m pip install --upgrade pip setuptools \ + && python -m pip install --upgrade dbt-clickhouse + +# Install yc CLI +RUN curl https://storage.yandexcloud.net/yandexcloud-yc/install.sh | \ + bash -s -- -a + +# Install Terraform +ARG TERRAFORM_VERSION=1.4.6 +RUN curl -sL https://hashicorp-releases.yandexcloud.net/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o terraform.zip \ + && unzip terraform.zip \ + && install -o root -g root -m 0755 terraform /usr/local/bin/terraform \ + && rm -rf terraform terraform.zip + +# Set default directory for dbt profiles +ENV DBT_PROFILES_DIR=. diff --git a/README.md b/README.md index 0603439..6781d9c 100644 --- a/README.md +++ b/README.md @@ -1,263 +1,263 @@ -# DWH powered by Clickhouse and dbt - -- Build DWH powered by [Clickhouse](https://clickhouse.com/) and [dbt](https://www.getdbt.com/) -- Deploy Infrastructure as Code with [Terraform](https://www.terraform.io/) and [Yandex.Cloud](https://cloud.yandex.com/en-ru/) -- Instant development with [Github Codespaces](https://docs.github.com/en/codespaces) -- Assignment checks with [Github Actions](https://github.com/features/actions) - -## Lab plan - -- [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) -- [Configure Developer Environment](#1-configure-developer-environment) - - Start with GitHub Codespaces - - Use devcontainer (locally) -- [Deploy Infrastructure to Yandex.Cloud with Terraform](#2-deploy-infrastructure-to-yandexcloud-with-terraform) - - Get familiar with Yandex.Cloud web UI - - Configure `yc` CLI - - Populate `.env` file, Set environment variables - - Deploy using Terraform: Clickhouse -- [Check database connection](#3-check-database-connection) - - Configure JDBC (DBeaver) connection - - Configure dbt connection -- [Deploy DWH](#4-deploy-dwh) - - Install dbt packages - - Stage data sources with dbt macro - - Describe sources in [sources.yml](./models/sources/sources.yml) file - - Build staging models - - Prepare a data mart (wide table) -- [Model read-optimized Data Mart](#5-model-read-optimized-data-mart) - - Turn SQL code into dbt model [f_orders_stats](./models/marts/f_orders_stats.sql) - - Open PR and trigger automated testing with Github Actions -- [Delete cloud resources](#delete-cloud-resources) - - -## 1. Configure Developer Environment - - -You have got several options to set up: - -
Start with GitHub Codespaces -

- -![GitHub Codespaces](./docs/github_codespaces.png) - -

-
- -
Use devcontainer (locally) -

- -1. Install [Docker](https://docs.docker.com/desktop/#download-and-install) on your local machine. - -1. Install devcontainer CLI: - - Open command palette (CMD + SHIFT+ P) type *Install devcontainer CLI* - - ![](./docs/install_devcontainer_cli.png) - -1. Next build and open dev container: - - ```bash - # build dev container - devcontainer build . - - # open dev container - devcontainer open . - ``` - -

-
- -Verify you are in a development container by running commands: - -```bash -terraform -v - -yc --version - -dbt --version -``` - -If any of these commands fails printing out used software version then you are probably running it on your local machine not in a dev container! - -## 2. Deploy Infrastructure to Yandex.Cloud with Terraform - -1. Get familiar with Yandex.Cloud web UI - - We will deploy: - - [Yandex Managed Service for ClickHouse](https://cloud.yandex.com/en/services/managed-clickhouse) - - ![](./docs/clickhouse_management_console.gif) - -1. Configure `yc` CLI: [Getting started with the command-line interface by Yandex Cloud](https://cloud.yandex.com/en/docs/cli/quickstart#install) - - ```bash - yc init - ``` - -1. Populate `.env` file - - `.env` is used to store secrets as environment variables. - - Copy template file [.env.template](./.env.template) to `.env` file: - ```bash - cp .env.template .env - ``` - - Open file in editor and set your own values. - - > ❗️ Never commit secrets to git - - -1. Set environment variables: - - ```bash - export YC_TOKEN=$(yc iam create-token) - export YC_CLOUD_ID=$(yc config get cloud-id) - export YC_FOLDER_ID=$(yc config get folder-id) - export $(xargs <.env) - ``` - -1. Deploy using Terraform - - Configure YC Terraform provider: - - ```bash - cp terraformrc ~/.terraformrc - ``` - - Get familiar with Cloud Infrastructure: [main.tf](./main.tf) and [variables.tf](./variables.tf) - - ```bash - terraform init - terraform validate - terraform fmt - terraform plan - terraform apply - ``` - - Store terraform output values as Environment Variables: - - ```bash - export CLICKHOUSE_HOST=$(terraform output -raw clickhouse_host_fqdn) - export DBT_HOST=${CLICKHOUSE_HOST} - export DBT_USER=${CLICKHOUSE_USER} - export DBT_PASSWORD=${TF_VAR_clickhouse_password} - ``` - - [EN] Reference: [Getting started with Terraform by Yandex Cloud](https://cloud.yandex.com/en/docs/tutorials/infrastructure-management/terraform-quickstart) - - [RU] Reference: [Начало работы с Terraform by Yandex Cloud](https://cloud.yandex.ru/docs/tutorials/infrastructure-management/terraform-quickstart) - -## 3. Check database connection - -[Configure JDBC (DBeaver) connection](https://cloud.yandex.ru/docs/managed-clickhouse/operations/connect#connection-ide): - -``` -port=8443 -socket_timeout=300000 -ssl=true -sslrootcrt= -``` - -![DBeaver + Clickhouse](./docs/clickhouse_dbeaver.png) - -Make sure dbt can connect to your target database: - -```bash -dbt debug -``` - -![dbt + Clickhouse connection](./docs/dbt_debug.png) - -If any errors check ENV values are present: - -```bash -env | grep DBT_ -``` - -## 4. Deploy DWH - -1. Install dbt packages - - ```bash - dbt deps - ``` - -1. Stage data sources with dbt macro - - Source data will be staged as EXTERNAL TABLES (S3) using dbt macro [init_s3_sources](./macros/init_s3_sources.sql): - - ```bash - dbt run-operation init_s3_sources - ``` - - Statements will be executed one by one to avoid error: - - ``` - DB::Exception: Syntax error (Multi-statements are not allowed) - ``` - -1. Describe sources in [sources.yml](./models/sources/sources.yml) file - -1. Build staging models: - - ```bash - dbt build -s tag:staging - ``` - - Check model configurations: `engine`, `order_by`, `partition_by` - -1. Prepare a data mart (wide table) - - Join all the tables into one [f_lineorder_flat](./models/marts/f_lineorder_flat.sql): - - ```bash - dbt build -s f_lineorder_flat - ``` - - Pay attentions to models being tested for keys being unique, not null. - -## 5. Model read-optimized Data Mart - -Turn the following SQL into dbt model [f_orders_stats](./models/marts/f_orders_stats.sql): - -```sql -SELECT - toYear(O_ORDERDATE) AS O_ORDERYEAR - , O_ORDERSTATUS - , O_ORDERPRIORITY - , count(DISTINCT O_ORDERKEY) AS num_orders - , count(DISTINCT C_CUSTKEY) AS num_customers - , sum(L_EXTENDEDPRICE * L_DISCOUNT) AS revenue -FROM -- PLEASE USE dbt's ref('') to ensure valid DAG execution! -WHERE 1=1 -GROUP BY - toYear(O_ORDERDATE) - , O_ORDERSTATUS - , O_ORDERPRIORITY -``` - -Make sure the tests pass: - -```bash -dbt build -s f_orders_stats -``` - -![](./docs/f_orders_stats.png) - -## 6. Create PR and make CI tests pass - -If it works from your terminal, commit, open PR and trigger automated testing with Github Actions - -![Github Actions check passed](./docs/github_checks_passed.png) - -## Delete cloud resources - -⚠️ Attention! Always delete cloud resources after you finished! - -![image](https://user-images.githubusercontent.com/34193409/214896888-3c6db293-8f1c-4931-8277-b2e4137f30a3.png) - -```bash -terraform destroy -``` +# DWH powered by Clickhouse and dbt + +- Build DWH powered by [Clickhouse](https://clickhouse.com/) and [dbt](https://www.getdbt.com/) +- Deploy Infrastructure as Code with [Terraform](https://www.terraform.io/) and [Yandex.Cloud](https://cloud.yandex.com/en-ru/) +- Instant development with [Github Codespaces](https://docs.github.com/en/codespaces) +- Assignment checks with [Github Actions](https://github.com/features/actions) + +## Lab plan + +- [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) +- [Configure Developer Environment](#1-configure-developer-environment) + - Start with GitHub Codespaces + - Use devcontainer (locally) +- [Deploy Infrastructure to Yandex.Cloud with Terraform](#2-deploy-infrastructure-to-yandexcloud-with-terraform) + - Get familiar with Yandex.Cloud web UI + - Configure `yc` CLI + - Populate `.env` file, Set environment variables + - Deploy using Terraform: Clickhouse +- [Check database connection](#3-check-database-connection) + - Configure JDBC (DBeaver) connection + - Configure dbt connection +- [Deploy DWH](#4-deploy-dwh) + - Install dbt packages + - Stage data sources with dbt macro + - Describe sources in [sources.yml](./models/sources/sources.yml) file + - Build staging models + - Prepare a data mart (wide table) +- [Model read-optimized Data Mart](#5-model-read-optimized-data-mart) + - Turn SQL code into dbt model [f_orders_stats](./models/marts/f_orders_stats.sql) + - Open PR and trigger automated testing with Github Actions +- [Delete cloud resources](#delete-cloud-resources) + + +## 1. Configure Developer Environment + + +You have got several options to set up: + +
Start with GitHub Codespaces +

+ +![GitHub Codespaces](./docs/github_codespaces.png) + +

+
+ +
Use devcontainer (locally) +

+ +1. Install [Docker](https://docs.docker.com/desktop/#download-and-install) on your local machine. + +1. Install devcontainer CLI: + + Open command palette (CMD + SHIFT+ P) type *Install devcontainer CLI* + + ![](./docs/install_devcontainer_cli.png) + +1. Next build and open dev container: + + ```bash + # build dev container + devcontainer build . + + # open dev container + devcontainer open . + ``` + +

+
+ +Verify you are in a development container by running commands: + +```bash +terraform -v + +yc --version + +dbt --version +``` + +If any of these commands fails printing out used software version then you are probably running it on your local machine not in a dev container! + +## 2. Deploy Infrastructure to Yandex.Cloud with Terraform + +1. Get familiar with Yandex.Cloud web UI + + We will deploy: + - [Yandex Managed Service for ClickHouse](https://cloud.yandex.com/en/services/managed-clickhouse) + + ![](./docs/clickhouse_management_console.gif) + +1. Configure `yc` CLI: [Getting started with the command-line interface by Yandex Cloud](https://cloud.yandex.com/en/docs/cli/quickstart#install) + + ```bash + yc init + ``` + +1. Populate `.env` file + + `.env` is used to store secrets as environment variables. + + Copy template file [.env.template](./.env.template) to `.env` file: + ```bash + cp .env.template .env + ``` + + Open file in editor and set your own values. + + > ❗️ Never commit secrets to git + + +1. Set environment variables: + + ```bash + export YC_TOKEN=$(yc iam create-token) + export YC_CLOUD_ID=$(yc config get cloud-id) + export YC_FOLDER_ID=$(yc config get folder-id) + export $(xargs <.env) + ``` + +1. Deploy using Terraform + + Configure YC Terraform provider: + + ```bash + cp terraformrc ~/.terraformrc + ``` + + Get familiar with Cloud Infrastructure: [main.tf](./main.tf) and [variables.tf](./variables.tf) + + ```bash + terraform init + terraform validate + terraform fmt + terraform plan + terraform apply + ``` + + Store terraform output values as Environment Variables: + + ```bash + export CLICKHOUSE_HOST=$(terraform output -raw clickhouse_host_fqdn) + export DBT_HOST=${CLICKHOUSE_HOST} + export DBT_USER=${CLICKHOUSE_USER} + export DBT_PASSWORD=${TF_VAR_clickhouse_password} + ``` + + [EN] Reference: [Getting started with Terraform by Yandex Cloud](https://cloud.yandex.com/en/docs/tutorials/infrastructure-management/terraform-quickstart) + + [RU] Reference: [Начало работы с Terraform by Yandex Cloud](https://cloud.yandex.ru/docs/tutorials/infrastructure-management/terraform-quickstart) + +## 3. Check database connection + +[Configure JDBC (DBeaver) connection](https://cloud.yandex.ru/docs/managed-clickhouse/operations/connect#connection-ide): + +``` +port=8443 +socket_timeout=300000 +ssl=true +sslrootcrt= +``` + +![DBeaver + Clickhouse](./docs/clickhouse_dbeaver.png) + +Make sure dbt can connect to your target database: + +```bash +dbt debug +``` + +![dbt + Clickhouse connection](./docs/dbt_debug.png) + +If any errors check ENV values are present: + +```bash +env | grep DBT_ +``` + +## 4. Deploy DWH + +1. Install dbt packages + + ```bash + dbt deps + ``` + +1. Stage data sources with dbt macro + + Source data will be staged as EXTERNAL TABLES (S3) using dbt macro [init_s3_sources](./macros/init_s3_sources.sql): + + ```bash + dbt run-operation init_s3_sources + ``` + + Statements will be executed one by one to avoid error: + + ``` + DB::Exception: Syntax error (Multi-statements are not allowed) + ``` + +1. Describe sources in [sources.yml](./models/sources/sources.yml) file + +1. Build staging models: + + ```bash + dbt build -s tag:staging + ``` + + Check model configurations: `engine`, `order_by`, `partition_by` + +1. Prepare a data mart (wide table) + + Join all the tables into one [f_lineorder_flat](./models/marts/f_lineorder_flat.sql): + + ```bash + dbt build -s f_lineorder_flat + ``` + + Pay attentions to models being tested for keys being unique, not null. + +## 5. Model read-optimized Data Mart + +Turn the following SQL into dbt model [f_orders_stats](./models/marts/f_orders_stats.sql): + +```sql +SELECT + toYear(O_ORDERDATE) AS O_ORDERYEAR + , O_ORDERSTATUS + , O_ORDERPRIORITY + , count(DISTINCT O_ORDERKEY) AS num_orders + , count(DISTINCT C_CUSTKEY) AS num_customers + , sum(L_EXTENDEDPRICE * L_DISCOUNT) AS revenue +FROM -- PLEASE USE dbt's ref('') to ensure valid DAG execution! +WHERE 1=1 +GROUP BY + toYear(O_ORDERDATE) + , O_ORDERSTATUS + , O_ORDERPRIORITY +``` + +Make sure the tests pass: + +```bash +dbt build -s f_orders_stats +``` + +![](./docs/f_orders_stats.png) + +## 6. Create PR and make CI tests pass + +If it works from your terminal, commit, open PR and trigger automated testing with Github Actions + +![Github Actions check passed](./docs/github_checks_passed.png) + +## Delete cloud resources + +⚠️ Attention! Always delete cloud resources after you finished! + +![image](https://user-images.githubusercontent.com/34193409/214896888-3c6db293-8f1c-4931-8277-b2e4137f30a3.png) + +```bash +terraform destroy +``` diff --git a/dbt_project.yml b/dbt_project.yml index 9382a61..769e534 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,43 +1,42 @@ - -# Name your project! Project names should contain only lowercase characters -# and underscores. A good package name should reflect your organization's -# name or the intended use of these models -name: 'clickhouse_starschema' -version: '1.0.0' -config-version: 2 - -# This setting configures which "profile" dbt uses for this project. -profile: 'clickhouse_starschema' - -# These configurations specify where dbt should look for different types of files. -# The `source-paths` config, for example, states that models in this project can be -# found in the "models/" directory. You probably won't need to change these! -model-paths: ["models"] -analysis-paths: ["analysis"] -test-paths: ["tests"] -seed-paths: ["data"] -macro-paths: ["macros"] -snapshot-paths: ["snapshots"] - -target-path: "target" # directory which will store compiled SQL files -clean-targets: # directories to be removed by `dbt clean` - - "target" - - "dbt_modules" - - -# Configuring models -# Full documentation: https://docs.getdbt.com/docs/configuring-models - -# In this example config, we tell dbt to build all models in the example/ directory -# as tables. These settings can be overridden in the individual model files -# using the `{{ config(...) }}` macro. -models: - clickhouse_starschema: - # Applies to all files under models/example/ - +materialized: table - staging: - +materialized: table - +tags: ['staging'] - marts: - +materialized: table - +tags: ['marts'] +# Name your project! Project names should contain only lowercase characters +# and underscores. A good package name should reflect your organization's +# name or the intended use of these models +name: 'clickhouse_starschema' +version: '1.0.0' +config-version: 2 + +# This setting configures which "profile" dbt uses for this project. +profile: 'clickhouse_starschema' + +# These configurations specify where dbt should look for different types of files. +# The `source-paths` config, for example, states that models in this project can be +# found in the "models/" directory. You probably won't need to change these! +model-paths: ["models"] +analysis-paths: ["analysis"] +test-paths: ["tests"] +seed-paths: ["data"] +macro-paths: ["macros"] +snapshot-paths: ["snapshots"] + +target-path: "target" # directory which will store compiled SQL files +clean-targets: # directories to be removed by `dbt clean` + - "target" + - "dbt_modules" + + +# Configuring models +# Full documentation: https://docs.getdbt.com/docs/configuring-models + +# In this example config, we tell dbt to build all models in the example/ directory +# as tables. These settings can be overridden in the individual model files +# using the `{{ config(...) }}` macro. +models: + clickhouse_starschema: + # Applies to all files under models/example/ + +materialized: table + staging: + +materialized: table + +tags: ['staging'] + marts: + +materialized: table + +tags: ['marts'] diff --git a/docker-compose.yml b/docker-compose.yml index aff4121..871643a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,13 @@ -version: '2' -services: - - dev: - build: . - volumes: - - .:/usr/app/ - ports: - - 8080:8080 - environment: - - DBT_HOST=${CLICKHOUSE_HOST} - - DBT_USER=${CLICKHOUSE_USER} - - DBT_PASSWORD=${TF_VAR_clickhouse_password} +version: '2' +services: + + dev: + build: . + volumes: + - .:/usr/app/ + ports: + - 8080:8080 + environment: + - DBT_HOST=${CLICKHOUSE_HOST} + - DBT_USER=${CLICKHOUSE_USER} + - DBT_PASSWORD=${TF_VAR_clickhouse_password} diff --git a/docs/TPCH.md b/docs/TPCH.md index ea4a63b..b72c3f4 100644 --- a/docs/TPCH.md +++ b/docs/TPCH.md @@ -1,75 +1,75 @@ -# TPCH Schema - -https://github.com/electrum/tpch-dbgen - -```sql --- Sccsid: @(#)dss.ddl 2.1.8.1 -CREATE TABLE NATION ( N_NATIONKEY INTEGER NOT NULL, - N_NAME CHAR(25) NOT NULL, - N_REGIONKEY INTEGER NOT NULL, - N_COMMENT VARCHAR(152)); - -CREATE TABLE REGION ( R_REGIONKEY INTEGER NOT NULL, - R_NAME CHAR(25) NOT NULL, - R_COMMENT VARCHAR(152)); - -CREATE TABLE PART ( P_PARTKEY INTEGER NOT NULL, - P_NAME VARCHAR(55) NOT NULL, - P_MFGR CHAR(25) NOT NULL, - P_BRAND CHAR(10) NOT NULL, - P_TYPE VARCHAR(25) NOT NULL, - P_SIZE INTEGER NOT NULL, - P_CONTAINER CHAR(10) NOT NULL, - P_RETAILPRICE DECIMAL(15,2) NOT NULL, - P_COMMENT VARCHAR(23) NOT NULL ); - -CREATE TABLE SUPPLIER ( S_SUPPKEY INTEGER NOT NULL, - S_NAME CHAR(25) NOT NULL, - S_ADDRESS VARCHAR(40) NOT NULL, - S_NATIONKEY INTEGER NOT NULL, - S_PHONE CHAR(15) NOT NULL, - S_ACCTBAL DECIMAL(15,2) NOT NULL, - S_COMMENT VARCHAR(101) NOT NULL); - -CREATE TABLE PARTSUPP ( PS_PARTKEY INTEGER NOT NULL, - PS_SUPPKEY INTEGER NOT NULL, - PS_AVAILQTY INTEGER NOT NULL, - PS_SUPPLYCOST DECIMAL(15,2) NOT NULL, - PS_COMMENT VARCHAR(199) NOT NULL ); - -CREATE TABLE CUSTOMER ( C_CUSTKEY INTEGER NOT NULL, - C_NAME VARCHAR(25) NOT NULL, - C_ADDRESS VARCHAR(40) NOT NULL, - C_NATIONKEY INTEGER NOT NULL, - C_PHONE CHAR(15) NOT NULL, - C_ACCTBAL DECIMAL(15,2) NOT NULL, - C_MKTSEGMENT CHAR(10) NOT NULL, - C_COMMENT VARCHAR(117) NOT NULL); - -CREATE TABLE ORDERS ( O_ORDERKEY INTEGER NOT NULL, - O_CUSTKEY INTEGER NOT NULL, - O_ORDERSTATUS CHAR(1) NOT NULL, - O_TOTALPRICE DECIMAL(15,2) NOT NULL, - O_ORDERDATE DATE NOT NULL, - O_ORDERPRIORITY CHAR(15) NOT NULL, - O_CLERK CHAR(15) NOT NULL, - O_SHIPPRIORITY INTEGER NOT NULL, - O_COMMENT VARCHAR(79) NOT NULL); - -CREATE TABLE LINEITEM ( L_ORDERKEY INTEGER NOT NULL, - L_PARTKEY INTEGER NOT NULL, - L_SUPPKEY INTEGER NOT NULL, - L_LINENUMBER INTEGER NOT NULL, - L_QUANTITY DECIMAL(15,2) NOT NULL, - L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, - L_DISCOUNT DECIMAL(15,2) NOT NULL, - L_TAX DECIMAL(15,2) NOT NULL, - L_RETURNFLAG CHAR(1) NOT NULL, - L_LINESTATUS CHAR(1) NOT NULL, - L_SHIPDATE DATE NOT NULL, - L_COMMITDATE DATE NOT NULL, - L_RECEIPTDATE DATE NOT NULL, - L_SHIPINSTRUCT CHAR(25) NOT NULL, - L_SHIPMODE CHAR(10) NOT NULL, - L_COMMENT VARCHAR(44) NOT NULL); +# TPCH Schema + +https://github.com/electrum/tpch-dbgen + +```sql +-- Sccsid: @(#)dss.ddl 2.1.8.1 +CREATE TABLE NATION ( N_NATIONKEY INTEGER NOT NULL, + N_NAME CHAR(25) NOT NULL, + N_REGIONKEY INTEGER NOT NULL, + N_COMMENT VARCHAR(152)); + +CREATE TABLE REGION ( R_REGIONKEY INTEGER NOT NULL, + R_NAME CHAR(25) NOT NULL, + R_COMMENT VARCHAR(152)); + +CREATE TABLE PART ( P_PARTKEY INTEGER NOT NULL, + P_NAME VARCHAR(55) NOT NULL, + P_MFGR CHAR(25) NOT NULL, + P_BRAND CHAR(10) NOT NULL, + P_TYPE VARCHAR(25) NOT NULL, + P_SIZE INTEGER NOT NULL, + P_CONTAINER CHAR(10) NOT NULL, + P_RETAILPRICE DECIMAL(15,2) NOT NULL, + P_COMMENT VARCHAR(23) NOT NULL ); + +CREATE TABLE SUPPLIER ( S_SUPPKEY INTEGER NOT NULL, + S_NAME CHAR(25) NOT NULL, + S_ADDRESS VARCHAR(40) NOT NULL, + S_NATIONKEY INTEGER NOT NULL, + S_PHONE CHAR(15) NOT NULL, + S_ACCTBAL DECIMAL(15,2) NOT NULL, + S_COMMENT VARCHAR(101) NOT NULL); + +CREATE TABLE PARTSUPP ( PS_PARTKEY INTEGER NOT NULL, + PS_SUPPKEY INTEGER NOT NULL, + PS_AVAILQTY INTEGER NOT NULL, + PS_SUPPLYCOST DECIMAL(15,2) NOT NULL, + PS_COMMENT VARCHAR(199) NOT NULL ); + +CREATE TABLE CUSTOMER ( C_CUSTKEY INTEGER NOT NULL, + C_NAME VARCHAR(25) NOT NULL, + C_ADDRESS VARCHAR(40) NOT NULL, + C_NATIONKEY INTEGER NOT NULL, + C_PHONE CHAR(15) NOT NULL, + C_ACCTBAL DECIMAL(15,2) NOT NULL, + C_MKTSEGMENT CHAR(10) NOT NULL, + C_COMMENT VARCHAR(117) NOT NULL); + +CREATE TABLE ORDERS ( O_ORDERKEY INTEGER NOT NULL, + O_CUSTKEY INTEGER NOT NULL, + O_ORDERSTATUS CHAR(1) NOT NULL, + O_TOTALPRICE DECIMAL(15,2) NOT NULL, + O_ORDERDATE DATE NOT NULL, + O_ORDERPRIORITY CHAR(15) NOT NULL, + O_CLERK CHAR(15) NOT NULL, + O_SHIPPRIORITY INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL); + +CREATE TABLE LINEITEM ( L_ORDERKEY INTEGER NOT NULL, + L_PARTKEY INTEGER NOT NULL, + L_SUPPKEY INTEGER NOT NULL, + L_LINENUMBER INTEGER NOT NULL, + L_QUANTITY DECIMAL(15,2) NOT NULL, + L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, + L_DISCOUNT DECIMAL(15,2) NOT NULL, + L_TAX DECIMAL(15,2) NOT NULL, + L_RETURNFLAG CHAR(1) NOT NULL, + L_LINESTATUS CHAR(1) NOT NULL, + L_SHIPDATE DATE NOT NULL, + L_COMMITDATE DATE NOT NULL, + L_RECEIPTDATE DATE NOT NULL, + L_SHIPINSTRUCT CHAR(25) NOT NULL, + L_SHIPMODE CHAR(10) NOT NULL, + L_COMMENT VARCHAR(44) NOT NULL); ``` \ No newline at end of file diff --git a/macros/init_s3_sources.sql b/macros/init_s3_sources.sql index 83ca9b3..316e907 100644 --- a/macros/init_s3_sources.sql +++ b/macros/init_s3_sources.sql @@ -1,111 +1,111 @@ -{% macro init_s3_sources() -%} - - {% set sources = [ - 'DROP TABLE IF EXISTS src_customer' - , 'CREATE TABLE IF NOT EXISTS src_customer - ( - C_CUSTKEY UInt32, - C_NAME String, - C_ADDRESS String, - C_NATIONKEY UInt32, - C_PHONE String, - C_ACCTBAL Decimal(15,2), - C_MKTSEGMENT LowCardinality(String), - C_COMMENT String - ) - ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/customer.tbl\', \'CustomSeparated\') - SETTINGS - format_custom_field_delimiter=\'|\' - ,format_custom_escaping_rule=\'CSV\' - ,format_custom_row_after_delimiter=\'|\n\' - ' - , 'DROP TABLE IF EXISTS src_orders' - , 'CREATE TABLE src_orders - ( - O_ORDERKEY UInt32, - O_CUSTKEY UInt32, - O_ORDERSTATUS LowCardinality(String), - O_TOTALPRICE Decimal(15,2), - O_ORDERDATE Date, - O_ORDERPRIORITY LowCardinality(String), - O_CLERK String, - O_SHIPPRIORITY UInt8, - O_COMMENT String - ) - ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/orders.tbl\', \'CustomSeparated\') - SETTINGS - format_custom_field_delimiter=\'|\' - ,format_custom_escaping_rule=\'CSV\' - ,format_custom_row_after_delimiter=\'|\n\' - ' - , 'DROP TABLE IF EXISTS src_lineitem' - , 'CREATE TABLE src_lineitem - ( - L_ORDERKEY UInt32, - L_PARTKEY UInt32, - L_SUPPKEY UInt32, - L_LINENUMBER UInt8, - L_QUANTITY Decimal(15,2), - L_EXTENDEDPRICE Decimal(15,2), - L_DISCOUNT Decimal(15,2), - L_TAX Decimal(15,2), - L_RETURNFLAG LowCardinality(String), - L_LINESTATUS LowCardinality(String), - L_SHIPDATE Date, - L_COMMITDATE Date, - L_RECEIPTDATE Date, - L_SHIPINSTRUCT String, - L_SHIPMODE LowCardinality(String), - L_COMMENT String - ) - ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/lineitem.tbl\', \'CustomSeparated\') - SETTINGS - format_custom_field_delimiter=\'|\' - ,format_custom_escaping_rule=\'CSV\' - ,format_custom_row_after_delimiter=\'|\n\' - ' - , 'DROP TABLE IF EXISTS src_part' - , 'CREATE TABLE src_part - ( - P_PARTKEY UInt32, - P_NAME String, - P_MFGR LowCardinality(String), - P_BRAND LowCardinality(String), - P_TYPE LowCardinality(String), - P_SIZE UInt8, - P_CONTAINER LowCardinality(String), - P_RETAILPRICE Decimal(15,2), - P_COMMENT String - ) - ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/part.tbl\', \'CustomSeparated\') - SETTINGS - format_custom_field_delimiter=\'|\' - ,format_custom_escaping_rule=\'CSV\' - ,format_custom_row_after_delimiter=\'|\n\' - ' - , 'DROP TABLE IF EXISTS src_supplier' - , 'CREATE TABLE src_supplier - ( - S_SUPPKEY UInt32, - S_NAME String, - S_ADDRESS String, - S_NATIONKEY UInt32, - S_PHONE String, - S_ACCTBAL Decimal(15,2), - S_COMMENT String - ) - ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/supplier.tbl\', \'CustomSeparated\') - SETTINGS - format_custom_field_delimiter=\'|\' - ,format_custom_escaping_rule=\'CSV\' - ,format_custom_row_after_delimiter=\'|\n\' - ' - ] %} - - {% for src in sources %} - {% set statement = run_query(src) %} - {% endfor %} - -{{ print('Initialized source tables – TPCH (S3)') }} - +{% macro init_s3_sources() -%} + + {% set sources = [ + 'DROP TABLE IF EXISTS src_customer' + , 'CREATE TABLE IF NOT EXISTS src_customer + ( + C_CUSTKEY UInt32, + C_NAME String, + C_ADDRESS String, + C_NATIONKEY UInt32, + C_PHONE String, + C_ACCTBAL Decimal(15,2), + C_MKTSEGMENT LowCardinality(String), + C_COMMENT String + ) + ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/customer.tbl\', \'CustomSeparated\') + SETTINGS + format_custom_field_delimiter=\'|\' + ,format_custom_escaping_rule=\'CSV\' + ,format_custom_row_after_delimiter=\'|\n\' + ' + , 'DROP TABLE IF EXISTS src_orders' + , 'CREATE TABLE src_orders + ( + O_ORDERKEY UInt32, + O_CUSTKEY UInt32, + O_ORDERSTATUS LowCardinality(String), + O_TOTALPRICE Decimal(15,2), + O_ORDERDATE Date, + O_ORDERPRIORITY LowCardinality(String), + O_CLERK String, + O_SHIPPRIORITY UInt8, + O_COMMENT String + ) + ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/orders.tbl\', \'CustomSeparated\') + SETTINGS + format_custom_field_delimiter=\'|\' + ,format_custom_escaping_rule=\'CSV\' + ,format_custom_row_after_delimiter=\'|\n\' + ' + , 'DROP TABLE IF EXISTS src_lineitem' + , 'CREATE TABLE src_lineitem + ( + L_ORDERKEY UInt32, + L_PARTKEY UInt32, + L_SUPPKEY UInt32, + L_LINENUMBER UInt8, + L_QUANTITY Decimal(15,2), + L_EXTENDEDPRICE Decimal(15,2), + L_DISCOUNT Decimal(15,2), + L_TAX Decimal(15,2), + L_RETURNFLAG LowCardinality(String), + L_LINESTATUS LowCardinality(String), + L_SHIPDATE Date, + L_COMMITDATE Date, + L_RECEIPTDATE Date, + L_SHIPINSTRUCT String, + L_SHIPMODE LowCardinality(String), + L_COMMENT String + ) + ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/lineitem.tbl\', \'CustomSeparated\') + SETTINGS + format_custom_field_delimiter=\'|\' + ,format_custom_escaping_rule=\'CSV\' + ,format_custom_row_after_delimiter=\'|\n\' + ' + , 'DROP TABLE IF EXISTS src_part' + , 'CREATE TABLE src_part + ( + P_PARTKEY UInt32, + P_NAME String, + P_MFGR LowCardinality(String), + P_BRAND LowCardinality(String), + P_TYPE LowCardinality(String), + P_SIZE UInt8, + P_CONTAINER LowCardinality(String), + P_RETAILPRICE Decimal(15,2), + P_COMMENT String + ) + ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/part.tbl\', \'CustomSeparated\') + SETTINGS + format_custom_field_delimiter=\'|\' + ,format_custom_escaping_rule=\'CSV\' + ,format_custom_row_after_delimiter=\'|\n\' + ' + , 'DROP TABLE IF EXISTS src_supplier' + , 'CREATE TABLE src_supplier + ( + S_SUPPKEY UInt32, + S_NAME String, + S_ADDRESS String, + S_NATIONKEY UInt32, + S_PHONE String, + S_ACCTBAL Decimal(15,2), + S_COMMENT String + ) + ENGINE = S3(\'https://storage.yandexcloud.net/otus-dwh/tpch-dbgen-1g/supplier.tbl\', \'CustomSeparated\') + SETTINGS + format_custom_field_delimiter=\'|\' + ,format_custom_escaping_rule=\'CSV\' + ,format_custom_row_after_delimiter=\'|\n\' + ' + ] %} + + {% for src in sources %} + {% set statement = run_query(src) %} + {% endfor %} + +{{ print('Initialized source tables – TPCH (S3)') }} + {%- endmacro %} \ No newline at end of file diff --git a/main.tf b/main.tf index d20e1a9..3d11cdf 100644 --- a/main.tf +++ b/main.tf @@ -1,160 +1,153 @@ -terraform { - required_providers { - yandex = { - source = "yandex-cloud/yandex" - } - } - required_version = ">= 0.13" -} - -provider "yandex" { -} - - -resource "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { - name = "clickhouse_starschema" - environment = "PRESTABLE" - network_id = yandex_vpc_network.default_network.id - sql_database_management = true - sql_user_management = true - admin_password = var.clickhouse_password - version = "23.3" - - clickhouse { - resources { - resource_preset_id = "s3-c4-m16" - disk_type_id = "network-ssd" - disk_size = 64 - } - - config { - log_level = "TRACE" - max_connections = 100 - max_concurrent_queries = 100 - keep_alive_timeout = 3000 - uncompressed_cache_size = 8589934592 - mark_cache_size = 5368709120 - max_table_size_to_drop = 53687091200 - max_partition_size_to_drop = 53687091200 - timezone = "UTC" - geobase_uri = "" - query_log_retention_size = 1073741824 - query_log_retention_time = 2592000 - query_thread_log_enabled = true - query_thread_log_retention_size = 536870912 - query_thread_log_retention_time = 2592000 - part_log_retention_size = 536870912 - part_log_retention_time = 2592000 - metric_log_enabled = true - metric_log_retention_size = 536870912 - metric_log_retention_time = 2592000 - trace_log_enabled = true - trace_log_retention_size = 536870912 - trace_log_retention_time = 2592000 - text_log_enabled = true - text_log_retention_size = 536870912 - text_log_retention_time = 2592000 - text_log_level = "TRACE" - background_pool_size = 16 - background_schedule_pool_size = 16 - - merge_tree { - replicated_deduplication_window = 100 - replicated_deduplication_window_seconds = 604800 - parts_to_delay_insert = 150 - parts_to_throw_insert = 300 - max_replicated_merges_in_queue = 16 - number_of_free_entries_in_pool_to_lower_max_size_of_merge = 8 - max_bytes_to_merge_at_min_space_in_pool = 1048576 - } - - kafka { - security_protocol = "SECURITY_PROTOCOL_PLAINTEXT" - sasl_mechanism = "SASL_MECHANISM_GSSAPI" - sasl_username = "user1" - sasl_password = "pass1" - } - - kafka_topic { - name = "topic1" - settings { - security_protocol = "SECURITY_PROTOCOL_SSL" - sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_256" - sasl_username = "user2" - sasl_password = "pass2" - } - } - - kafka_topic { - name = "topic2" - settings { - security_protocol = "SECURITY_PROTOCOL_SASL_PLAINTEXT" - sasl_mechanism = "SASL_MECHANISM_PLAIN" - } - } - - rabbitmq { - username = "rabbit_user" - password = "rabbit_pass" - } - - compression { - method = "LZ4" - min_part_size = 1024 - min_part_size_ratio = 0.5 - } - - compression { - method = "ZSTD" - min_part_size = 2048 - min_part_size_ratio = 0.7 - } - - graphite_rollup { - name = "rollup1" - pattern { - regexp = "abc" - function = "func1" - retention { - age = 1000 - precision = 3 - } - } - } - - graphite_rollup { - name = "rollup2" - pattern { - function = "func2" - retention { - age = 2000 - precision = 5 - } - } - } - } - } - - host { - type = "CLICKHOUSE" - zone = "ru-central1-b" - subnet_id = yandex_vpc_subnet.foo.id - assign_public_ip = true - } - - cloud_storage { - enabled = false - } - - maintenance_window { - type = "ANYTIME" - } -} - -resource "yandex_vpc_network" "default_network" {} - -resource "yandex_vpc_subnet" "foo" { - zone = "ru-central1-b" - network_id = yandex_vpc_network.default_network.id - v4_cidr_blocks = ["10.5.0.0/24"] +terraform { + required_providers { + yandex = { + source = "yandex-cloud/yandex" + } + } + required_version = ">= 0.13" +} + +provider "yandex" { +} + + +resource "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { + name = "clickhouse_starschema" + environment = "PRESTABLE" + network_id = yandex_vpc_network.default_network.id + sql_database_management = true + sql_user_management = true + admin_password = var.clickhouse_password + version = "23.3" + + clickhouse { + resources { + resource_preset_id = "s3-c4-m16" + disk_type_id = "network-ssd" + disk_size = 64 + } + + config { + log_level = "TRACE" + max_connections = 100 + max_concurrent_queries = 100 + keep_alive_timeout = 3000 + uncompressed_cache_size = 8589934592 + mark_cache_size = 5368709120 + max_table_size_to_drop = 53687091200 + max_partition_size_to_drop = 53687091200 + timezone = "UTC" + geobase_uri = "" + query_log_retention_size = 1073741824 + query_thread_log_enabled = true + query_thread_log_retention_size = 536870912 + part_log_retention_size = 536870912 + metric_log_enabled = true + metric_log_retention_size = 536870912 + trace_log_enabled = true + text_log_enabled = true + text_log_retention_size = 536870912 + text_log_level = "TRACE" + background_pool_size = 16 + background_schedule_pool_size = 16 + + merge_tree { + replicated_deduplication_window = 100 + replicated_deduplication_window_seconds = 604800 + parts_to_delay_insert = 150 + parts_to_throw_insert = 300 + max_replicated_merges_in_queue = 16 + number_of_free_entries_in_pool_to_lower_max_size_of_merge = 8 + max_bytes_to_merge_at_min_space_in_pool = 1048576 + } + + kafka { + security_protocol = "SECURITY_PROTOCOL_PLAINTEXT" + sasl_mechanism = "SASL_MECHANISM_GSSAPI" + sasl_username = "user1" + sasl_password = "pass1" + } + + kafka_topic { + name = "topic1" + settings { + security_protocol = "SECURITY_PROTOCOL_SSL" + sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_256" + sasl_username = "user2" + sasl_password = "pass2" + } + } + + kafka_topic { + name = "topic2" + settings { + security_protocol = "SECURITY_PROTOCOL_SASL_PLAINTEXT" + sasl_mechanism = "SASL_MECHANISM_PLAIN" + } + } + + rabbitmq { + username = "rabbit_user" + password = "rabbit_pass" + } + + compression { + method = "LZ4" + min_part_size = 1024 + min_part_size_ratio = 0.5 + } + + compression { + method = "ZSTD" + min_part_size = 2048 + min_part_size_ratio = 0.7 + } + + graphite_rollup { + name = "rollup1" + pattern { + regexp = "abc" + function = "func1" + retention { + age = 1000 + precision = 3 + } + } + } + + graphite_rollup { + name = "rollup2" + pattern { + function = "func2" + retention { + age = 2000 + precision = 5 + } + } + } + } + } + + host { + type = "CLICKHOUSE" + zone = "ru-central1-b" + subnet_id = yandex_vpc_subnet.foo.id + assign_public_ip = true + } + + cloud_storage { + enabled = false + } + + maintenance_window { + type = "ANYTIME" + } +} + +resource "yandex_vpc_network" "default_network" {} + +resource "yandex_vpc_subnet" "foo" { + zone = "ru-central1-b" + network_id = yandex_vpc_network.default_network.id + v4_cidr_blocks = ["10.5.0.0/24"] } \ No newline at end of file diff --git a/models/marts/f_lineorder_flat.sql b/models/marts/f_lineorder_flat.sql index 5a7ab81..ef38528 100644 --- a/models/marts/f_lineorder_flat.sql +++ b/models/marts/f_lineorder_flat.sql @@ -1,70 +1,70 @@ -{{ - config ( - engine='MergeTree()', - order_by=['L_SHIPDATE', 'L_ORDERKEY'], - partition_by='toYear(L_SHIPDATE)' - ) -}} - -SELECT - - L_ITEMKEY - , L_ORDERKEY - , L_PARTKEY - , L_SUPPKEY - , L_LINENUMBER - , L_QUANTITY - , L_EXTENDEDPRICE - , L_DISCOUNT - , L_TAX - , L_RETURNFLAG - , L_LINESTATUS - , L_SHIPDATE - , L_COMMITDATE - , L_RECEIPTDATE - , L_SHIPINSTRUCT - , L_SHIPMODE - , L_COMMENT - - , O_ORDERKEY - , O_CUSTKEY - , O_ORDERSTATUS - , O_TOTALPRICE - , O_ORDERDATE - , O_ORDERPRIORITY - , O_CLERK - , O_SHIPPRIORITY - , O_COMMENT - - , C_CUSTKEY - , C_NAME - , C_ADDRESS - , C_NATIONKEY - , C_PHONE - , C_ACCTBAL - , C_MKTSEGMENT - , C_COMMENT - - , S_SUPPKEY - , S_NAME - , S_ADDRESS - , S_NATIONKEY - , S_PHONE - , S_ACCTBAL - , S_COMMENT - - , P_PARTKEY - , P_NAME - , P_MFGR - , P_BRAND - , P_TYPE - , P_SIZE - , P_CONTAINER - , P_RETAILPRICE - , P_COMMENT - -FROM {{ ref('stg_lineitem') }} AS l - INNER JOIN {{ ref('stg_orders') }} AS o ON o.O_ORDERKEY = l.L_ORDERKEY - INNER JOIN {{ ref('stg_customer') }} AS c ON c.C_CUSTKEY = o.O_CUSTKEY - INNER JOIN {{ ref('stg_supplier') }} AS s ON s.S_SUPPKEY = l.L_SUPPKEY - INNER JOIN {{ ref('stg_part') }} AS p ON p.P_PARTKEY = l.L_PARTKEY +{{ + config ( + engine='MergeTree()', + order_by=['L_SHIPDATE', 'L_ORDERKEY'], + partition_by='toYear(L_SHIPDATE)' + ) +}} + +SELECT + + L_ITEMKEY + , L_ORDERKEY + , L_PARTKEY + , L_SUPPKEY + , L_LINENUMBER + , L_QUANTITY + , L_EXTENDEDPRICE + , L_DISCOUNT + , L_TAX + , L_RETURNFLAG + , L_LINESTATUS + , L_SHIPDATE + , L_COMMITDATE + , L_RECEIPTDATE + , L_SHIPINSTRUCT + , L_SHIPMODE + , L_COMMENT + + , O_ORDERKEY + , O_CUSTKEY + , O_ORDERSTATUS + , O_TOTALPRICE + , O_ORDERDATE + , O_ORDERPRIORITY + , O_CLERK + , O_SHIPPRIORITY + , O_COMMENT + + , C_CUSTKEY + , C_NAME + , C_ADDRESS + , C_NATIONKEY + , C_PHONE + , C_ACCTBAL + , C_MKTSEGMENT + , C_COMMENT + + , S_SUPPKEY + , S_NAME + , S_ADDRESS + , S_NATIONKEY + , S_PHONE + , S_ACCTBAL + , S_COMMENT + + , P_PARTKEY + , P_NAME + , P_MFGR + , P_BRAND + , P_TYPE + , P_SIZE + , P_CONTAINER + , P_RETAILPRICE + , P_COMMENT + +FROM {{ ref('stg_lineitem') }} AS l + INNER JOIN {{ ref('stg_orders') }} AS o ON o.O_ORDERKEY = l.L_ORDERKEY + INNER JOIN {{ ref('stg_customer') }} AS c ON c.C_CUSTKEY = o.O_CUSTKEY + INNER JOIN {{ ref('stg_supplier') }} AS s ON s.S_SUPPKEY = l.L_SUPPKEY + INNER JOIN {{ ref('stg_part') }} AS p ON p.P_PARTKEY = l.L_PARTKEY diff --git a/models/marts/f_orders_stats.sql b/models/marts/f_orders_stats.sql index f3c422a..7344c3e 100644 --- a/models/marts/f_orders_stats.sql +++ b/models/marts/f_orders_stats.sql @@ -1,8 +1,22 @@ -{{ - config ( - engine='MergeTree()', - order_by=[''] - ) -}} - -SELECT 1 +{{ + config ( + engine='MergeTree()', + order_by=['O_ORDERYEAR', 'O_ORDERSTATUS', 'O_ORDERPRIORITY'] + ) +}} + +SELECT + toYear(O_ORDERDATE) AS O_ORDERYEAR + , O_ORDERSTATUS + , O_ORDERPRIORITY + , count(DISTINCT O_ORDERKEY) AS num_orders + , count(DISTINCT C_CUSTKEY) AS num_customers + , sum(L_EXTENDEDPRICE * L_DISCOUNT) AS revenue +FROM {{ ref('stg_lineitem') }} AS l -- PLEASE USE dbt's ref('') to ensure valid DAG execution! + INNER JOIN {{ ref('stg_orders') }} AS o ON o.O_ORDERKEY = l.L_ORDERKEY + INNER JOIN {{ ref('stg_customer') }} AS c ON c.C_CUSTKEY = o.O_CUSTKEY +WHERE 1=1 +GROUP BY + toYear(O_ORDERDATE) + , O_ORDERSTATUS + , O_ORDERPRIORITY diff --git a/models/marts/marts.yml b/models/marts/marts.yml index 960a64d..8c2abda 100644 --- a/models/marts/marts.yml +++ b/models/marts/marts.yml @@ -1,12 +1,12 @@ - -version: 2 - -models: - - name: f_lineorder_flat - description: Denormalized fact table - columns: - - name: L_ITEMKEY - description: "" - tests: - - unique - - not_null + +version: 2 + +models: + - name: f_lineorder_flat + description: Denormalized fact table + columns: + - name: L_ITEMKEY + description: "" + tests: + - unique + - not_null diff --git a/models/sources/sources.yml b/models/sources/sources.yml index 8f91853..c2123ca 100644 --- a/models/sources/sources.yml +++ b/models/sources/sources.yml @@ -1,31 +1,31 @@ -version: 2 - -sources: - - - name: dbgen - schema: default - tags: ["dbgen"] - loader: S3 - description: "TPCH synthetic data stored in S3" - - tables: - - - name: customer - description: "Customers dimension" - identifier: src_customer - - - name: orders - description: "Orders facts" - identifier: src_orders - - - name: lineitem - description: "Orders line items facts" - identifier: src_lineitem - - - name: part - description: "Parts dimension" - identifier: src_part - - - name: supplier - description: "Suppliers dimension" - identifier: src_supplier +version: 2 + +sources: + + - name: dbgen + schema: default + tags: ["dbgen"] + loader: S3 + description: "TPCH synthetic data stored in S3" + + tables: + + - name: customer + description: "Customers dimension" + identifier: src_customer + + - name: orders + description: "Orders facts" + identifier: src_orders + + - name: lineitem + description: "Orders line items facts" + identifier: src_lineitem + + - name: part + description: "Parts dimension" + identifier: src_part + + - name: supplier + description: "Suppliers dimension" + identifier: src_supplier diff --git a/models/staging/staging.yml b/models/staging/staging.yml index 3e8535f..536189f 100644 --- a/models/staging/staging.yml +++ b/models/staging/staging.yml @@ -1,44 +1,44 @@ - -version: 2 - -models: - - - name: stg_customer - columns: - - name: C_CUSTKEY - description: "" - tests: - - unique - - not_null - - - name: stg_orders - columns: - - name: O_ORDERKEY - description: "" - tests: - - unique - - not_null - - - name: stg_lineitem - columns: - - name: L_ITEMKEY - description: "" - tests: - - unique - - not_null - - - name: stg_part - columns: - - name: P_PARTKEY - description: "" - tests: - - unique - - not_null - - - name: stg_supplier - columns: - - name: S_SUPPKEY - description: "" - tests: - - unique - - not_null + +version: 2 + +models: + + - name: stg_customer + columns: + - name: C_CUSTKEY + description: "" + tests: + - unique + - not_null + + - name: stg_orders + columns: + - name: O_ORDERKEY + description: "" + tests: + - unique + - not_null + + - name: stg_lineitem + columns: + - name: L_ITEMKEY + description: "" + tests: + - unique + - not_null + + - name: stg_part + columns: + - name: P_PARTKEY + description: "" + tests: + - unique + - not_null + + - name: stg_supplier + columns: + - name: S_SUPPKEY + description: "" + tests: + - unique + - not_null diff --git a/models/staging/stg_customer.sql b/models/staging/stg_customer.sql index 27506b3..839d817 100644 --- a/models/staging/stg_customer.sql +++ b/models/staging/stg_customer.sql @@ -1,17 +1,17 @@ -{{ - config ( - engine='MergeTree()', - order_by='C_CUSTKEY' - ) -}} - -SELECT - C_CUSTKEY - , C_NAME - , C_ADDRESS - , C_NATIONKEY - , C_PHONE - , C_ACCTBAL - , C_MKTSEGMENT - , C_COMMENT +{{ + config ( + engine='MergeTree()', + order_by='C_CUSTKEY' + ) +}} + +SELECT + C_CUSTKEY + , C_NAME + , C_ADDRESS + , C_NATIONKEY + , C_PHONE + , C_ACCTBAL + , C_MKTSEGMENT + , C_COMMENT FROM {{ source('dbgen', 'customer') }} \ No newline at end of file diff --git a/models/staging/stg_lineitem.sql b/models/staging/stg_lineitem.sql index d3b90c3..0eb7ef3 100644 --- a/models/staging/stg_lineitem.sql +++ b/models/staging/stg_lineitem.sql @@ -1,27 +1,27 @@ -{{ - config ( - engine='MergeTree()', - order_by=['L_SHIPDATE', 'L_ORDERKEY'], - partition_by='toYear(L_SHIPDATE)' - ) -}} - -SELECT - {{ dbt_utils.generate_surrogate_key(['L_ORDERKEY', 'L_LINENUMBER']) }} AS L_ITEMKEY - , L_ORDERKEY - , L_PARTKEY - , L_SUPPKEY - , L_LINENUMBER - , L_QUANTITY - , L_EXTENDEDPRICE - , L_DISCOUNT - , L_TAX - , L_RETURNFLAG - , L_LINESTATUS - , L_SHIPDATE - , L_COMMITDATE - , L_RECEIPTDATE - , L_SHIPINSTRUCT - , L_SHIPMODE - , L_COMMENT -FROM {{ source('dbgen', 'lineitem') }} +{{ + config ( + engine='MergeTree()', + order_by=['L_SHIPDATE', 'L_ORDERKEY'], + partition_by='toYear(L_SHIPDATE)' + ) +}} + +SELECT + {{ dbt_utils.generate_surrogate_key(['L_ORDERKEY', 'L_LINENUMBER']) }} AS L_ITEMKEY + , L_ORDERKEY + , L_PARTKEY + , L_SUPPKEY + , L_LINENUMBER + , L_QUANTITY + , L_EXTENDEDPRICE + , L_DISCOUNT + , L_TAX + , L_RETURNFLAG + , L_LINESTATUS + , L_SHIPDATE + , L_COMMITDATE + , L_RECEIPTDATE + , L_SHIPINSTRUCT + , L_SHIPMODE + , L_COMMENT +FROM {{ source('dbgen', 'lineitem') }} diff --git a/models/staging/stg_orders.sql b/models/staging/stg_orders.sql index 45295a4..5bf9e89 100644 --- a/models/staging/stg_orders.sql +++ b/models/staging/stg_orders.sql @@ -1,19 +1,19 @@ -{{ - config ( - engine='MergeTree()', - order_by=['O_ORDERKEY'] - ) -}} - - -SELECT - O_ORDERKEY - , O_CUSTKEY - , O_ORDERSTATUS - , O_TOTALPRICE - , O_ORDERDATE - , O_ORDERPRIORITY - , O_CLERK - , O_SHIPPRIORITY - , O_COMMENT +{{ + config ( + engine='MergeTree()', + order_by=['O_ORDERKEY'] + ) +}} + + +SELECT + O_ORDERKEY + , O_CUSTKEY + , O_ORDERSTATUS + , O_TOTALPRICE + , O_ORDERDATE + , O_ORDERPRIORITY + , O_CLERK + , O_SHIPPRIORITY + , O_COMMENT FROM {{ source('dbgen', 'orders') }} \ No newline at end of file diff --git a/models/staging/stg_part.sql b/models/staging/stg_part.sql index fba9cf5..138d544 100644 --- a/models/staging/stg_part.sql +++ b/models/staging/stg_part.sql @@ -1,18 +1,18 @@ -{{ - config ( - engine='MergeTree()', - order_by=['P_PARTKEY'] - ) -}} - -SELECT - P_PARTKEY - , P_NAME - , P_MFGR - , P_BRAND - , P_TYPE - , P_SIZE - , P_CONTAINER - , P_RETAILPRICE - , P_COMMENT +{{ + config ( + engine='MergeTree()', + order_by=['P_PARTKEY'] + ) +}} + +SELECT + P_PARTKEY + , P_NAME + , P_MFGR + , P_BRAND + , P_TYPE + , P_SIZE + , P_CONTAINER + , P_RETAILPRICE + , P_COMMENT FROM {{ source('dbgen', 'part') }} \ No newline at end of file diff --git a/models/staging/stg_supplier.sql b/models/staging/stg_supplier.sql index 5e721ca..eba5b2c 100644 --- a/models/staging/stg_supplier.sql +++ b/models/staging/stg_supplier.sql @@ -1,16 +1,16 @@ -{{ - config ( - engine='MergeTree()', - order_by=['S_SUPPKEY'] - ) -}} - -SELECT - S_SUPPKEY - , S_NAME - , S_ADDRESS - , S_NATIONKEY - , S_PHONE - , S_ACCTBAL - , S_COMMENT +{{ + config ( + engine='MergeTree()', + order_by=['S_SUPPKEY'] + ) +}} + +SELECT + S_SUPPKEY + , S_NAME + , S_ADDRESS + , S_NATIONKEY + , S_PHONE + , S_ACCTBAL + , S_COMMENT FROM {{ source('dbgen', 'supplier') }} \ No newline at end of file diff --git a/package-lock.yml b/package-lock.yml new file mode 100644 index 0000000..8f949e9 --- /dev/null +++ b/package-lock.yml @@ -0,0 +1,4 @@ +packages: +- package: dbt-labs/dbt_utils + version: 1.0.0 +sha1_hash: f4c10e8eb3db97171ea98d4851377e010cce1478 diff --git a/packages.yml b/packages.yml index d4e6640..e477525 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ -packages: - - package: dbt-labs/dbt_utils - version: [">=1.0.0", "<1.1.0"] +packages: + - package: dbt-labs/dbt_utils + version: [">=1.0.0", "<1.1.0"] diff --git a/profiles.yml b/profiles.yml index 59a15e8..80d07a6 100644 --- a/profiles.yml +++ b/profiles.yml @@ -1,23 +1,24 @@ -config: - send_anonymous_usage_stats: False - use_colors: True - partial_parse: True - -clickhouse_starschema: - outputs: - dev: - type: clickhouse - schema: default - host: "{{ env_var('DBT_HOST') }}" - port: 8443 - user: "{{ env_var('DBT_USER') }}" - password: "{{ env_var('DBT_PASSWORD') }}" - secure: True - verify: False - ci: - type: clickhouse - host: clickhouse - port: 8123 - schema: default - threads: 4 - target: dev +config: + send_anonymous_usage_stats: False + use_colors: True + partial_parse: True + +clickhouse_starschema: + outputs: + dev: + type: clickhouse + schema: default + host: "{{ env_var('DBT_HOST') }}" + port: 8443 + user: admin #"{{ env_var('DBT_USER') }}" + password: clickhouse #clickhouse #"{{ env_var('DBT_PASSWORD') }}" + secure: True + verify: False + # socket_timeout: 300000 + ci: + type: clickhouse + host: clickhouse + port: 8123 + schema: default + threads: 4 + target: dev diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl index 0aeee49..f682be3 100644 --- a/terraform/.terraform.lock.hcl +++ b/terraform/.terraform.lock.hcl @@ -1,9 +1,9 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/yandex-cloud/yandex" { - version = "0.85.0" - hashes = [ - "h1:D+ws+wJz2gZ7O5snSfk2GLvCdb2/5F8U3ULB+EvVJwc=", - ] -} +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/yandex-cloud/yandex" { + version = "0.85.0" + hashes = [ + "h1:D+ws+wJz2gZ7O5snSfk2GLvCdb2/5F8U3ULB+EvVJwc=", + ] +} diff --git a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/CHANGELOG.md b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/CHANGELOG.md index 287301c..1afa7f4 100644 --- a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/CHANGELOG.md +++ b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/CHANGELOG.md @@ -1,1175 +1,1175 @@ -## 0.86.0 (Unreleased) - -## 0.85.0 (January 31, 2023) -FEATURES: -* storage: add `object_lock_configuration` attribute in `bucket` resource -* storage: add `object_lock_legal_hold_status`, `object_lock_mode` and `object_lock_retain_until_date` attributes in `object` resource -* storage: add information about `storage_endpoint` in documents -* storage: add `config_read` property to `anonymous_access_flags` structure. - -BUG FIXES: -* storage: import bucket state now does not requires reapply because it's properly syncs acl and grants. -* mongodb: add `restore` entity in `yandex_mdb_mongodb_cluster` resource -* k8s: add `master_logging` attribute to `cluster` resource and data source -* **New Data Source:** `yandex_container_registry_ip_permission` -* **New Resource:** `yandex_container_registry_ip_permission` -* clickhouse: add possibility to update `version` and `resources` in single apply -* alb: add `regex` support in `StringMatch` -* clickhouse: added the feature to set maintenance_window when creating a cluster. -* clickhouse: support cloud_storage with advanced settings -* postgresql: add possibility to rename `yandex_mdb_postgresql_database` -* api_gateway: add `custom_domains` attribute to `api_gateway` resource and data source -* serverless: add `connectivity` attribute to `api_gateway` resource and data source -* serverless: add `connectivity` attribute to `yandex_functions` resource and data source -* serverless: add `connectivity` attribute to `yandex_serverless_container` resource and data source -* clickhouse: add feature to set weight for shards. - -## 0.84.0 (December 16, 2022) -BUG FIXES: -* mysql: fix bug leading to cluster recreation when changing folder_id -* mdb: fix bug when description cannot be set to null in `yandex_mdb_postgresql_cluster` and `yandex_mdb_mongodb_cluster` -* clickhouse: fix bug leading to failed updating cluster when set cloud_storage(enabled: false) -* compute: fix validation of local_disk in yandex_compute_instance resource - -FEATURES: -* compute: support `metadata_options` in `yandex_compute_instance` -* **New Data Source:** `yandex_compute_filesystem` -* **New Resource:** `yandex_compute_filesystem` -* compute: support `yandex_compute_filesystem` in `yandex_compute_instance` - -## 0.83.0 (December 1, 2022) -BUG FIXES: -* compute: fix bug leading to failed instance update when changing subnet_id of a network_interface -* clickhouse: fix bug leading to failed creating cluster when set maintenance_window - -FEATURES -* alb: add `log_options` attribute in `yandex_alb_load_balancer` resource and data source. - -FEATURES: -* **New Data Source:** `yandex_cm_certificate` -* **New Data Source:** `yandex_cm_certificate_content` -* **New Resource:** `yandex_cm_certificate` - -## 0.82.0 (November 11, 2022) -BUG FIXES: -* lockbox: display error cause, when creating resource `yandex_lockbox_secret_version` fails -* greenplum: add default values for pooler_config. Fix bug with greenplum cluster creation. -* postgresql: fix bug leading to cluster recreation when dropping users or databases in `yandex_mdb_postgresql_cluster` resource -* postgresql: fix bug leading to panic when creating user with grants = [""] -* serverless: check retry attributes when creating message queue trigger - -FEATURES: -* postgresql: add postgresql 15 support -* datatransfer: add `on_create_activate_mode` for incremental transfers -* datatransfer: ignore deactivation error on destroy -* **New Data Source:** `yandex_compute_snapshot_schedule` -* **New Resource:** `yandex_compute_snapshot_schedule` - -ENHANCEMENTS: -* add `sasl_enabled_mechanisms` attribute in `yandex_mdb_kafka_cluster` resource and data source - -## 0.81.0 (October 20, 2022) -BUG FIXES: -* compute: fix size validation in `resource_yandex_compute_disk` -* vpc: fix region_id validation in `resource_yandex_lb_network_load_balanacer` and `resource_yandex_lb_target_group` -* postgresql: fix `host_master_name` wrong behaviour in `yandex_mdb_postgresql_cluster` again -* alb: fix `value` wrong behaviour in `yandex_alb_http_router` and `yandex_alb_virtual_host` -* alb: fix default `path` value in `yandex_alb_backend_group` -* greenplum: add expanding greenplum cluster in a case of changing segments host numbers, details in `resource_yandex_mdb_greenplum_cluster` - -ENHANCEMENTS: -* provider: Upgrade go-sdk and go-genproto to the latest version. This is needed for ALB RBAC feature. -* add `message_max_bytes`, `replica_fetch_max_bytes`, `ssl_cipher_suites`, `offsets_retention_minutes` attributes in `yandex_mdb_kafka_cluster` resource and data source -* clickhouse: use version 22.8 for tests - -FEATURES: -* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_mysql_cluster` resource and data source -* alb: support `route_options` attribute in `yandex_alb_http_router` and `yandex_alb_virtual_host` resource and data source -* **New Data Source:** `yandex_lockbox_secret` -* **New Data Source:** `yandex_lockbox_secret_version` -* **New Resource:** `yandex_lockbox_secret` -* **New Resource:** `yandex_lockbox_secret_version` -* serverless: add `secrets` attribute in `yandex_function` resource and data source -* serverless: add `secrets` attribute in `yandex_serverless_container` resource and data source -* kafka: support S3-Sink Kafka connector in `yandex_mdb_kafka_connector` resource - -## 0.80.0 (September 22, 2022) -BUG FIXES: -* postgresql: fix `host_master_name` wrong behaviour in in `yandex_mdb_postgresql_cluster` -* postgresql: fix `yandex_mdb_postgresql_database` resource wrong behaviour in 0.78.1 - -FEATURES: -* **New Resource:** `yandex_organizationmanager_group_iam_member` - -## 0.79.0 (September 20, 2022) -FEATURES: -* redis: support for Redis 7.0 -* **New Data Source:** `yandex_organizationmanager_group` -* **New Resource:** `yandex_organizationmanager_group` -* **New Resource:** `yandex_organizationmanager_group_membership` -* ydb: support `deletion_protection` attribute to `yandex_ydb_database_serverless` and `yandex_ydb_database_dedicated` resources. -* **New Data Source:** `yandex_container_repository_lifecycle_policy` -* **New Resource:** `yandex_container_repository_lifecycle_policy` - -BUG FIXES: -* `yandex_container_repository`: fixed bug with orphant `yandex_container_repository` after taint of `yandex_container_registry` - - -## 0.78.2 (September 9, 2022) -BUG FIXES: -* kafka: sort hosts in listKafkaHosts method to avoid non - deterministic list of hosts. - -FEATURES: -* kafka: support Kafka 3.0,3.1,3.2 in `yandex_mdb_kafka_cluster` -* postgresql: added 13-1c, 14-1c Postgresql versions - -## 0.78.1 (September 6, 2022) -BUG FIXES: -* dns: fixed `proto: not found` error when creating, updating or deleting `yandex_dns_recordset` - -## 0.78.0 (September 1, 2022) -BUG FIXES: -* cdn: fixed wrong documentation example -* postgresql: fix `login` and `conn_limit` wrong behaviour in `yandex_mdb_postgresql_user` -* data source `yandex_organizationmanager_saml_federation_user_account` now works for federations with more than a hundred of users and with viewer role - -ENHANCEMENTS: -* vpc: allow usage of `yandex_vpc_gateway` in `yandex_vpc_route_table.static_route` as `gateway_id` next hop - -FEATURES: -* greenplum: add `maintenance_window` attribute to resource and data source -* greenplum: support for changing the user's password -* greenplum: support for changing segment and master resources -* mdb: add `template_db` attribute to `yandex_mdb_postgresql_cluster` resource and data source -* clickhouse: add `assign_public_ip` attribute to `host` declaration in resource and data source -* clickhouse: support hosts update -* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_mysql_cluster` resource and data source -* **New Data Source:** `yandex_iot_core_broker` -* **New Data Source:** `yandex_vpc_gateway` -* **New Resource:** `yandex_iot_core_broker` -* **New Resource:** `yandex_vpc_gateway` -* `data_transfer` flag in `ClusterConfig.access` for ClickHouse, Greenplum, MySQL, PostgreSQL, Kafka, MongoDB -* `yandex_query` flag in `ClusterConfig.access` for ClickHouse - -WARNING: -* mdb: remove 5 and 6 from supported versions for redis - -## 0.77.0 (July 27, 2022) -BUG FIXES: -* iam: fix access bindings deletion -* ydb: fixed panic if database was removed outside of terraform -* storage: fix issue when error, returned from reading extend bucket settings treated as important. - It will be printed as log output now instead of interrupting plan execution. -* greenplum: fix bug with not setting `security groups_ids` in `resource_yandex_mdb_greenplum_cluster` -* greenplum: fix bug with not setting `access` in `resource_yandex_mdb_greenplum_cluster` - -ENHANCEMENTS: -* mdb: add `sqlcollation` attribute to `yandex_mdb_sqlserver_cluster` resource and data source -* serverless: increase operation timeouts in `yandex_function` resource -* cdn: added the ability to set custom `folder_id` attribute for resources `yandex_cdn_origin_group` and `yandex_cdn_resource` - -FEATURES: -* k8s: add `instance_template.name` attribute to `node group` resource and data source -* k8s: add `instance_template.ipv4_dns_records`, `instance_template.ipv6_dns_records` attributes to `node group` resource and data source -* k8s: add `instance_template.labels` attribute to `node group` resource and data source -* greenplum: add fields `greenplum_config` and `pooler_config` in `resource_yandex_mdb_greenplum_cluster` -* **New Resource:** `yandex_serverless_container_iam_binding` -* **New Resource:** `yandex_ydb_database_iam_binding` - -## 0.76.0 (July 01, 2022) -BUG FIXES: -* alb: `send` and `receive` attributes can be empty now in `yandex_alb_backend_group` resource and data source -* alb: fixed `yandex_alb_load_balancer` resource and data source documentation -* alb: support `mode` attribute in `load_balancing_config` entity in `yandex_alb_backend_group` resource and data source -* mysql: `mysql_config.sql_mode` is setting now when creating a cluster -* mdb: fix changing `maintenance_window` only in `yandex_mdb_redis_cluster` -* clickhouse: fix issue with `shard_group` update -* serverless: fix issue with `retention_period` update in `yandex_logging_group` resource - -ENHANCEMENTS: -* alb: refactoring `yandex_alb_backend_group` resource and data source -* alb: extra validation added to `yandex_alb_load_balancer` and `yandex_alb_virtual_host` resources and data sources -* mdb: add `client_output_buffer_limit_normal` and `client_output_buffer_limit_pubsub` attributes to `yandex_mdb_redis_cluster` resource and data source -* mdb: add `replica_priority` attribute to `yandex_mdb_redis_cluster` resource and data source -* mdb: add `assign_public_ip` attribute to `yandex_mdb_redis_cluster` resource and data source -* ymq: add `region_id` attribute to resource - -FEATURES: -* compute: support for creating `yandex_compute_instance` with local disks - -## 0.75.0 (May 31, 2022) -ENHANCEMENTS: -* compute: support instance's scheduling policy update in-place - -FEATURES: -* datatransfer: add ClickHouse endpoint into `yandex_datatransfer_endpoint` resource -* alb: support `session_affinity` attribute in `yandex_alb_backend_group` resource and data source. -* **New Resource:** `yandex_mdb_postgresql_database` -* **New Resource:** `yandex_mdb_postgresql_user` -* **New Resource:** `yandex_mdb_mysql_database` -* **New Resource:** `yandex_mdb_mysql_user` -* **New Data Source:** `yandex_mdb_postgresql_database` -* **New Data Source:** `yandex_mdb_postgresql_user` -* **New Data Source:** `yandex_mdb_mysql_database` -* **New Data Source:** `yandex_mdb_mysql_user` -* storage: support `folder_id`, `max_size`, `anonymous_access_flags`, `https` and `default_storage_class` attributes in bucket. -See `storage_bucket` documentation for important information. - -BUG FIXES: -* postgresql: fix bug with applying cluster's settings in PostgreSQL 14 -* iam: return error when access bindings not applied -* storage: fix bug of wrong handling permission error denied on reading policy -* mdb: fix setting timeout and slowlog_max_len to 0 value in `yandex_mdb_redis_cluster` - -WARNING: -* postgresql: `database` and `user` sections for `yandex_mdb_postgresql_cluster` are now deprecated -* mysql: `database` and `user` sections for `yandex_mdb_mysql_cluster` are now deprecated - -## 0.74.0 (April 19, 2022) -ENHANCEMENTS: -* iam: support for changing description of `yandex_iam_service_account_key` without recreation -* mdb: add `performance_diagnostics` section in `yandex_mdb_mysql_cluster` resource and data source -* mdb: change attribute `yandex_mdb_mysql_cluster.user.global_permissions` type from List to Set -* alb: add `enable_proxy_protocol` attribute to `stream_backend` entity in `yandex_alb_backend_group` resource and data source - -BUG FIXES: -* postgresql: fix unpredictable behaviour when changing `assign_public_ip` without name -* storage: fix not saving bucket's `policy` to tfstate -* datatransfer: allow updating `tls_mode` attribute of `yandex_datatransfer_endpoint` resource from `enabled` to `disabled` value - -FEATURES: -* compute: changing `folder_id` attribute leads to move operation for `yandex_compute_instance` and `yandex_compute_disk` resources if `allow_recreate` flag is set to false (or not set). Otherwise, resource will be recreated. -* mdb: new mysql configuration options added -* mdb: support audit log (filter, audit_authorization_success) and security (enable, kmip) settings in `yandex_mdb_mongodb_cluster` -* add `host_group_ids` attribute in `yandex_mdb_mysql_cluster` resource and data source -* add `host_group_ids` attribute in `yandex_mdb_postgresql_cluster` resource and data source -* datatransfer: add MongoDB endpoint into `yandex_datatransfer_endpoint` resource - -## 0.73.0 (March 28, 2022) -ENHANCEMENTS: -* compute: add `host_affinity_rules` attribute to `placement_policy` in `yandex_compute_instance` resource and data source -* alb: support `storage_bucket` as a target in `yandex_alb_backend_group` resource and data source - -BUG FIXES: -* compute: avoid unnecessary start/stop operations for instance while updating secondary disk configuration -* compute: detach secondary disk from instance before deleting -* dataproc: add `assign_public_ip` attribute to `subcluster_spec` entity. If set to `true` then public ip addresses will be assigned to hosts of the subcluster -* docs: fixed exported attributes for `yandex_vpc_network` datasource -* docs: fixed `yandex_vpc_address` resource documentation -* dns: fixed `yandex_dns_recordset` resource record data length restriction - -FEATURES: -* mdb: support `persistence_mode` in `yandex_mdb_redis_cluster` -* kafka: support connector resource and data source in Kafka clusters - -## 0.72.0 (March 02, 2022) -ENHANCEMENTS: -* mdb: add `serverless` attribute to `access` entity in `yandex_mdb_postgresql_cluster` resource and data source -* add `ssl_certificate` attribute in `yandex_cdn_resource` resource and data source -* alb: change `http_backend` and `grpc_backend` and `stream_backend` and `healthcheck` attribute types from Set to List in `yandex_alb_backend_group` resource -* mdb: add `priority` and `backup_priority` attributes to `host` entity in `yandex_mdb_mysql_cluster` resource and data source -* mdb: add `embedded_keeper` attribute in `yandex_mdb_clickhouse_cluster` resource and data_source - -FEATURES: -* mdb: support MongoDB enterprise 4.4 and 5.0 in `yandex_mdb_mongodb_cluster` -* kafka: support change `assign_public_ip` flag in Kafka clusters -* resource-manager: add `yandex_resourcemanager_cloud` resource. - -BUG FIXES: -* alb: fix behavior of attribute `validation_context` of `tls` entity in `yandex_alb_backend_group` resource -* alb: fix behavior of `send` and `receive` attributes of `stream_healthcheck` entity in `yandex_alb_backend_group` resource -* docs: Fixed few minor inaccuracies of `yandex_alb_load_balancer` resource - -## 0.71.0 (February 08, 2021) -ENHANCEMENTS: -* allow `initial` of `0` for `yandex_kubernetes_node_group` `auto_scale` policy. -* dataproc: now cluster version specified in create cluster request is treated as a semantic version prefix. So specified version `2.0` may lead to creation of cluster version `2.0.30` and this will not be considered a change in terraform state. -* add `host_group_ids` attribute in `yandex_mdb_sqlserver_cluster` resource and data source - -BUG FIXES: -* alb: fix behavior of attribute `weight` in `http_backend` and `grpc_backend` and `stream_backend` in `yandex_alb_backend_group` resource -* datatransfer: make `yandex_datatransfer_transfer` importable in accordance with the documentation -* mdb: fix the optional parameter `preallocate` for kafka topic config when it is absent - -## 0.70.0 (January 17, 2022) -FEATURES: -* **New Resource:** `yandex_datatransfer_endpoint` -* **New Resource:** `yandex_datatransfer_transfer` -* managed-kubernetes: add `container_runtime` attribute to `yandex_kubernetes_node_group` resource and data source -* managed-elasticsearch: add `maintenance_window` section in `yandex_mdb_elasticsearch_cluster` resource and data source -* dns: support for resolving by name in `yandex_dns_zone` data source - -BUG FIXES: -* mdb: fix error when simultaneously deleting `yandex_mdb_kafka_topic` resource and modifying `yandex_mdb_kafka_cluster` resource - -ENHANCEMENTS: -* mdb: add `maintenance_window` section in `yandex_mdb_kafka_cluster` resource and data source - -## 0.69.0 (December 27, 2021) -FEATURES: -* **New Data Source:** `yandex_cdn_origin_group` -* **New Data Source:** `yandex_cdn_resource` -* **New Data Source:** `yandex_serverless_container` -* **New Resource:** `yandex_cdn_origin_group` -* **New Resource:** `yandex_cdn_resource` -* **New Resource:** `yandex_serverless_container` -* alb: add `stream_backend` attribute to `yandex_alb_backend_group` resource and data source -* alb: add `stream` attribute to `listener` entity in `yandex_alb_load_balancer` resource and data source - -BUG FIXES: -* docs: Fixed few minor inaccuracies of `yandex_alb_virtual_host` resource - -FEATURES: -* compute: added `block_size` in `yandex_compute_disk` and `yandex_compute_instance` resources. - -## 0.68.0 (December 10, 2021) -FEATURES: -* mdb: added the ability to upgrade Kafka version using the `version` attribute of `yandex_mdb_kafka_cluster` resource. - -BUG FIXES: -* alb: fix behavior of attribute `address_type` in `yandex_alb_target_group` resource -* alb: fix behavior of attribute `route.http_route.http_route_action.host_rewrite` in `yandex_alb_virtual_host` resource -* mdb: fix crash when empty config is specified for Kafka topic within `yandex_mdb_kafka_topic` and `yandex_mdb_kafka_cluster` resources - -ENHANCEMENTS: -* alb: add `private_ipv4_address` attribute to `target` entity in `yandex_alb_target_group` resource and data source -* compute: add `pooled` attribute in `yandex_compute_image` resource and data source - -## 0.67.0 (November 22, 2021) -ENHANCEMENTS: -* provider: Upgrade to Terraform Plugin SDK V2. There should be no breaking changes from a practitioner's perspective. - -BUG FIXES: -* alb: fix behavior of attribute `modify_request_headers.append` in `yandex_alb_virtual_host` resource -* alb: fix error when `route.http_route.http_match.http_method` attribute of `yandex_alb_virtual_host` resource is used. -* alb: fix behavior of attribute `route.http_route.http_match.path` in `yandex_alb_virtual_host` resource. -* mdb: fix `name` update in `yandex_mdb_mongodb_cluster` - -FEATURES: -* add new resource and data-source `yandex_organizationmanager_saml_federation` -* add new data-source `yandex_organizationmanager_saml_federation_user_account` - -## 0.66.0 (November 3, 2021) -FEATURES: -* mdb: Kafka topic management via dedicated resource `yandex_mdb_kafka_topic` is implemented -* mdb: support update `name`, `description`, `labels`, `config.access.data_lens`, `config.access.web_sql`, `deletion_protection` in `yandex_mdb_greenplum_cluster` resource -* mdb: add `access` and `backup_window_start` entities in `yandex_mdb_greenplum_cluster` resource and data source -* mdb: support MongoDB 5.0 in `yandex_mdb_mongodb_cluster` -* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data source - - -ENHANCEMENTS: -* add docs on k8s node group placement groups. -* ydb: increase the default timeout to create serverless database -* add `name`, `replication_source`, `replication_source_name` attributes to `host` entity in `yandex_mdb_mysql_cluster` resource and data source -* mysql, postgresql: support updating `assign_public_ip` without host recreation - -WARNING: -* `allow_regeneration_host` for mysql host is now DEPRECATED. - -BUG FIXES: -* mdb: fix behavior of attribute `user.settings.log_min_duration_statement` in `yandex_mdb_postgresql_cluster` resource - -## 0.65.0 (October 14, 2021) -FEATURES: -* mdb: support Schema Registry in `yandex_mdb_kafka_cluster` - -FEATURES: -* **New Resource:** `yandex_kms_symmetric_key_iam_binding` - -ENHANCEMENTS: -* elasticsearch: update go-sdk version, add tests -* serverless: supported logging trigger - -BUG FIXES: -* mdb: invalid plan was generated when user didn't specify zookeeper resources for multibroker Kafka cluster - -## 0.64.1 (September 24, 2021) -BUG FIXES: -* mdb: fix password change in Redis - -## 0.64.0 (September 22, 2021) -FEATURES: -* **New Resource:** `yandex_logging_group` -* **New Data Source:** `yandex_logging_group` - -BUG FIXES: -* fix sni handler expanding -* fix `internal_ipv4_address` missing `subnet_id` field -* fix non empty plan when `yandex_vpc_security_group_rule` protocol written in non uppercase - -## 0.63.1 (September 10, 2021) -BUG FIXES: -* fix alb backend group with empty tls. - -## 0.63.0 (September 07, 2021) -FEATURES: -* **New Data Source:** `yandex_mdb_greenplum_cluster` -* **New Resource:** `yandex_mdb_greenplum_cluster` -* docs: add info about internal address for `lb_network_load_balancer` -* docs: add info about loadbalancer_healthchecks predefined target for `vpc_security_group` - -BUG FIXES: -* mdb: fix terraform crash when using big integers as Kafka broker and topic config values - -## 0.62.0 (August 30, 2021) -FEATURES: -* storage: `yandex_storage_bucket` resource supports website routing rules configuraion -* mdb: support Redis 6.2 in `yandex_mdb_redis_cluster` -* mdb: support Kafka 2.8 in `yandex_mdb_kafka_cluster` -* add yandex_organizationmanager_organization_iam_member and yandex_organizationmanager_organization_iam_binding resources. - -BUG FIXES: -* vpc: fix dirty plan of `labels` in vpc resources -* vpc: fix `yandex_vpc_security_group_rule` doc -* vpc: fix ignoring description when changing at inline rules of `yandex_vpc_security_group` -* mdb: ensure that `network_id` is not empty if provided -* mdb: fix host creating with empty `subnet_id` in `yandex_mdb_postgresql_cluster` -* mdb: suppress master nodes config changes if no master node used in `yandex_mdb_elasticsearch_cluster` -* apigateway: fixed spec updating in `yandex_api_gateway` - -ENHANCEMENTS: -* add `deletion_protection` attribute to `yandex_mdb_clickhouse_cluster`, `yandex_mdb_elasticsearch_cluster`, `yandex_mdb_kafka_cluster`, `yandex_mdb_mongodb_cluster`, `yandex_mdb_mysql_cluster`, `yandex_mdb_postgresql_cluster`, `yandex_mdb_redis_cluster`, `yandex_mdb_sqlserver_cluster` resources and data sources -* add `deletion_protection` attribute to `yandex_dataproc_cluster` data source -* support updating of k8s node group `node_labels` without recreation. -* docs: added a description of the port to the documentation for `yandex_mdb_postgresql_cluster` -* support version updaing for `yandex_mdb_elasticsearch_cluster` - -## 0.61.0 (July 9, 2021) -FEATURES: -* **New Data Source:** `yandex_alb_load_balancer` -* **New Data Source:** `yandex_function_scaling_policy` -* **New Data Source:** `yandex_vpc_security_group_rule` for getting info about security group rules -* **New Resource:** `yandex_alb_load_balancer` -* **New Resource:** `yandex_resourcemanager_folder` -* **New Resource:** `yandex_function_scaling_policy` -* **New Resource** `yandex_vpc_security_group_rule` for security group rule managment - -ENHANCEMENTS: -* add `application_load_balancer` entity in `yandex_compute_instance_group` resource and data source -* add `max_checking_health_duration` and `max_opening_traffic_duration` in `yandex_compute_instance_group` -* add `service` attribute to `auto_scale.custom_rule` in `yandex_compute_instance_group` resource and data source -* add `folder_id` attribute to `auto_scale.custom_rule` in `yandex_compute_instance_group` resource and data source -* add `nat_ip_address` attribute to `instance_template.network_interface` in `yandex_compute_instance_group` resource and data source -* add `disk_id` attribute to `instance_template.boot_disk`,`instance_template.secondary_disk` in `yandex_compute_instance_group` -* support of changing `cloud_storage` attribute in `yandex_mdb_clickhouse_cluster` resource -* apigateway: change `spec` attribute from filename to string -* docs: add info about timeouts for `yandex_compute_snapshot` -* docs: add `yandex_api_gateway` -* add `content_type` attribute in `yandex_storage_object` resource - -BUG FIXES: -* compute: Remove restrictions for `type` attribute at `instance_template.boot_disk.initialize_params`,`instance_template.secondary_disk.initialize_params` in `yandex_compute_instance_group` -* functions: `execution_timeout` attribute change now provides `yandex_function` resource update - -## 0.60.0 (June 17, 2021) -FEATURES: -* **New Data Source:** `yandex_alb_virtual_host` -* **New Resource:** `yandex_alb_virtual_host` -* **New Data Source:** `yandex_mdb_elasticsearch_cluster` -* **New Resource:** `yandex_mdb_elasticsearch_cluster` - -ENHANCEMENTS: -* mdb: add `maintenance_window` section in `yandex_mdb_mongodb_cluster`, `yandex_mdb_postgresql_cluster` resource and data source -* dataproc: added support for properties modification -* k8s: support `network_acceleration_type` in k8s node group resource and data source. -* k8s: support Cilium network implementation in k8s cluster and data source. - -BUG FIXES: -* mdb: fixed some errors in implementation of Kafka topics modification -* dns: fixed field name error -* dns: fixed diff with compact ipv6 data records in `yndex_dns_recordset` - -## 0.59.0 (June 6, 2021) -FEATURES: -* **New Data Source:** `yandex_alb_http_router` -* **New Resource:** `yandex_alb_http_router` -* **New Data Source:** `yandex_alb_backend_group` -* **New Resource:** `yandex_alb_backend_group` -* add `autoscaling_config` to Data Proc subcluster specification -* add `ip_address` and `ipv6_address` attributes to `network_interface` entity in `yandex_compute_instance_group` -* **New Resource** `yandex_vpc_default_security_group` for network's default security group managment - -ENHANCEMENTS: -* managed-redis: added `notify_keyspace_events`, `slowlog_log_slower_than`, `slowlog_max_len` and `databases` fields -* mdb: add `maintenance_window` section in `yandex_mdb_clickhouse_cluster`, `yandex_mdb_mysql_cluster` and `yandex_mdb_redis_cluster` resource and data source -* add `num_partitions` and `default_replication_factor` attributes in `yandex_mdb_kafka_cluster` resource and data source -* change of `dns_record`, `ipv6_dns_record` and `nat_dns_record` in `network_interface` entity of `yandex_compute_instance` - without instance drop - -BUG FIXES: -* mdb: throw error when trying to modify `owner` in `database` block in `yandex_mdb_postgresql_cluster` - -## 0.58.0 (May 14, 2021) -FEATURES: -* **New Data Source:** `yandex_alb_target_group` -* **New Resource:** `yandex_alb_target_group` -* add `ipv6` and `ipv4` attributes to yandex_kubernetes_node_group network interfaces both in resource and the data source. - -## 0.57.0 (April 29, 2021) -FEATURES: -* support k8s node group placement groups both in resource and data source. -* add cluster_ipv6_range and service_ipv6_range attributes both to resource yandex_kubernetes_cluster and data source yandex_kubernetes_cluster -* add `host_group_ids` attribute in `yandex_mdb_kafka_cluster` resource and data source -* add `host_group_ids` attribute in `yandex_dataproc_cluster` resource and data source - -ENHANCEMENTS: -* add `dns_record`, `ipv6_dns_record` and `nat_dns_record` to `network_interface` entity in `yandex_compute_instance` - -## 0.56.0 (April 15, 2021) -ENHANCEMENTS: -* dataproc: supported `security_group_ids` -* add `dns_record`, `ipv6_dns_record` and `nat_dns_record` to `network_interface` entity in `yandex_compute_instance_group` -* ydb: support for Yandex Database clusters -* compute: increase disk size limit from 4096Gb to 8192Gb -* vpc: add `name` field description at vpc_security_group datasource and example of it usage - -BUG FIXES: -* compute: placement_policy update in `yandex_compute_instance_group` - -## 0.55.0 (April 1, 2021) -FEATURES: -* storage: `yandex_storage_bucket` resource supports bucket policy configuration - -ENHANCEMENTS: -* add extended API logging. Use TF_ENABLE_API_LOGGING=1 with TF_LOG=debug to see extended output. -* support IAM token in tests -* managed-redis: added 'tls_enabled' field -* managed-kafka: added 'unmanaged_topics' cluster flag and some cluster config flags -* mdb: add `host` attribute in `yandex_mdb_kafka_cluster` resource and data source - -BUG FIXES: -* serverless: fix API Gateway specification update - -## 0.54.0 (March 23, 2021) -ENHANCEMENTS: -* provider: the default development, testing and building of the provider is now done with Go 1.16. -* serverless: supported API Gateway - -BUG FIXES: -* mdb: fix user settings diff for ClickHouse cluster - -## 0.53.0 (March 19, 2021) -ENHANCEMENTS: -* mdb: add example and update documentation for `yandex_mdb_postgresql_cluster` resource -* serverless: supported log-group trigger - -BUG FIXES: -* dns: fix recordset update in `yandex_dns_recordset` -* storage: Fix timeout while applying CORS settings with empty fields - -## 0.52.0 (March 10, 2021) -FEATURES: -* **New Resource:** `yandex_mdb_sqlserver_cluster` -* managed-kubernetes: support `security_group_ids` for `yandex_kubernetes_node_group` resource and data source -* **New Resource:** `yandex_dns_zone` -* **New Resource:** `yandex_dns_recordset` -* **New Data Source:** `yandex_dns_zone` -* serverless: support import for all resources -* **New Resource:** `yandex_container_repository` -* **New Resource:** `yandex_container_repository_iam_binding` -* **New Data Source:** `yandex_container_repository` - -ENHANCEMENTS: -* mdb: add `service_account_id` section in `yandex_mdb_clickhouse_cluster` resource and data source -* mdb: add `cloud_storage` section in `yandex_mdb_clickhouse_cluster` resource and data source -* managed-kubernetes: added `network_interface` section for `yandex_kubernetes_node_group` -* managed-redis: added 'disk_type_id' field - -WARNING: -* managed-kubernetes: `nat` entitiy and `subnet_id` entity in `allocation_policy` section for `yandex_kubernetes_node_group` is now deprecated -* mdb: when changing the `assign_public_ip` attribute to `host` entity in `yandex_mdb_mysql_cluster`, the old host is deleted and a new host is created -* mdb: add `allow_regeneration_host` attribute in `yandex_mdb_mysql_cluster` resource - -BUG FIXES: -* mdb: fix host delete in `yandex_mdb_mysql_cluster` - -## 0.51.1 (February 20, 2021) -ENHANCEMENTS: -* compute: add documentation and example for non-replicated disk - -## 0.51.0 (February 19, 2021) -FEATURES: -* compute: support yandex_disk_placement_group resource and data source. -* compute: integrate yandex_disk_placement_group with compute disk resource and data source. -* mdb: added the ability to upgrade the Mysql version using the `version` attribute in `yandex_mdb_mysql_cluster` - -ENHANCEMENTS: -* mdb: add `restore` entity in `yandex_mdb_mysql_cluster` resource -* mdb: add `connection_limits`, `global_permissions` and `authentication_plugin` attributes to `user` entity in `yandex_mdb_mysql_cluster` resource and data source -* mdb: add `restore` entity in `yandex_mdb_postgresql_cluster` resource -* mdb: add `settings` and `quota` sections to `user` entity in `yandex_mdb_clickhouse_cluster` resource and data source. -* iam: corrected documentation for `yandex_resourcemanager_cloud_iam_binding` resource. -* iam: corrected documentation for `yandex_resourcemanager_folder_iam_binding` resource. - -BUG FIXES: -* mdb: fix updating user permissions for Kafka cluster - -WARNING: -* mdb: replace sets with lists for users in `yandex_mdb_mysql_cluster`. There can appear changes in diff for users, which will not change anything and will disappear after apply - -## 0.50.0 (February 5, 2021) -FEATURES: -* **New Resource:** `yandex_container_registry_iam_binding` -* mdb: version 13 is available in `yandex_mdb_postgresql_cluster` -* storage: `yandex_storage_bucket` resource supports versioning configuration -* storage: `yandex_storage_bucket` resource supports logging configuration -* vpc: add example for ddos protected address documentation -* compute: support yandex_placement_group resource and data source. -* compute: integrate yandex_placement_group with compute instance and instance group resources and data source. - -ENHANCEMENTS: -* storage: add bucket configuration example -* mdb: support `security_group_ids` for managed service for kafka -* mdb: add `web_sql` and `data_lens` attribute to `access` entity in `yandex_mdb_mysql_cluster` resource and data source -* mdb: add `mysql_config` attribute in `yandex_mdb_mysql_cluster` resource and data source -* mdb: add `format_schema` section in `yandex_mdb_clickhouse_cluster` resource and data source -* mdb: add `ml_model` section in `yandex_mdb_clickhouse_cluster` resource and data source -* mdb: add `replication_source_name`, `priority` attributes to `host`entity and `host_master_name` attribute in `yandex_mdb_postgresql_cluster` resource and data source -* mdb: add `sql_user_management` and `sql_database_management` attributes in `yandex_mdb_clickhouse_cluster` resource and data_source -* mdb: add `admin_password` attribute in `yandex_mdb_clickhouse_cluster` resource -* kms: add sensitive flag for `plaintext` attribute in `yandex_kms_secret_ciphertext` resource -* managed-kubernetes: support `security_group_ids` for `yandex_kubernetes_cluster` resource and data source - -## 0.49.0 (January 15, 2021) -FEATURES: -* storage: `yandex_storage_bucket` resource supports lifecycle configuration - -ENHANCEMENTS: -* mdb: changing `folder_id` attribute in `yandex_mdb_postgresql_cluster` moves PostgreSQL cluster to new folder -* mdb: add `web_sql` attribute to `config.access` entity in `yandex_mdb_postgresql_cluster` resource and data source -* mdb: add `performance_diagnostics` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data source -* mdb: add `settings` attribute to `user` entity in `yandex_mdb_postgresql_cluster` resource and data source -* mdb: add `postgresql_config` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data -* mdb: support `security_group_ids` in all database cluster resources and data sources -* compute: `strategy` attribute to `deploy_policy` entity in `yandex_compute_instance_group` resource and data source -* vpc: extend validation for listener spec in `yandex_lb_network_load_balancer` resource - -## 0.48.0 (December 22, 2020) -BUG FIXES: -* mdb: fix setting of folder_id field for MongoDB cluster -* dataproc: add documentation for the `ui_proxy` attribute -* vpc: fix panic on reading `yandex_vpc_address` resource - -ENHANCEMENTS: -* mdb: add `conn_limit` attribute to `user` entity in `yandex_mdb_postgresql_cluster` resource and data source -* mdb: add `config` section in `yandex_mdb_clickhouse_cluster` resource and data source - -## 0.47.0 (November 10, 2020) -BUG FIXES: -* kms: fix import operation -* serverless: folder_id can be using from yandex_function, yandex_function_trigger, yandex_iot_core_registry -* serverless: crash fix for dlq option in yandex_function_trigger - -ENHANCEMENTS: -* vpc: default_security_group_id field was added to network resource and data source -* provider: support authentication via IAM token - -FEATURES: -* mdb: support ClickHouse shard groups in `yandex_mdb_clickhouse_cluster` - -## 0.46.0 (October 19, 2020) -BUG FIXES: -* vpc: Security group rule port bugfix: can create rules without specifying a port -* vpc: Fix internal_address_spec block in network load balancer resource doc -* vpc: Security group ANY port bug fix -* dataproc: support for UI Proxy - -ENHANCEMENTS: -* serverless: improved zip archive content size limit excession error message - -## 0.45.1 (October 06, 2020) - -BUG FIXES: -* fix release issue - -## 0.45.0 (October 05, 2020) -FEATURES: -* mdb: support MongoDB 4.4 in `yandex_mdb_mongodb_cluster` -* vpc: address resource & data source - -ENHANCEMENTS: -* lb: improve NLB sweeper and tests - -BUG FIXES: -* vpc: `static_route` in `yandex_vpc_route_table` is optional now - -## 0.44.1 (September 24, 2020) - -BUG FIXES: -* vpc: fix "security_group" data source - -## 0.44.0 (September 22, 2020) - -FEATURES: -* vpc: security group rule targets `security_group_id` and `predefined_target` are supported -* storage: `yandex_storage_bucket` resource can manage SSE - -ENHANCEMENTS: -* some changes in security group resource - -BUG FIXES: -* lb: fix modifying listener settings - -## 0.43.0 (August 20, 2020) - -FEATURES: -* iam: support for resolving by name in `yandex_iam_service_account` data source - -BUG FIXES: -* compute: fix `yandex_compute_instance` update trying to re-configure dymanic NAT -* mdb: replace sets with lists for users and databases in `yandex_mdb_postgresql_cluster`. -WARNING: there can appear changes in diff for users and databases, which will not change anything and will disappear after apply - -## 0.42.1 (August 04, 2020) - -BUG FIXES: -* compute: fix panic on parsing `instance_template.network_interface.security_group_ids` attribute in `yandex_compute_instance_group` resource - -## 0.42.0 (July 27, 2020) -FEATURES: -* mdb: support Redis 6.0 in `yandex_mdb_redis_cluster` - -FEATURES: -* **New Data Source:** `yandex_client_config` - -ENHANCEMENTS: -* mdb: add `role` attribute to `host` entity in `yandex_mdb_postgresql_cluster` resource and data source -* compute: support update of `network_interface` attribute for `yandex_compute_instance` resource - -BUG FIXES: -* compute: fix `secondary_disk` validation in `yandex_compute_instance_group` resource -* compute: remove `secondary_disk.security_group_ids` attribute from `yandex_compute_instance` data source - -## 0.41.1 (June 24, 2020) - -BUG FIXES: -* vpc: fix panic on empty subnet dhcp options on `yandex_vpc_subnet` resource ([#82](https://github.com/terraform-providers/terraform-provider-yandex/issues/82)) - -## 0.41.0 (June 23, 2020) -FEATURES: -* **New Data Source:** `yandex_message_queue` -* **New Resource:** `yandex_message_queue` -* vpc: allow setting dhcp options for `yandex_vpc_subnet` - -ENHANCEMENTS: -* mdb: document mdb enumerables for Redis, MongoDB and ClickHouse -* provider: support set 'service_account_key_file' as either the path to or the contents of a Service Account key file in JSON format -* managed-kubernetes: support `gpus` attribute for `yandex_kubernetes_node_group` -* compute: add `instance_template.scale_policy.test_auto_scale` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `deletion_protection` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `instance_template.network_interface.security_group_ids` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `network_interface.security_group_ids` attribute in `yandex_compute_instance` resource and data source - -BUG FIXES: -* mdb: fix typo in using mdb api by `resource_yandex_mdb_postgresql_cluster` -* vpc: fix removing `yandex_vpc_subnet` attribute `route_table_id` - -## 0.40.0 (May 22, 2020) -FEATURES: -* **New Resource:** `yandex_function_iam_binding` - -BUG FIXES: -* compute: add `ipv4` flag in `yandex_compute_instance` data source -* mdb: fix disk size change on `mdb_mongodb` resource update -* mdb: adding database with its owner to existing `resource_yandex_mdb_postgresql_cluster` simultaneously - -## 0.39.0 (May 05, 2020) -ENHANCEMENTS: -* mdb: add `roles` attribute to `user` entity in `mdb_mongodb` resource and data source -* compute: change allowed disk type from `network-nvme` to `network-ssd` -* compute: `ipv4` flag determines whether to assign a IPv4 address for `network_interface` in `yandex_compute_instance` and `yandex_compute_instance_group` - -## 0.38.0 (April 22, 2020) -FEATURES: -* **New Data Source:** `yandex_vpc_security_group` -* **New Resource:** `yandex_vpc_security_group` - -ENHANCEMENTS: -* managed-kubernetes: allow to create cluster with KMS provider for secrets encryption. - -## 0.37.0 (April 16, 2020) -ENHANCEMENTS: -* storage: support custom acl grants for `yandex_storage_bucket` - -## 0.36.0 (April 16, 2020) -ENHANCEMENTS: -* compute: add `variables` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `status` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `instance_template.name` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `instance_template.hostname` attribute in `yandex_compute_instance_group` resource and data source -* compute: add `instances.status_changed_at` attribute in `yandex_compute_instance_group` resource and data source -* managed-kubernetes: add `node_ipv4_cidr_mask_size` attribute to `yandex_kubernetes_cluster` resource and data source -* managed-kubernetes: add `deploy_policy.max_unavailable` and `deploy_policy.max_expansion` attributes to `yandex_kubernetes_node_group` resource and data source -* serverless: add `environment` attribute in `yandex_function` resource and data source - -BUG FIXES: -* mdb: fix modifying `yandex_mdb_mysql_cluster` attribute `backup_window_start` - -## 0.35.0 (March 31, 2020) -FEATURES: -* **New Resource:** `yandex_kms_secret_ciphertext` - -ENHANCEMENTS: -* mdb: add `config_spec.access.serverless` attribute in `resource_yandex_mdb_clickhouse_cluster` resource and data source - -BUG FIXES: -* mdb: forbidden to change user settings that are not present in the scheme of `resource_yandex_mdb_postgresql_cluster` -* compute: compute instance attribute `hostname` is now filled when imported - -## 0.34.0 (March 18, 2020) -FEATURES: -* **New Data Source:** `yandex_function` -* **New Data Source:** `yandex_function_trigger` -* **New Resource:** `yandex_function` -* **New Resource:** `yandex_function_trigger` - -ENHANCEMENTS: -* compute: add `instance_template.network_settings` attribute in `yandex_compute_instance_group` resource and data source - -## 0.33.0 (March 06, 2020) -FEATURES: -* **New Data Source:** `yandex_iot_core_registry` -* **New Data Source:** `yandex_iot_core_device` -* **New Resource:** `yandex_iot_core_registry` -* **New Resource:** `yandex_iot_core_device` - -ENHANCEMENTS: -* managed-kubernetes: support network policy provider for `yandex_kubernetes_cluster` ([#45](https://github.com/terraform-providers/terraform-provider-yandex/issues/45)) -* managed-kubernetes: add `node_labels`, `node_taints` and `allowed_unsafe_sysctls` fields for `yandex_kubernetes_node_group` - -BUG FIXES: -* mdb: throw error when trying to modify `assign_public_ip` in `resource_yandex_mdb_postgresql_cluster`,`resource_yandex_mdb_mysql_cluster` - -## 0.32.0 (February 28, 2020) -FEATURES: -* compute: allow setting public IP address for `yandex_compute_instance` -* mdb: support ClickHouse cluster access for Yandex.Metrica - -BUG FIXES: -* mdb: disallow change `lc_collate` and `lc_ctype` in `yandex_mdb_postgresql_cluster` after creation. -* container-registry: prevent terraform crash during `terraform destroy` execution for non-existent container registry. -* resourcemanager: data source folder. fixed folder_id resolve by name (would fail without folder_id in provider config) -* managed-kubernetes: k8s cluster version update no longer requires destroying of resource -* managed-kubernetes: update of maintenance window `start_time` and `duration` will now trigger resource update - -## 0.31.0 (February 14, 2020) -FEATURES: -* compute: software network acceleration for `yandex_compute_instance` -* mdb: support roles for users in `yandex_mdb_mysql_cluster` - -ENHANCEMENTS: -* compute: support metric labels for custom rules in `yandex_compute_instance_group` resource `scale_policy.auto_scale` attribute - -BUG FIXES: -* lb: fix modifying health check settings - -## 0.30.0 (February 04, 2020) -FEATURES: -* **New Data Source:** `yandex_dataproc_cluster` -* **New Resource:** `yandex_dataproc_cluster` - -ENHANCEMENTS: -* managed-kubernetes: support autoscaled `yandex_kubernetes_node_group` - -## 0.29.1 (January 29, 2020) -BUG FIXES: -* resourcemanager: data source cloud. fixed cloud_id resolve by name (would fail without folder_id in provider config) - -## 0.29.0 (January 24, 2020) -FEATURES: -* **New Data Source:** `yandex_mdb_mysql_cluster` -* **New Data Source:** `yandex_mdb_postgresql_cluster` -* **New Resource:** `yandex_mdb_mysql_cluster` -* **New Resource:** `yandex_mdb_postgresql_cluster` - -## 0.28.0 (January 13, 2020) -FEATURES: -* **New Resource:** `yandex_kms_symmetric_key` - -ENHANCEMENTS: -* managed-kubernetes: support maintenance policy for `yandex_kubernetes_cluster` and `yandex_kubernetes_node_group` -* lb: `yandex_lb_network_load_balancer` now supports UDP for `protocol` attribute. - -BUG FIXES: -* provider: fix `message type "google.protobuf.Empty" isn't linked in` ([#35](https://github.com/terraform-providers/terraform-provider-yandex/issues/35)) - -## 0.27.0 (December 20, 2019) -FEATURES: -* **New Data Source:** `yandex_mdb_mongodb_cluster` -* **New Resource:** `yandex_mdb_mongodb_cluster` - -ENHANCEMENTS: -* mdb: support sharding in `yandex_mdb_clickhouse_cluster` -* lb: changes in `yandex_lb_network_load_balancer` support ipv6 at listener.0.external_address_spec.ip_version - -## 0.26.0 (December 06, 2019) -ENHANCEMENTS: -* compute: support for custom rules in `yandex_compute_instance_group.scale_policy.auto_scale` - -## 0.25.0 (December 05, 2019) -FEATURES: -* **New Data Source:** `yandex_mdb_clickhouse_cluster` -* **New Resource:** `yandex_mdb_clickhouse_cluster` - -## 0.24.0 (December 03, 2019) -BUG FIXES: -* managed-kubernetes: changes in `yandex_kubernetes_node_group` allocation_policy should trigger destroy/add. -* managed-kubernetes: changes in `yandex_kubernetes_cluster` location, release_channel should trigger destroy/add. -* managed-kubernetes: changes in `yandex_kubernetes_cluster` master.0.version should NOT trigger destroy/add, and use update instead. -* managed-kubernetes: forbidden zero values in `yandex_kubernetes_node_group`, in instance_template.0.resources.0.memory(cores) -* managed-kubernetes: fill `instance_group_id` field in `yandex_kubernetes_node_group` datasource and resource. - -ENHANCEMENTS: -* compute: support update of service_account_id in `yandex_compute_instance` without resource recreation. -* datasource resolving by name now uses folder_id from its config (when provided), affected datasources: -`yandex_compute_disk`, `yandex_compute_image`, `yandex_compute_instance`, `yandex_compute_snapshot`, -`yandex_container_registry`, `yandex_kubernetes_cluster`, `yandex_kubernetes_node_group`, -`yandex_lb_network_load_balancer`, `yandex_lb_target_group`, `yandex_mdb_redis_cluster`, -`yandex_vpc_network`, `yandex_vpc_route_table`, `yandex_vpc_subnet`. - -## 0.23.0 (November 05, 2019) -ENHANCEMENTS: -* mdb: support sharding in `yandex_mdb_redis_cluster` -* compute: increase `yandex_compute_snapshot` timeout from 5 to 20 minutes - -BUG FIXES: -* managed-kubernetes: mark as computable `version` and `public_ip` in `yandex_kubernetes_cluster` resource - -## 0.22.0 (October 24, 2019) -ENHANCEMENTS: -* compute: add `instances` to `yandex_compute_instance_group` resource -* mdb: add fqdns of hosts in `yandex_mdb_redis_cluster` resource and data source -* managed-kubernetes: add `version` to `yandex_kubernetes_node_group` resource - -## 0.21.0 (October 17, 2019) -ENHANCEMENTS: -* storage: `yandex_storage_bucket` and `yandex_storage_object` resources can manage ACL - -## 0.20.0 (October 15, 2019) -FEATURES: -* **New Resource:** `yandex_storage_bucket` -* **New Resource:** `yandex_storage_object` - -## 0.19.0 (October 15, 2019) -ENHANCEMENTS: -* managed-kubernetes: `yandex_kubernetes_node_group` resource can now be imported -* managed-kubernetes: `yandex_kubernetes_cluster` resource can now be imported - -BUG FIXES: -* minor documentation fixes for Kubernetes cluster resource and instance group datasource. - -## 0.18.0 (October 11, 2019) -ENHANCEMENTS: -* provider: support authentication via instance service account from inside an instance - -BUG FIXES: -* container: increase default timeout - -## 0.17.0 (October 02, 2019) -FEATURES: -* compute: auto_scale support added for `yandex_compute_instance_group` resource and data source - -## 0.16.0 (October 01, 2019) -* **New Data Source:** `yandex_mdb_redis_cluster` -* **New Resource:** `yandex_mdb_redis_cluster` - -## 0.15.0 (September 30, 2019) -FEATURES: -* **New Data Source:** `yandex_kubernetes_cluster` -* **New Data Source:** `yandex_kubernetes_node_group` -* **New Resource:** `yandex_kubernetes_cluster` -* **New Resource:** `yandex_kubernetes_node_group` - -## 0.14.0 (September 27, 2019) -* provider: migrate to standalone Terraform SDK module ([#22](https://github.com/terraform-providers/terraform-provider-yandex/issues/22)) -* provider: support graceful shutdown -* iam: use logic lock on cloud while create SA to prevent simultaneous IAM membership changes -* container: resolve data source `yandex_container_registry` by name. - -## 0.13.0 (September 23, 2019) -FEATURES: -* **New Resource:** `yandex_iam_service_account_api_key` -* **New Resource:** `yandex_iam_service_account_key` - -ENHANCEMENTS: -* compute: `yandex_compute_snapshot` resource can now be imported -* iam: `yandex_iam_service_account` resource can now be imported -* iam: `yandex_iam_service_account_static_access_key` resource now supports `pgp_key` field. - -## 0.12.0 (September 20, 2019) -FEATURES: -* **New Data Source:** `yandex_container_registry` -* **New Resource:** `yandex_container_registry` - -## 0.11.2 (September 19, 2019) -ENHANCEMENTS: -* provider: provider uses permanent client-request-id identifier while the terraform is running - -BUG FIXES: -* provider: fix provider name and version detection - -## 0.11.1 (September 13, 2019) -ENHANCEMENTS: -* provider: set provider name and version in user agent header. - -BUG FIXES: -* compute: fix flattening of health checks for `yandex_compute_instance_group` resource - -## 0.11.0 (September 11, 2019) -ENHANCEMENTS: -* compute: add `resources.0.gpus` attribute in `yandex_compute_instance` resource and data source -* compute: add `resources.0.gpus` attribute in `yandex_compute_instance_group` resource and data source - -## 0.10.2 (September 09, 2019) -ENHANCEMENTS: -* compute: `yandex_compute_snapshot` resource can now be imported -* iam: `yandex_iam_service_account` resource can now be imported - -BUG FIXES: -* compute: fix read operation of `yandex_compute_instance` - -## 0.10.1 (August 26, 2019) -BUG FIXES: -* resourcemanager: resources `yandex_*_iam_binding`, `yandex_•_iam_policy` works with full set of bindings. - -## 0.10.0 (August 21, 2019) -BUG FIXES: -* vpc: remove `v6_cidr_blocks` attr in `yandex_vpc_subnet` resource. This property is not available right now. - -ENHANCEMENTS: -* compute: instance_group data source and resource support new fields in `load_balancer` section. -* resourcemanager: support lookup `yandex_resourcemanager_folder` at specific cloud_id. ([#17](https://github.com/terraform-providers/terraform-provider-yandex/issues/17)) - -## 0.9.1 (August 14, 2019) -ENHANCEMENTS: -* compute: use `min_disk_size` of image or `disk_size` of snapshot to set size of boot_disk on instance template for `yandex_compute_instance_group`. - -## 0.9.0 (August 07, 2019) -FEATURES: -* **New Data Source:** `yandex_lb_network_load_balancer` -* **New Data Source:** `yandex_lb_target_group` -* **New Resource:** `yandex_lb_network_load_balancer` -* **New Resource:** `yandex_lb_target_group` - -ENHANCEMENTS: -* compute: use `min_disk_size` of image or `disk_size` of snapshot to set size of boot_disk on instance create. -* compute: update instance resource spec and platform type in one request. - -BUG FIXES: -* compute: change attribute `folder_id` from Required to Optional for `yandex_compute_instance_group` resource [[#14](https://github.com/terraform-providers/terraform-provider-yandex/issues/14)]. - -## 0.8.1 (July 04, 2019) -BUG FIXES: -* compute: fix `yandex_compute_instance_group` with `load_balancer_spec` defined [[#13](https://github.com/terraform-providers/terraform-provider-yandex/issues/13)]. - -## 0.8.0 (June 25, 2019) -FEATURES: -* **New Data Source**: `yandex_compute_instance_group` -* **New Resource**: `yandex_compute_instance_group` - -## 0.7.0 (June 06, 2019) -ENHANCEMENTS: -* provider: Support SDK retries. - -## 0.6.0 (May 29, 2019) -NOTES: -* provider: This release includes a Terraform SDK upgrade with compatibility for Terraform v0.12. -* provider: Switch dependency management to Go modules. ([#5](https://github.com/terraform-providers/terraform-provider-yandex/issues/5)) - -## 0.5.2 (April 24, 2019) -ENHANCEMENTS: -* compute: fractional values for memory for `yandex_compute_instance`. -* compute: `yandex_compute_instance` support update platform_id in stopped state. - -## 0.5.1 (April 20, 2019) -BUG FIXES: -* compute: fix migration process for `yandex_compute_instance`. - -## 0.5.0 (April 17, 2019) -ENHANCEMENTS: -* all: save new entity identifiers at start of create operation -* compute: `yandex_compute_instance` support update resources in stopped state. -* compute: change attribute `resources` type from Set to List - -## 0.4.1 (April 11, 2019) -BUG FIXES: -* compute: fix properties of `service_account_id` attribute. - -## 0.4.0 (April 09, 2019) -ENHANCEMENTS: -* compute: `yandex_compute_instance` adds a `service_account_id` attribute. - -## 0.3.0 (April 03, 2019) -FEATURES: -* **New Datasource**: `yandex_vpc_route_table` -* **New Resource**: `yandex_vpc_route_table` - -ENHANCEMENTS: -* vpc: `yandex_vpc_subnet` adds a `route_table_id` field. - -## 0.2.0 (March 26, 2019) -ENHANCEMENTS: -* provider: authentication with service account key file. ([#3](https://github.com/terraform-providers/terraform-provider-yandex/issues/3)) -* vpc: increase subnet create/update/delete timeout. -* vpc: resolve data source `network`, `subnet` by name. -* compute: resolve data source `instance`, `disk`, `image`, `snapshot` objects by names. -* resourcemanager: resolve data source `folder` by name. - -## 0.1.16 (March 14, 2019) -ENHANCEMENTS: -* compute: support preemptible instance type. - -BUG FIXES: -* compute: fix update method on compute resources for description attribute. - -## 0.1.15 (February 22, 2019) - -BACKWARDS INCOMPATIBILITIES: -* compute: `yandex_compute_disk.source_image_id` and `yandex_compute_disk.source_snapshot_id` has been removed. -* iam: `iam_service_account_key` was renamed to `iam_service_account_static_access_key`. - -ENHANCEMENTS: -* provider: more descriptive error messages. -* compute: `yandex_compute_disk` support for increasing size without force recreation of the resource. - -BUG FIXES: -* compute: make consistent disk type attribute name `type_id` -> `type`. -* compute: remove attr `instance_id` from `yandex_compute_instance`. -* compute: make `yandex_compute_instancenet.network_interface.*.nat` ForceNew. - -## 0.1.14 (December 26, 2018) - -FEATURES: -* **New Data Source:** `yandex_compute_disk` -* **New Data Source:** `yandex_compute_image` -* **New Data Source:** `yandex_compute_instance` -* **New Data Source:** `yandex_compute_snapshot` -* **New Data Source:** `yandex_iam_policy` -* **New Data Source:** `yandex_iam_role` -* **New Data Source:** `yandex_iam_service_account` -* **New Data Source:** `yandex_iam_user` -* **New Data Source:** `yandex_resourcemanager_cloud` -* **New Data Source:** `yandex_resourcemanager_folder` -* **New Data Source:** `yandex_vpc_network` -* **New Data Source:** `yandex_vpc_subnet` -* **New Resource:** `yandex_compute_disk` -* **New Resource:** `yandex_compute_image` -* **New Resource:** `yandex_compute_instance` -* **New Resource:** `yandex_compute_snapshot` -* **New Resource:** `yandex_iam_service_account` -* **New Resource:** `yandex_iam_service_account_iam_binding` -* **New Resource:** `yandex_iam_service_account_iam_member` -* **New Resource:** `yandex_iam_service_account_iam_policy` -* **New Resource:** `yandex_iam_service_account_key` -* **New Resource:** `yandex_vpc_network` -* **New Resource:** `yandex_vpc_subnet` -* **New Resource:** `yandex_resourcemanager_cloud_iam_binding` -* **New Resource:** `yandex_resourcemanager_cloud_iam_member` -* **New Resource:** `yandex_resourcemanager_folder_iam_binding` -* **New Resource:** `yandex_resourcemanager_folder_iam_member` -* **New Resource:** `yandex_resourcemanager_folder_iam_policy` - -ENHANCEMENTS: -* compute: support IPv6 addresses -* vpc: support IPv6 addresses +## 0.86.0 (Unreleased) + +## 0.85.0 (January 31, 2023) +FEATURES: +* storage: add `object_lock_configuration` attribute in `bucket` resource +* storage: add `object_lock_legal_hold_status`, `object_lock_mode` and `object_lock_retain_until_date` attributes in `object` resource +* storage: add information about `storage_endpoint` in documents +* storage: add `config_read` property to `anonymous_access_flags` structure. + +BUG FIXES: +* storage: import bucket state now does not requires reapply because it's properly syncs acl and grants. +* mongodb: add `restore` entity in `yandex_mdb_mongodb_cluster` resource +* k8s: add `master_logging` attribute to `cluster` resource and data source +* **New Data Source:** `yandex_container_registry_ip_permission` +* **New Resource:** `yandex_container_registry_ip_permission` +* clickhouse: add possibility to update `version` and `resources` in single apply +* alb: add `regex` support in `StringMatch` +* clickhouse: added the feature to set maintenance_window when creating a cluster. +* clickhouse: support cloud_storage with advanced settings +* postgresql: add possibility to rename `yandex_mdb_postgresql_database` +* api_gateway: add `custom_domains` attribute to `api_gateway` resource and data source +* serverless: add `connectivity` attribute to `api_gateway` resource and data source +* serverless: add `connectivity` attribute to `yandex_functions` resource and data source +* serverless: add `connectivity` attribute to `yandex_serverless_container` resource and data source +* clickhouse: add feature to set weight for shards. + +## 0.84.0 (December 16, 2022) +BUG FIXES: +* mysql: fix bug leading to cluster recreation when changing folder_id +* mdb: fix bug when description cannot be set to null in `yandex_mdb_postgresql_cluster` and `yandex_mdb_mongodb_cluster` +* clickhouse: fix bug leading to failed updating cluster when set cloud_storage(enabled: false) +* compute: fix validation of local_disk in yandex_compute_instance resource + +FEATURES: +* compute: support `metadata_options` in `yandex_compute_instance` +* **New Data Source:** `yandex_compute_filesystem` +* **New Resource:** `yandex_compute_filesystem` +* compute: support `yandex_compute_filesystem` in `yandex_compute_instance` + +## 0.83.0 (December 1, 2022) +BUG FIXES: +* compute: fix bug leading to failed instance update when changing subnet_id of a network_interface +* clickhouse: fix bug leading to failed creating cluster when set maintenance_window + +FEATURES +* alb: add `log_options` attribute in `yandex_alb_load_balancer` resource and data source. + +FEATURES: +* **New Data Source:** `yandex_cm_certificate` +* **New Data Source:** `yandex_cm_certificate_content` +* **New Resource:** `yandex_cm_certificate` + +## 0.82.0 (November 11, 2022) +BUG FIXES: +* lockbox: display error cause, when creating resource `yandex_lockbox_secret_version` fails +* greenplum: add default values for pooler_config. Fix bug with greenplum cluster creation. +* postgresql: fix bug leading to cluster recreation when dropping users or databases in `yandex_mdb_postgresql_cluster` resource +* postgresql: fix bug leading to panic when creating user with grants = [""] +* serverless: check retry attributes when creating message queue trigger + +FEATURES: +* postgresql: add postgresql 15 support +* datatransfer: add `on_create_activate_mode` for incremental transfers +* datatransfer: ignore deactivation error on destroy +* **New Data Source:** `yandex_compute_snapshot_schedule` +* **New Resource:** `yandex_compute_snapshot_schedule` + +ENHANCEMENTS: +* add `sasl_enabled_mechanisms` attribute in `yandex_mdb_kafka_cluster` resource and data source + +## 0.81.0 (October 20, 2022) +BUG FIXES: +* compute: fix size validation in `resource_yandex_compute_disk` +* vpc: fix region_id validation in `resource_yandex_lb_network_load_balanacer` and `resource_yandex_lb_target_group` +* postgresql: fix `host_master_name` wrong behaviour in `yandex_mdb_postgresql_cluster` again +* alb: fix `value` wrong behaviour in `yandex_alb_http_router` and `yandex_alb_virtual_host` +* alb: fix default `path` value in `yandex_alb_backend_group` +* greenplum: add expanding greenplum cluster in a case of changing segments host numbers, details in `resource_yandex_mdb_greenplum_cluster` + +ENHANCEMENTS: +* provider: Upgrade go-sdk and go-genproto to the latest version. This is needed for ALB RBAC feature. +* add `message_max_bytes`, `replica_fetch_max_bytes`, `ssl_cipher_suites`, `offsets_retention_minutes` attributes in `yandex_mdb_kafka_cluster` resource and data source +* clickhouse: use version 22.8 for tests + +FEATURES: +* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_mysql_cluster` resource and data source +* alb: support `route_options` attribute in `yandex_alb_http_router` and `yandex_alb_virtual_host` resource and data source +* **New Data Source:** `yandex_lockbox_secret` +* **New Data Source:** `yandex_lockbox_secret_version` +* **New Resource:** `yandex_lockbox_secret` +* **New Resource:** `yandex_lockbox_secret_version` +* serverless: add `secrets` attribute in `yandex_function` resource and data source +* serverless: add `secrets` attribute in `yandex_serverless_container` resource and data source +* kafka: support S3-Sink Kafka connector in `yandex_mdb_kafka_connector` resource + +## 0.80.0 (September 22, 2022) +BUG FIXES: +* postgresql: fix `host_master_name` wrong behaviour in in `yandex_mdb_postgresql_cluster` +* postgresql: fix `yandex_mdb_postgresql_database` resource wrong behaviour in 0.78.1 + +FEATURES: +* **New Resource:** `yandex_organizationmanager_group_iam_member` + +## 0.79.0 (September 20, 2022) +FEATURES: +* redis: support for Redis 7.0 +* **New Data Source:** `yandex_organizationmanager_group` +* **New Resource:** `yandex_organizationmanager_group` +* **New Resource:** `yandex_organizationmanager_group_membership` +* ydb: support `deletion_protection` attribute to `yandex_ydb_database_serverless` and `yandex_ydb_database_dedicated` resources. +* **New Data Source:** `yandex_container_repository_lifecycle_policy` +* **New Resource:** `yandex_container_repository_lifecycle_policy` + +BUG FIXES: +* `yandex_container_repository`: fixed bug with orphant `yandex_container_repository` after taint of `yandex_container_registry` + + +## 0.78.2 (September 9, 2022) +BUG FIXES: +* kafka: sort hosts in listKafkaHosts method to avoid non - deterministic list of hosts. + +FEATURES: +* kafka: support Kafka 3.0,3.1,3.2 in `yandex_mdb_kafka_cluster` +* postgresql: added 13-1c, 14-1c Postgresql versions + +## 0.78.1 (September 6, 2022) +BUG FIXES: +* dns: fixed `proto: not found` error when creating, updating or deleting `yandex_dns_recordset` + +## 0.78.0 (September 1, 2022) +BUG FIXES: +* cdn: fixed wrong documentation example +* postgresql: fix `login` and `conn_limit` wrong behaviour in `yandex_mdb_postgresql_user` +* data source `yandex_organizationmanager_saml_federation_user_account` now works for federations with more than a hundred of users and with viewer role + +ENHANCEMENTS: +* vpc: allow usage of `yandex_vpc_gateway` in `yandex_vpc_route_table.static_route` as `gateway_id` next hop + +FEATURES: +* greenplum: add `maintenance_window` attribute to resource and data source +* greenplum: support for changing the user's password +* greenplum: support for changing segment and master resources +* mdb: add `template_db` attribute to `yandex_mdb_postgresql_cluster` resource and data source +* clickhouse: add `assign_public_ip` attribute to `host` declaration in resource and data source +* clickhouse: support hosts update +* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_mysql_cluster` resource and data source +* **New Data Source:** `yandex_iot_core_broker` +* **New Data Source:** `yandex_vpc_gateway` +* **New Resource:** `yandex_iot_core_broker` +* **New Resource:** `yandex_vpc_gateway` +* `data_transfer` flag in `ClusterConfig.access` for ClickHouse, Greenplum, MySQL, PostgreSQL, Kafka, MongoDB +* `yandex_query` flag in `ClusterConfig.access` for ClickHouse + +WARNING: +* mdb: remove 5 and 6 from supported versions for redis + +## 0.77.0 (July 27, 2022) +BUG FIXES: +* iam: fix access bindings deletion +* ydb: fixed panic if database was removed outside of terraform +* storage: fix issue when error, returned from reading extend bucket settings treated as important. + It will be printed as log output now instead of interrupting plan execution. +* greenplum: fix bug with not setting `security groups_ids` in `resource_yandex_mdb_greenplum_cluster` +* greenplum: fix bug with not setting `access` in `resource_yandex_mdb_greenplum_cluster` + +ENHANCEMENTS: +* mdb: add `sqlcollation` attribute to `yandex_mdb_sqlserver_cluster` resource and data source +* serverless: increase operation timeouts in `yandex_function` resource +* cdn: added the ability to set custom `folder_id` attribute for resources `yandex_cdn_origin_group` and `yandex_cdn_resource` + +FEATURES: +* k8s: add `instance_template.name` attribute to `node group` resource and data source +* k8s: add `instance_template.ipv4_dns_records`, `instance_template.ipv6_dns_records` attributes to `node group` resource and data source +* k8s: add `instance_template.labels` attribute to `node group` resource and data source +* greenplum: add fields `greenplum_config` and `pooler_config` in `resource_yandex_mdb_greenplum_cluster` +* **New Resource:** `yandex_serverless_container_iam_binding` +* **New Resource:** `yandex_ydb_database_iam_binding` + +## 0.76.0 (July 01, 2022) +BUG FIXES: +* alb: `send` and `receive` attributes can be empty now in `yandex_alb_backend_group` resource and data source +* alb: fixed `yandex_alb_load_balancer` resource and data source documentation +* alb: support `mode` attribute in `load_balancing_config` entity in `yandex_alb_backend_group` resource and data source +* mysql: `mysql_config.sql_mode` is setting now when creating a cluster +* mdb: fix changing `maintenance_window` only in `yandex_mdb_redis_cluster` +* clickhouse: fix issue with `shard_group` update +* serverless: fix issue with `retention_period` update in `yandex_logging_group` resource + +ENHANCEMENTS: +* alb: refactoring `yandex_alb_backend_group` resource and data source +* alb: extra validation added to `yandex_alb_load_balancer` and `yandex_alb_virtual_host` resources and data sources +* mdb: add `client_output_buffer_limit_normal` and `client_output_buffer_limit_pubsub` attributes to `yandex_mdb_redis_cluster` resource and data source +* mdb: add `replica_priority` attribute to `yandex_mdb_redis_cluster` resource and data source +* mdb: add `assign_public_ip` attribute to `yandex_mdb_redis_cluster` resource and data source +* ymq: add `region_id` attribute to resource + +FEATURES: +* compute: support for creating `yandex_compute_instance` with local disks + +## 0.75.0 (May 31, 2022) +ENHANCEMENTS: +* compute: support instance's scheduling policy update in-place + +FEATURES: +* datatransfer: add ClickHouse endpoint into `yandex_datatransfer_endpoint` resource +* alb: support `session_affinity` attribute in `yandex_alb_backend_group` resource and data source. +* **New Resource:** `yandex_mdb_postgresql_database` +* **New Resource:** `yandex_mdb_postgresql_user` +* **New Resource:** `yandex_mdb_mysql_database` +* **New Resource:** `yandex_mdb_mysql_user` +* **New Data Source:** `yandex_mdb_postgresql_database` +* **New Data Source:** `yandex_mdb_postgresql_user` +* **New Data Source:** `yandex_mdb_mysql_database` +* **New Data Source:** `yandex_mdb_mysql_user` +* storage: support `folder_id`, `max_size`, `anonymous_access_flags`, `https` and `default_storage_class` attributes in bucket. +See `storage_bucket` documentation for important information. + +BUG FIXES: +* postgresql: fix bug with applying cluster's settings in PostgreSQL 14 +* iam: return error when access bindings not applied +* storage: fix bug of wrong handling permission error denied on reading policy +* mdb: fix setting timeout and slowlog_max_len to 0 value in `yandex_mdb_redis_cluster` + +WARNING: +* postgresql: `database` and `user` sections for `yandex_mdb_postgresql_cluster` are now deprecated +* mysql: `database` and `user` sections for `yandex_mdb_mysql_cluster` are now deprecated + +## 0.74.0 (April 19, 2022) +ENHANCEMENTS: +* iam: support for changing description of `yandex_iam_service_account_key` without recreation +* mdb: add `performance_diagnostics` section in `yandex_mdb_mysql_cluster` resource and data source +* mdb: change attribute `yandex_mdb_mysql_cluster.user.global_permissions` type from List to Set +* alb: add `enable_proxy_protocol` attribute to `stream_backend` entity in `yandex_alb_backend_group` resource and data source + +BUG FIXES: +* postgresql: fix unpredictable behaviour when changing `assign_public_ip` without name +* storage: fix not saving bucket's `policy` to tfstate +* datatransfer: allow updating `tls_mode` attribute of `yandex_datatransfer_endpoint` resource from `enabled` to `disabled` value + +FEATURES: +* compute: changing `folder_id` attribute leads to move operation for `yandex_compute_instance` and `yandex_compute_disk` resources if `allow_recreate` flag is set to false (or not set). Otherwise, resource will be recreated. +* mdb: new mysql configuration options added +* mdb: support audit log (filter, audit_authorization_success) and security (enable, kmip) settings in `yandex_mdb_mongodb_cluster` +* add `host_group_ids` attribute in `yandex_mdb_mysql_cluster` resource and data source +* add `host_group_ids` attribute in `yandex_mdb_postgresql_cluster` resource and data source +* datatransfer: add MongoDB endpoint into `yandex_datatransfer_endpoint` resource + +## 0.73.0 (March 28, 2022) +ENHANCEMENTS: +* compute: add `host_affinity_rules` attribute to `placement_policy` in `yandex_compute_instance` resource and data source +* alb: support `storage_bucket` as a target in `yandex_alb_backend_group` resource and data source + +BUG FIXES: +* compute: avoid unnecessary start/stop operations for instance while updating secondary disk configuration +* compute: detach secondary disk from instance before deleting +* dataproc: add `assign_public_ip` attribute to `subcluster_spec` entity. If set to `true` then public ip addresses will be assigned to hosts of the subcluster +* docs: fixed exported attributes for `yandex_vpc_network` datasource +* docs: fixed `yandex_vpc_address` resource documentation +* dns: fixed `yandex_dns_recordset` resource record data length restriction + +FEATURES: +* mdb: support `persistence_mode` in `yandex_mdb_redis_cluster` +* kafka: support connector resource and data source in Kafka clusters + +## 0.72.0 (March 02, 2022) +ENHANCEMENTS: +* mdb: add `serverless` attribute to `access` entity in `yandex_mdb_postgresql_cluster` resource and data source +* add `ssl_certificate` attribute in `yandex_cdn_resource` resource and data source +* alb: change `http_backend` and `grpc_backend` and `stream_backend` and `healthcheck` attribute types from Set to List in `yandex_alb_backend_group` resource +* mdb: add `priority` and `backup_priority` attributes to `host` entity in `yandex_mdb_mysql_cluster` resource and data source +* mdb: add `embedded_keeper` attribute in `yandex_mdb_clickhouse_cluster` resource and data_source + +FEATURES: +* mdb: support MongoDB enterprise 4.4 and 5.0 in `yandex_mdb_mongodb_cluster` +* kafka: support change `assign_public_ip` flag in Kafka clusters +* resource-manager: add `yandex_resourcemanager_cloud` resource. + +BUG FIXES: +* alb: fix behavior of attribute `validation_context` of `tls` entity in `yandex_alb_backend_group` resource +* alb: fix behavior of `send` and `receive` attributes of `stream_healthcheck` entity in `yandex_alb_backend_group` resource +* docs: Fixed few minor inaccuracies of `yandex_alb_load_balancer` resource + +## 0.71.0 (February 08, 2021) +ENHANCEMENTS: +* allow `initial` of `0` for `yandex_kubernetes_node_group` `auto_scale` policy. +* dataproc: now cluster version specified in create cluster request is treated as a semantic version prefix. So specified version `2.0` may lead to creation of cluster version `2.0.30` and this will not be considered a change in terraform state. +* add `host_group_ids` attribute in `yandex_mdb_sqlserver_cluster` resource and data source + +BUG FIXES: +* alb: fix behavior of attribute `weight` in `http_backend` and `grpc_backend` and `stream_backend` in `yandex_alb_backend_group` resource +* datatransfer: make `yandex_datatransfer_transfer` importable in accordance with the documentation +* mdb: fix the optional parameter `preallocate` for kafka topic config when it is absent + +## 0.70.0 (January 17, 2022) +FEATURES: +* **New Resource:** `yandex_datatransfer_endpoint` +* **New Resource:** `yandex_datatransfer_transfer` +* managed-kubernetes: add `container_runtime` attribute to `yandex_kubernetes_node_group` resource and data source +* managed-elasticsearch: add `maintenance_window` section in `yandex_mdb_elasticsearch_cluster` resource and data source +* dns: support for resolving by name in `yandex_dns_zone` data source + +BUG FIXES: +* mdb: fix error when simultaneously deleting `yandex_mdb_kafka_topic` resource and modifying `yandex_mdb_kafka_cluster` resource + +ENHANCEMENTS: +* mdb: add `maintenance_window` section in `yandex_mdb_kafka_cluster` resource and data source + +## 0.69.0 (December 27, 2021) +FEATURES: +* **New Data Source:** `yandex_cdn_origin_group` +* **New Data Source:** `yandex_cdn_resource` +* **New Data Source:** `yandex_serverless_container` +* **New Resource:** `yandex_cdn_origin_group` +* **New Resource:** `yandex_cdn_resource` +* **New Resource:** `yandex_serverless_container` +* alb: add `stream_backend` attribute to `yandex_alb_backend_group` resource and data source +* alb: add `stream` attribute to `listener` entity in `yandex_alb_load_balancer` resource and data source + +BUG FIXES: +* docs: Fixed few minor inaccuracies of `yandex_alb_virtual_host` resource + +FEATURES: +* compute: added `block_size` in `yandex_compute_disk` and `yandex_compute_instance` resources. + +## 0.68.0 (December 10, 2021) +FEATURES: +* mdb: added the ability to upgrade Kafka version using the `version` attribute of `yandex_mdb_kafka_cluster` resource. + +BUG FIXES: +* alb: fix behavior of attribute `address_type` in `yandex_alb_target_group` resource +* alb: fix behavior of attribute `route.http_route.http_route_action.host_rewrite` in `yandex_alb_virtual_host` resource +* mdb: fix crash when empty config is specified for Kafka topic within `yandex_mdb_kafka_topic` and `yandex_mdb_kafka_cluster` resources + +ENHANCEMENTS: +* alb: add `private_ipv4_address` attribute to `target` entity in `yandex_alb_target_group` resource and data source +* compute: add `pooled` attribute in `yandex_compute_image` resource and data source + +## 0.67.0 (November 22, 2021) +ENHANCEMENTS: +* provider: Upgrade to Terraform Plugin SDK V2. There should be no breaking changes from a practitioner's perspective. + +BUG FIXES: +* alb: fix behavior of attribute `modify_request_headers.append` in `yandex_alb_virtual_host` resource +* alb: fix error when `route.http_route.http_match.http_method` attribute of `yandex_alb_virtual_host` resource is used. +* alb: fix behavior of attribute `route.http_route.http_match.path` in `yandex_alb_virtual_host` resource. +* mdb: fix `name` update in `yandex_mdb_mongodb_cluster` + +FEATURES: +* add new resource and data-source `yandex_organizationmanager_saml_federation` +* add new data-source `yandex_organizationmanager_saml_federation_user_account` + +## 0.66.0 (November 3, 2021) +FEATURES: +* mdb: Kafka topic management via dedicated resource `yandex_mdb_kafka_topic` is implemented +* mdb: support update `name`, `description`, `labels`, `config.access.data_lens`, `config.access.web_sql`, `deletion_protection` in `yandex_mdb_greenplum_cluster` resource +* mdb: add `access` and `backup_window_start` entities in `yandex_mdb_greenplum_cluster` resource and data source +* mdb: support MongoDB 5.0 in `yandex_mdb_mongodb_cluster` +* mdb: add `backup_retain_period_days` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data source + + +ENHANCEMENTS: +* add docs on k8s node group placement groups. +* ydb: increase the default timeout to create serverless database +* add `name`, `replication_source`, `replication_source_name` attributes to `host` entity in `yandex_mdb_mysql_cluster` resource and data source +* mysql, postgresql: support updating `assign_public_ip` without host recreation + +WARNING: +* `allow_regeneration_host` for mysql host is now DEPRECATED. + +BUG FIXES: +* mdb: fix behavior of attribute `user.settings.log_min_duration_statement` in `yandex_mdb_postgresql_cluster` resource + +## 0.65.0 (October 14, 2021) +FEATURES: +* mdb: support Schema Registry in `yandex_mdb_kafka_cluster` + +FEATURES: +* **New Resource:** `yandex_kms_symmetric_key_iam_binding` + +ENHANCEMENTS: +* elasticsearch: update go-sdk version, add tests +* serverless: supported logging trigger + +BUG FIXES: +* mdb: invalid plan was generated when user didn't specify zookeeper resources for multibroker Kafka cluster + +## 0.64.1 (September 24, 2021) +BUG FIXES: +* mdb: fix password change in Redis + +## 0.64.0 (September 22, 2021) +FEATURES: +* **New Resource:** `yandex_logging_group` +* **New Data Source:** `yandex_logging_group` + +BUG FIXES: +* fix sni handler expanding +* fix `internal_ipv4_address` missing `subnet_id` field +* fix non empty plan when `yandex_vpc_security_group_rule` protocol written in non uppercase + +## 0.63.1 (September 10, 2021) +BUG FIXES: +* fix alb backend group with empty tls. + +## 0.63.0 (September 07, 2021) +FEATURES: +* **New Data Source:** `yandex_mdb_greenplum_cluster` +* **New Resource:** `yandex_mdb_greenplum_cluster` +* docs: add info about internal address for `lb_network_load_balancer` +* docs: add info about loadbalancer_healthchecks predefined target for `vpc_security_group` + +BUG FIXES: +* mdb: fix terraform crash when using big integers as Kafka broker and topic config values + +## 0.62.0 (August 30, 2021) +FEATURES: +* storage: `yandex_storage_bucket` resource supports website routing rules configuraion +* mdb: support Redis 6.2 in `yandex_mdb_redis_cluster` +* mdb: support Kafka 2.8 in `yandex_mdb_kafka_cluster` +* add yandex_organizationmanager_organization_iam_member and yandex_organizationmanager_organization_iam_binding resources. + +BUG FIXES: +* vpc: fix dirty plan of `labels` in vpc resources +* vpc: fix `yandex_vpc_security_group_rule` doc +* vpc: fix ignoring description when changing at inline rules of `yandex_vpc_security_group` +* mdb: ensure that `network_id` is not empty if provided +* mdb: fix host creating with empty `subnet_id` in `yandex_mdb_postgresql_cluster` +* mdb: suppress master nodes config changes if no master node used in `yandex_mdb_elasticsearch_cluster` +* apigateway: fixed spec updating in `yandex_api_gateway` + +ENHANCEMENTS: +* add `deletion_protection` attribute to `yandex_mdb_clickhouse_cluster`, `yandex_mdb_elasticsearch_cluster`, `yandex_mdb_kafka_cluster`, `yandex_mdb_mongodb_cluster`, `yandex_mdb_mysql_cluster`, `yandex_mdb_postgresql_cluster`, `yandex_mdb_redis_cluster`, `yandex_mdb_sqlserver_cluster` resources and data sources +* add `deletion_protection` attribute to `yandex_dataproc_cluster` data source +* support updating of k8s node group `node_labels` without recreation. +* docs: added a description of the port to the documentation for `yandex_mdb_postgresql_cluster` +* support version updaing for `yandex_mdb_elasticsearch_cluster` + +## 0.61.0 (July 9, 2021) +FEATURES: +* **New Data Source:** `yandex_alb_load_balancer` +* **New Data Source:** `yandex_function_scaling_policy` +* **New Data Source:** `yandex_vpc_security_group_rule` for getting info about security group rules +* **New Resource:** `yandex_alb_load_balancer` +* **New Resource:** `yandex_resourcemanager_folder` +* **New Resource:** `yandex_function_scaling_policy` +* **New Resource** `yandex_vpc_security_group_rule` for security group rule managment + +ENHANCEMENTS: +* add `application_load_balancer` entity in `yandex_compute_instance_group` resource and data source +* add `max_checking_health_duration` and `max_opening_traffic_duration` in `yandex_compute_instance_group` +* add `service` attribute to `auto_scale.custom_rule` in `yandex_compute_instance_group` resource and data source +* add `folder_id` attribute to `auto_scale.custom_rule` in `yandex_compute_instance_group` resource and data source +* add `nat_ip_address` attribute to `instance_template.network_interface` in `yandex_compute_instance_group` resource and data source +* add `disk_id` attribute to `instance_template.boot_disk`,`instance_template.secondary_disk` in `yandex_compute_instance_group` +* support of changing `cloud_storage` attribute in `yandex_mdb_clickhouse_cluster` resource +* apigateway: change `spec` attribute from filename to string +* docs: add info about timeouts for `yandex_compute_snapshot` +* docs: add `yandex_api_gateway` +* add `content_type` attribute in `yandex_storage_object` resource + +BUG FIXES: +* compute: Remove restrictions for `type` attribute at `instance_template.boot_disk.initialize_params`,`instance_template.secondary_disk.initialize_params` in `yandex_compute_instance_group` +* functions: `execution_timeout` attribute change now provides `yandex_function` resource update + +## 0.60.0 (June 17, 2021) +FEATURES: +* **New Data Source:** `yandex_alb_virtual_host` +* **New Resource:** `yandex_alb_virtual_host` +* **New Data Source:** `yandex_mdb_elasticsearch_cluster` +* **New Resource:** `yandex_mdb_elasticsearch_cluster` + +ENHANCEMENTS: +* mdb: add `maintenance_window` section in `yandex_mdb_mongodb_cluster`, `yandex_mdb_postgresql_cluster` resource and data source +* dataproc: added support for properties modification +* k8s: support `network_acceleration_type` in k8s node group resource and data source. +* k8s: support Cilium network implementation in k8s cluster and data source. + +BUG FIXES: +* mdb: fixed some errors in implementation of Kafka topics modification +* dns: fixed field name error +* dns: fixed diff with compact ipv6 data records in `yndex_dns_recordset` + +## 0.59.0 (June 6, 2021) +FEATURES: +* **New Data Source:** `yandex_alb_http_router` +* **New Resource:** `yandex_alb_http_router` +* **New Data Source:** `yandex_alb_backend_group` +* **New Resource:** `yandex_alb_backend_group` +* add `autoscaling_config` to Data Proc subcluster specification +* add `ip_address` and `ipv6_address` attributes to `network_interface` entity in `yandex_compute_instance_group` +* **New Resource** `yandex_vpc_default_security_group` for network's default security group managment + +ENHANCEMENTS: +* managed-redis: added `notify_keyspace_events`, `slowlog_log_slower_than`, `slowlog_max_len` and `databases` fields +* mdb: add `maintenance_window` section in `yandex_mdb_clickhouse_cluster`, `yandex_mdb_mysql_cluster` and `yandex_mdb_redis_cluster` resource and data source +* add `num_partitions` and `default_replication_factor` attributes in `yandex_mdb_kafka_cluster` resource and data source +* change of `dns_record`, `ipv6_dns_record` and `nat_dns_record` in `network_interface` entity of `yandex_compute_instance` + without instance drop + +BUG FIXES: +* mdb: throw error when trying to modify `owner` in `database` block in `yandex_mdb_postgresql_cluster` + +## 0.58.0 (May 14, 2021) +FEATURES: +* **New Data Source:** `yandex_alb_target_group` +* **New Resource:** `yandex_alb_target_group` +* add `ipv6` and `ipv4` attributes to yandex_kubernetes_node_group network interfaces both in resource and the data source. + +## 0.57.0 (April 29, 2021) +FEATURES: +* support k8s node group placement groups both in resource and data source. +* add cluster_ipv6_range and service_ipv6_range attributes both to resource yandex_kubernetes_cluster and data source yandex_kubernetes_cluster +* add `host_group_ids` attribute in `yandex_mdb_kafka_cluster` resource and data source +* add `host_group_ids` attribute in `yandex_dataproc_cluster` resource and data source + +ENHANCEMENTS: +* add `dns_record`, `ipv6_dns_record` and `nat_dns_record` to `network_interface` entity in `yandex_compute_instance` + +## 0.56.0 (April 15, 2021) +ENHANCEMENTS: +* dataproc: supported `security_group_ids` +* add `dns_record`, `ipv6_dns_record` and `nat_dns_record` to `network_interface` entity in `yandex_compute_instance_group` +* ydb: support for Yandex Database clusters +* compute: increase disk size limit from 4096Gb to 8192Gb +* vpc: add `name` field description at vpc_security_group datasource and example of it usage + +BUG FIXES: +* compute: placement_policy update in `yandex_compute_instance_group` + +## 0.55.0 (April 1, 2021) +FEATURES: +* storage: `yandex_storage_bucket` resource supports bucket policy configuration + +ENHANCEMENTS: +* add extended API logging. Use TF_ENABLE_API_LOGGING=1 with TF_LOG=debug to see extended output. +* support IAM token in tests +* managed-redis: added 'tls_enabled' field +* managed-kafka: added 'unmanaged_topics' cluster flag and some cluster config flags +* mdb: add `host` attribute in `yandex_mdb_kafka_cluster` resource and data source + +BUG FIXES: +* serverless: fix API Gateway specification update + +## 0.54.0 (March 23, 2021) +ENHANCEMENTS: +* provider: the default development, testing and building of the provider is now done with Go 1.16. +* serverless: supported API Gateway + +BUG FIXES: +* mdb: fix user settings diff for ClickHouse cluster + +## 0.53.0 (March 19, 2021) +ENHANCEMENTS: +* mdb: add example and update documentation for `yandex_mdb_postgresql_cluster` resource +* serverless: supported log-group trigger + +BUG FIXES: +* dns: fix recordset update in `yandex_dns_recordset` +* storage: Fix timeout while applying CORS settings with empty fields + +## 0.52.0 (March 10, 2021) +FEATURES: +* **New Resource:** `yandex_mdb_sqlserver_cluster` +* managed-kubernetes: support `security_group_ids` for `yandex_kubernetes_node_group` resource and data source +* **New Resource:** `yandex_dns_zone` +* **New Resource:** `yandex_dns_recordset` +* **New Data Source:** `yandex_dns_zone` +* serverless: support import for all resources +* **New Resource:** `yandex_container_repository` +* **New Resource:** `yandex_container_repository_iam_binding` +* **New Data Source:** `yandex_container_repository` + +ENHANCEMENTS: +* mdb: add `service_account_id` section in `yandex_mdb_clickhouse_cluster` resource and data source +* mdb: add `cloud_storage` section in `yandex_mdb_clickhouse_cluster` resource and data source +* managed-kubernetes: added `network_interface` section for `yandex_kubernetes_node_group` +* managed-redis: added 'disk_type_id' field + +WARNING: +* managed-kubernetes: `nat` entitiy and `subnet_id` entity in `allocation_policy` section for `yandex_kubernetes_node_group` is now deprecated +* mdb: when changing the `assign_public_ip` attribute to `host` entity in `yandex_mdb_mysql_cluster`, the old host is deleted and a new host is created +* mdb: add `allow_regeneration_host` attribute in `yandex_mdb_mysql_cluster` resource + +BUG FIXES: +* mdb: fix host delete in `yandex_mdb_mysql_cluster` + +## 0.51.1 (February 20, 2021) +ENHANCEMENTS: +* compute: add documentation and example for non-replicated disk + +## 0.51.0 (February 19, 2021) +FEATURES: +* compute: support yandex_disk_placement_group resource and data source. +* compute: integrate yandex_disk_placement_group with compute disk resource and data source. +* mdb: added the ability to upgrade the Mysql version using the `version` attribute in `yandex_mdb_mysql_cluster` + +ENHANCEMENTS: +* mdb: add `restore` entity in `yandex_mdb_mysql_cluster` resource +* mdb: add `connection_limits`, `global_permissions` and `authentication_plugin` attributes to `user` entity in `yandex_mdb_mysql_cluster` resource and data source +* mdb: add `restore` entity in `yandex_mdb_postgresql_cluster` resource +* mdb: add `settings` and `quota` sections to `user` entity in `yandex_mdb_clickhouse_cluster` resource and data source. +* iam: corrected documentation for `yandex_resourcemanager_cloud_iam_binding` resource. +* iam: corrected documentation for `yandex_resourcemanager_folder_iam_binding` resource. + +BUG FIXES: +* mdb: fix updating user permissions for Kafka cluster + +WARNING: +* mdb: replace sets with lists for users in `yandex_mdb_mysql_cluster`. There can appear changes in diff for users, which will not change anything and will disappear after apply + +## 0.50.0 (February 5, 2021) +FEATURES: +* **New Resource:** `yandex_container_registry_iam_binding` +* mdb: version 13 is available in `yandex_mdb_postgresql_cluster` +* storage: `yandex_storage_bucket` resource supports versioning configuration +* storage: `yandex_storage_bucket` resource supports logging configuration +* vpc: add example for ddos protected address documentation +* compute: support yandex_placement_group resource and data source. +* compute: integrate yandex_placement_group with compute instance and instance group resources and data source. + +ENHANCEMENTS: +* storage: add bucket configuration example +* mdb: support `security_group_ids` for managed service for kafka +* mdb: add `web_sql` and `data_lens` attribute to `access` entity in `yandex_mdb_mysql_cluster` resource and data source +* mdb: add `mysql_config` attribute in `yandex_mdb_mysql_cluster` resource and data source +* mdb: add `format_schema` section in `yandex_mdb_clickhouse_cluster` resource and data source +* mdb: add `ml_model` section in `yandex_mdb_clickhouse_cluster` resource and data source +* mdb: add `replication_source_name`, `priority` attributes to `host`entity and `host_master_name` attribute in `yandex_mdb_postgresql_cluster` resource and data source +* mdb: add `sql_user_management` and `sql_database_management` attributes in `yandex_mdb_clickhouse_cluster` resource and data_source +* mdb: add `admin_password` attribute in `yandex_mdb_clickhouse_cluster` resource +* kms: add sensitive flag for `plaintext` attribute in `yandex_kms_secret_ciphertext` resource +* managed-kubernetes: support `security_group_ids` for `yandex_kubernetes_cluster` resource and data source + +## 0.49.0 (January 15, 2021) +FEATURES: +* storage: `yandex_storage_bucket` resource supports lifecycle configuration + +ENHANCEMENTS: +* mdb: changing `folder_id` attribute in `yandex_mdb_postgresql_cluster` moves PostgreSQL cluster to new folder +* mdb: add `web_sql` attribute to `config.access` entity in `yandex_mdb_postgresql_cluster` resource and data source +* mdb: add `performance_diagnostics` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data source +* mdb: add `settings` attribute to `user` entity in `yandex_mdb_postgresql_cluster` resource and data source +* mdb: add `postgresql_config` attribute to `config` entity in `yandex_mdb_postgresql_cluster` resource and data +* mdb: support `security_group_ids` in all database cluster resources and data sources +* compute: `strategy` attribute to `deploy_policy` entity in `yandex_compute_instance_group` resource and data source +* vpc: extend validation for listener spec in `yandex_lb_network_load_balancer` resource + +## 0.48.0 (December 22, 2020) +BUG FIXES: +* mdb: fix setting of folder_id field for MongoDB cluster +* dataproc: add documentation for the `ui_proxy` attribute +* vpc: fix panic on reading `yandex_vpc_address` resource + +ENHANCEMENTS: +* mdb: add `conn_limit` attribute to `user` entity in `yandex_mdb_postgresql_cluster` resource and data source +* mdb: add `config` section in `yandex_mdb_clickhouse_cluster` resource and data source + +## 0.47.0 (November 10, 2020) +BUG FIXES: +* kms: fix import operation +* serverless: folder_id can be using from yandex_function, yandex_function_trigger, yandex_iot_core_registry +* serverless: crash fix for dlq option in yandex_function_trigger + +ENHANCEMENTS: +* vpc: default_security_group_id field was added to network resource and data source +* provider: support authentication via IAM token + +FEATURES: +* mdb: support ClickHouse shard groups in `yandex_mdb_clickhouse_cluster` + +## 0.46.0 (October 19, 2020) +BUG FIXES: +* vpc: Security group rule port bugfix: can create rules without specifying a port +* vpc: Fix internal_address_spec block in network load balancer resource doc +* vpc: Security group ANY port bug fix +* dataproc: support for UI Proxy + +ENHANCEMENTS: +* serverless: improved zip archive content size limit excession error message + +## 0.45.1 (October 06, 2020) + +BUG FIXES: +* fix release issue + +## 0.45.0 (October 05, 2020) +FEATURES: +* mdb: support MongoDB 4.4 in `yandex_mdb_mongodb_cluster` +* vpc: address resource & data source + +ENHANCEMENTS: +* lb: improve NLB sweeper and tests + +BUG FIXES: +* vpc: `static_route` in `yandex_vpc_route_table` is optional now + +## 0.44.1 (September 24, 2020) + +BUG FIXES: +* vpc: fix "security_group" data source + +## 0.44.0 (September 22, 2020) + +FEATURES: +* vpc: security group rule targets `security_group_id` and `predefined_target` are supported +* storage: `yandex_storage_bucket` resource can manage SSE + +ENHANCEMENTS: +* some changes in security group resource + +BUG FIXES: +* lb: fix modifying listener settings + +## 0.43.0 (August 20, 2020) + +FEATURES: +* iam: support for resolving by name in `yandex_iam_service_account` data source + +BUG FIXES: +* compute: fix `yandex_compute_instance` update trying to re-configure dymanic NAT +* mdb: replace sets with lists for users and databases in `yandex_mdb_postgresql_cluster`. +WARNING: there can appear changes in diff for users and databases, which will not change anything and will disappear after apply + +## 0.42.1 (August 04, 2020) + +BUG FIXES: +* compute: fix panic on parsing `instance_template.network_interface.security_group_ids` attribute in `yandex_compute_instance_group` resource + +## 0.42.0 (July 27, 2020) +FEATURES: +* mdb: support Redis 6.0 in `yandex_mdb_redis_cluster` + +FEATURES: +* **New Data Source:** `yandex_client_config` + +ENHANCEMENTS: +* mdb: add `role` attribute to `host` entity in `yandex_mdb_postgresql_cluster` resource and data source +* compute: support update of `network_interface` attribute for `yandex_compute_instance` resource + +BUG FIXES: +* compute: fix `secondary_disk` validation in `yandex_compute_instance_group` resource +* compute: remove `secondary_disk.security_group_ids` attribute from `yandex_compute_instance` data source + +## 0.41.1 (June 24, 2020) + +BUG FIXES: +* vpc: fix panic on empty subnet dhcp options on `yandex_vpc_subnet` resource ([#82](https://github.com/terraform-providers/terraform-provider-yandex/issues/82)) + +## 0.41.0 (June 23, 2020) +FEATURES: +* **New Data Source:** `yandex_message_queue` +* **New Resource:** `yandex_message_queue` +* vpc: allow setting dhcp options for `yandex_vpc_subnet` + +ENHANCEMENTS: +* mdb: document mdb enumerables for Redis, MongoDB and ClickHouse +* provider: support set 'service_account_key_file' as either the path to or the contents of a Service Account key file in JSON format +* managed-kubernetes: support `gpus` attribute for `yandex_kubernetes_node_group` +* compute: add `instance_template.scale_policy.test_auto_scale` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `deletion_protection` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `instance_template.network_interface.security_group_ids` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `network_interface.security_group_ids` attribute in `yandex_compute_instance` resource and data source + +BUG FIXES: +* mdb: fix typo in using mdb api by `resource_yandex_mdb_postgresql_cluster` +* vpc: fix removing `yandex_vpc_subnet` attribute `route_table_id` + +## 0.40.0 (May 22, 2020) +FEATURES: +* **New Resource:** `yandex_function_iam_binding` + +BUG FIXES: +* compute: add `ipv4` flag in `yandex_compute_instance` data source +* mdb: fix disk size change on `mdb_mongodb` resource update +* mdb: adding database with its owner to existing `resource_yandex_mdb_postgresql_cluster` simultaneously + +## 0.39.0 (May 05, 2020) +ENHANCEMENTS: +* mdb: add `roles` attribute to `user` entity in `mdb_mongodb` resource and data source +* compute: change allowed disk type from `network-nvme` to `network-ssd` +* compute: `ipv4` flag determines whether to assign a IPv4 address for `network_interface` in `yandex_compute_instance` and `yandex_compute_instance_group` + +## 0.38.0 (April 22, 2020) +FEATURES: +* **New Data Source:** `yandex_vpc_security_group` +* **New Resource:** `yandex_vpc_security_group` + +ENHANCEMENTS: +* managed-kubernetes: allow to create cluster with KMS provider for secrets encryption. + +## 0.37.0 (April 16, 2020) +ENHANCEMENTS: +* storage: support custom acl grants for `yandex_storage_bucket` + +## 0.36.0 (April 16, 2020) +ENHANCEMENTS: +* compute: add `variables` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `status` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `instance_template.name` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `instance_template.hostname` attribute in `yandex_compute_instance_group` resource and data source +* compute: add `instances.status_changed_at` attribute in `yandex_compute_instance_group` resource and data source +* managed-kubernetes: add `node_ipv4_cidr_mask_size` attribute to `yandex_kubernetes_cluster` resource and data source +* managed-kubernetes: add `deploy_policy.max_unavailable` and `deploy_policy.max_expansion` attributes to `yandex_kubernetes_node_group` resource and data source +* serverless: add `environment` attribute in `yandex_function` resource and data source + +BUG FIXES: +* mdb: fix modifying `yandex_mdb_mysql_cluster` attribute `backup_window_start` + +## 0.35.0 (March 31, 2020) +FEATURES: +* **New Resource:** `yandex_kms_secret_ciphertext` + +ENHANCEMENTS: +* mdb: add `config_spec.access.serverless` attribute in `resource_yandex_mdb_clickhouse_cluster` resource and data source + +BUG FIXES: +* mdb: forbidden to change user settings that are not present in the scheme of `resource_yandex_mdb_postgresql_cluster` +* compute: compute instance attribute `hostname` is now filled when imported + +## 0.34.0 (March 18, 2020) +FEATURES: +* **New Data Source:** `yandex_function` +* **New Data Source:** `yandex_function_trigger` +* **New Resource:** `yandex_function` +* **New Resource:** `yandex_function_trigger` + +ENHANCEMENTS: +* compute: add `instance_template.network_settings` attribute in `yandex_compute_instance_group` resource and data source + +## 0.33.0 (March 06, 2020) +FEATURES: +* **New Data Source:** `yandex_iot_core_registry` +* **New Data Source:** `yandex_iot_core_device` +* **New Resource:** `yandex_iot_core_registry` +* **New Resource:** `yandex_iot_core_device` + +ENHANCEMENTS: +* managed-kubernetes: support network policy provider for `yandex_kubernetes_cluster` ([#45](https://github.com/terraform-providers/terraform-provider-yandex/issues/45)) +* managed-kubernetes: add `node_labels`, `node_taints` and `allowed_unsafe_sysctls` fields for `yandex_kubernetes_node_group` + +BUG FIXES: +* mdb: throw error when trying to modify `assign_public_ip` in `resource_yandex_mdb_postgresql_cluster`,`resource_yandex_mdb_mysql_cluster` + +## 0.32.0 (February 28, 2020) +FEATURES: +* compute: allow setting public IP address for `yandex_compute_instance` +* mdb: support ClickHouse cluster access for Yandex.Metrica + +BUG FIXES: +* mdb: disallow change `lc_collate` and `lc_ctype` in `yandex_mdb_postgresql_cluster` after creation. +* container-registry: prevent terraform crash during `terraform destroy` execution for non-existent container registry. +* resourcemanager: data source folder. fixed folder_id resolve by name (would fail without folder_id in provider config) +* managed-kubernetes: k8s cluster version update no longer requires destroying of resource +* managed-kubernetes: update of maintenance window `start_time` and `duration` will now trigger resource update + +## 0.31.0 (February 14, 2020) +FEATURES: +* compute: software network acceleration for `yandex_compute_instance` +* mdb: support roles for users in `yandex_mdb_mysql_cluster` + +ENHANCEMENTS: +* compute: support metric labels for custom rules in `yandex_compute_instance_group` resource `scale_policy.auto_scale` attribute + +BUG FIXES: +* lb: fix modifying health check settings + +## 0.30.0 (February 04, 2020) +FEATURES: +* **New Data Source:** `yandex_dataproc_cluster` +* **New Resource:** `yandex_dataproc_cluster` + +ENHANCEMENTS: +* managed-kubernetes: support autoscaled `yandex_kubernetes_node_group` + +## 0.29.1 (January 29, 2020) +BUG FIXES: +* resourcemanager: data source cloud. fixed cloud_id resolve by name (would fail without folder_id in provider config) + +## 0.29.0 (January 24, 2020) +FEATURES: +* **New Data Source:** `yandex_mdb_mysql_cluster` +* **New Data Source:** `yandex_mdb_postgresql_cluster` +* **New Resource:** `yandex_mdb_mysql_cluster` +* **New Resource:** `yandex_mdb_postgresql_cluster` + +## 0.28.0 (January 13, 2020) +FEATURES: +* **New Resource:** `yandex_kms_symmetric_key` + +ENHANCEMENTS: +* managed-kubernetes: support maintenance policy for `yandex_kubernetes_cluster` and `yandex_kubernetes_node_group` +* lb: `yandex_lb_network_load_balancer` now supports UDP for `protocol` attribute. + +BUG FIXES: +* provider: fix `message type "google.protobuf.Empty" isn't linked in` ([#35](https://github.com/terraform-providers/terraform-provider-yandex/issues/35)) + +## 0.27.0 (December 20, 2019) +FEATURES: +* **New Data Source:** `yandex_mdb_mongodb_cluster` +* **New Resource:** `yandex_mdb_mongodb_cluster` + +ENHANCEMENTS: +* mdb: support sharding in `yandex_mdb_clickhouse_cluster` +* lb: changes in `yandex_lb_network_load_balancer` support ipv6 at listener.0.external_address_spec.ip_version + +## 0.26.0 (December 06, 2019) +ENHANCEMENTS: +* compute: support for custom rules in `yandex_compute_instance_group.scale_policy.auto_scale` + +## 0.25.0 (December 05, 2019) +FEATURES: +* **New Data Source:** `yandex_mdb_clickhouse_cluster` +* **New Resource:** `yandex_mdb_clickhouse_cluster` + +## 0.24.0 (December 03, 2019) +BUG FIXES: +* managed-kubernetes: changes in `yandex_kubernetes_node_group` allocation_policy should trigger destroy/add. +* managed-kubernetes: changes in `yandex_kubernetes_cluster` location, release_channel should trigger destroy/add. +* managed-kubernetes: changes in `yandex_kubernetes_cluster` master.0.version should NOT trigger destroy/add, and use update instead. +* managed-kubernetes: forbidden zero values in `yandex_kubernetes_node_group`, in instance_template.0.resources.0.memory(cores) +* managed-kubernetes: fill `instance_group_id` field in `yandex_kubernetes_node_group` datasource and resource. + +ENHANCEMENTS: +* compute: support update of service_account_id in `yandex_compute_instance` without resource recreation. +* datasource resolving by name now uses folder_id from its config (when provided), affected datasources: +`yandex_compute_disk`, `yandex_compute_image`, `yandex_compute_instance`, `yandex_compute_snapshot`, +`yandex_container_registry`, `yandex_kubernetes_cluster`, `yandex_kubernetes_node_group`, +`yandex_lb_network_load_balancer`, `yandex_lb_target_group`, `yandex_mdb_redis_cluster`, +`yandex_vpc_network`, `yandex_vpc_route_table`, `yandex_vpc_subnet`. + +## 0.23.0 (November 05, 2019) +ENHANCEMENTS: +* mdb: support sharding in `yandex_mdb_redis_cluster` +* compute: increase `yandex_compute_snapshot` timeout from 5 to 20 minutes + +BUG FIXES: +* managed-kubernetes: mark as computable `version` and `public_ip` in `yandex_kubernetes_cluster` resource + +## 0.22.0 (October 24, 2019) +ENHANCEMENTS: +* compute: add `instances` to `yandex_compute_instance_group` resource +* mdb: add fqdns of hosts in `yandex_mdb_redis_cluster` resource and data source +* managed-kubernetes: add `version` to `yandex_kubernetes_node_group` resource + +## 0.21.0 (October 17, 2019) +ENHANCEMENTS: +* storage: `yandex_storage_bucket` and `yandex_storage_object` resources can manage ACL + +## 0.20.0 (October 15, 2019) +FEATURES: +* **New Resource:** `yandex_storage_bucket` +* **New Resource:** `yandex_storage_object` + +## 0.19.0 (October 15, 2019) +ENHANCEMENTS: +* managed-kubernetes: `yandex_kubernetes_node_group` resource can now be imported +* managed-kubernetes: `yandex_kubernetes_cluster` resource can now be imported + +BUG FIXES: +* minor documentation fixes for Kubernetes cluster resource and instance group datasource. + +## 0.18.0 (October 11, 2019) +ENHANCEMENTS: +* provider: support authentication via instance service account from inside an instance + +BUG FIXES: +* container: increase default timeout + +## 0.17.0 (October 02, 2019) +FEATURES: +* compute: auto_scale support added for `yandex_compute_instance_group` resource and data source + +## 0.16.0 (October 01, 2019) +* **New Data Source:** `yandex_mdb_redis_cluster` +* **New Resource:** `yandex_mdb_redis_cluster` + +## 0.15.0 (September 30, 2019) +FEATURES: +* **New Data Source:** `yandex_kubernetes_cluster` +* **New Data Source:** `yandex_kubernetes_node_group` +* **New Resource:** `yandex_kubernetes_cluster` +* **New Resource:** `yandex_kubernetes_node_group` + +## 0.14.0 (September 27, 2019) +* provider: migrate to standalone Terraform SDK module ([#22](https://github.com/terraform-providers/terraform-provider-yandex/issues/22)) +* provider: support graceful shutdown +* iam: use logic lock on cloud while create SA to prevent simultaneous IAM membership changes +* container: resolve data source `yandex_container_registry` by name. + +## 0.13.0 (September 23, 2019) +FEATURES: +* **New Resource:** `yandex_iam_service_account_api_key` +* **New Resource:** `yandex_iam_service_account_key` + +ENHANCEMENTS: +* compute: `yandex_compute_snapshot` resource can now be imported +* iam: `yandex_iam_service_account` resource can now be imported +* iam: `yandex_iam_service_account_static_access_key` resource now supports `pgp_key` field. + +## 0.12.0 (September 20, 2019) +FEATURES: +* **New Data Source:** `yandex_container_registry` +* **New Resource:** `yandex_container_registry` + +## 0.11.2 (September 19, 2019) +ENHANCEMENTS: +* provider: provider uses permanent client-request-id identifier while the terraform is running + +BUG FIXES: +* provider: fix provider name and version detection + +## 0.11.1 (September 13, 2019) +ENHANCEMENTS: +* provider: set provider name and version in user agent header. + +BUG FIXES: +* compute: fix flattening of health checks for `yandex_compute_instance_group` resource + +## 0.11.0 (September 11, 2019) +ENHANCEMENTS: +* compute: add `resources.0.gpus` attribute in `yandex_compute_instance` resource and data source +* compute: add `resources.0.gpus` attribute in `yandex_compute_instance_group` resource and data source + +## 0.10.2 (September 09, 2019) +ENHANCEMENTS: +* compute: `yandex_compute_snapshot` resource can now be imported +* iam: `yandex_iam_service_account` resource can now be imported + +BUG FIXES: +* compute: fix read operation of `yandex_compute_instance` + +## 0.10.1 (August 26, 2019) +BUG FIXES: +* resourcemanager: resources `yandex_*_iam_binding`, `yandex_•_iam_policy` works with full set of bindings. + +## 0.10.0 (August 21, 2019) +BUG FIXES: +* vpc: remove `v6_cidr_blocks` attr in `yandex_vpc_subnet` resource. This property is not available right now. + +ENHANCEMENTS: +* compute: instance_group data source and resource support new fields in `load_balancer` section. +* resourcemanager: support lookup `yandex_resourcemanager_folder` at specific cloud_id. ([#17](https://github.com/terraform-providers/terraform-provider-yandex/issues/17)) + +## 0.9.1 (August 14, 2019) +ENHANCEMENTS: +* compute: use `min_disk_size` of image or `disk_size` of snapshot to set size of boot_disk on instance template for `yandex_compute_instance_group`. + +## 0.9.0 (August 07, 2019) +FEATURES: +* **New Data Source:** `yandex_lb_network_load_balancer` +* **New Data Source:** `yandex_lb_target_group` +* **New Resource:** `yandex_lb_network_load_balancer` +* **New Resource:** `yandex_lb_target_group` + +ENHANCEMENTS: +* compute: use `min_disk_size` of image or `disk_size` of snapshot to set size of boot_disk on instance create. +* compute: update instance resource spec and platform type in one request. + +BUG FIXES: +* compute: change attribute `folder_id` from Required to Optional for `yandex_compute_instance_group` resource [[#14](https://github.com/terraform-providers/terraform-provider-yandex/issues/14)]. + +## 0.8.1 (July 04, 2019) +BUG FIXES: +* compute: fix `yandex_compute_instance_group` with `load_balancer_spec` defined [[#13](https://github.com/terraform-providers/terraform-provider-yandex/issues/13)]. + +## 0.8.0 (June 25, 2019) +FEATURES: +* **New Data Source**: `yandex_compute_instance_group` +* **New Resource**: `yandex_compute_instance_group` + +## 0.7.0 (June 06, 2019) +ENHANCEMENTS: +* provider: Support SDK retries. + +## 0.6.0 (May 29, 2019) +NOTES: +* provider: This release includes a Terraform SDK upgrade with compatibility for Terraform v0.12. +* provider: Switch dependency management to Go modules. ([#5](https://github.com/terraform-providers/terraform-provider-yandex/issues/5)) + +## 0.5.2 (April 24, 2019) +ENHANCEMENTS: +* compute: fractional values for memory for `yandex_compute_instance`. +* compute: `yandex_compute_instance` support update platform_id in stopped state. + +## 0.5.1 (April 20, 2019) +BUG FIXES: +* compute: fix migration process for `yandex_compute_instance`. + +## 0.5.0 (April 17, 2019) +ENHANCEMENTS: +* all: save new entity identifiers at start of create operation +* compute: `yandex_compute_instance` support update resources in stopped state. +* compute: change attribute `resources` type from Set to List + +## 0.4.1 (April 11, 2019) +BUG FIXES: +* compute: fix properties of `service_account_id` attribute. + +## 0.4.0 (April 09, 2019) +ENHANCEMENTS: +* compute: `yandex_compute_instance` adds a `service_account_id` attribute. + +## 0.3.0 (April 03, 2019) +FEATURES: +* **New Datasource**: `yandex_vpc_route_table` +* **New Resource**: `yandex_vpc_route_table` + +ENHANCEMENTS: +* vpc: `yandex_vpc_subnet` adds a `route_table_id` field. + +## 0.2.0 (March 26, 2019) +ENHANCEMENTS: +* provider: authentication with service account key file. ([#3](https://github.com/terraform-providers/terraform-provider-yandex/issues/3)) +* vpc: increase subnet create/update/delete timeout. +* vpc: resolve data source `network`, `subnet` by name. +* compute: resolve data source `instance`, `disk`, `image`, `snapshot` objects by names. +* resourcemanager: resolve data source `folder` by name. + +## 0.1.16 (March 14, 2019) +ENHANCEMENTS: +* compute: support preemptible instance type. + +BUG FIXES: +* compute: fix update method on compute resources for description attribute. + +## 0.1.15 (February 22, 2019) + +BACKWARDS INCOMPATIBILITIES: +* compute: `yandex_compute_disk.source_image_id` and `yandex_compute_disk.source_snapshot_id` has been removed. +* iam: `iam_service_account_key` was renamed to `iam_service_account_static_access_key`. + +ENHANCEMENTS: +* provider: more descriptive error messages. +* compute: `yandex_compute_disk` support for increasing size without force recreation of the resource. + +BUG FIXES: +* compute: make consistent disk type attribute name `type_id` -> `type`. +* compute: remove attr `instance_id` from `yandex_compute_instance`. +* compute: make `yandex_compute_instancenet.network_interface.*.nat` ForceNew. + +## 0.1.14 (December 26, 2018) + +FEATURES: +* **New Data Source:** `yandex_compute_disk` +* **New Data Source:** `yandex_compute_image` +* **New Data Source:** `yandex_compute_instance` +* **New Data Source:** `yandex_compute_snapshot` +* **New Data Source:** `yandex_iam_policy` +* **New Data Source:** `yandex_iam_role` +* **New Data Source:** `yandex_iam_service_account` +* **New Data Source:** `yandex_iam_user` +* **New Data Source:** `yandex_resourcemanager_cloud` +* **New Data Source:** `yandex_resourcemanager_folder` +* **New Data Source:** `yandex_vpc_network` +* **New Data Source:** `yandex_vpc_subnet` +* **New Resource:** `yandex_compute_disk` +* **New Resource:** `yandex_compute_image` +* **New Resource:** `yandex_compute_instance` +* **New Resource:** `yandex_compute_snapshot` +* **New Resource:** `yandex_iam_service_account` +* **New Resource:** `yandex_iam_service_account_iam_binding` +* **New Resource:** `yandex_iam_service_account_iam_member` +* **New Resource:** `yandex_iam_service_account_iam_policy` +* **New Resource:** `yandex_iam_service_account_key` +* **New Resource:** `yandex_vpc_network` +* **New Resource:** `yandex_vpc_subnet` +* **New Resource:** `yandex_resourcemanager_cloud_iam_binding` +* **New Resource:** `yandex_resourcemanager_cloud_iam_member` +* **New Resource:** `yandex_resourcemanager_folder_iam_binding` +* **New Resource:** `yandex_resourcemanager_folder_iam_member` +* **New Resource:** `yandex_resourcemanager_folder_iam_policy` + +ENHANCEMENTS: +* compute: support IPv6 addresses +* vpc: support IPv6 addresses diff --git a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/LICENSE b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/LICENSE index a612ad9..76a17d7 100644 --- a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/LICENSE +++ b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/LICENSE @@ -1,373 +1,373 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/README.md b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/README.md index bcf3cef..3dbbc03 100644 --- a/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/README.md +++ b/terraform/.terraform/providers/registry.terraform.io/yandex-cloud/yandex/0.85.0/darwin_amd64/README.md @@ -1,71 +1,71 @@ -Terraform Provider -================== - -- Documentation: https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs - -Requirements ------------- - -- [Terraform](https://www.terraform.io/downloads.html) 0.12+ -- [Go](https://golang.org/doc/install) 1.16 (to build the provider plugin) - -Building The Provider ---------------------- - -Clone repository to: `$GOPATH/src/github.com/yandex-cloud/terraform-provider-yandex` - -```sh -$ mkdir -p $GOPATH/src/github.com/yandex-cloud; cd $GOPATH/src/github.com/yandex-cloud -$ git clone git@github.com:yandex-cloud/terraform-provider-yandex -``` - -Enter the provider directory and build the provider - -```sh -$ cd $GOPATH/src/github.com/yandex-cloud/terraform-provider-yandex -$ make build -``` - -Using the provider ----------------------- -If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-plugins) After placing it into your plugins directory, run `terraform init` to initialize it. Documentation about the provider specific configuration options can be found on the [provider's website](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs). -An example of using an installed provider from local directory: - -Write following config into `~/.terraformrc` -``` -provider_installation { - dev_overrides { - "yandex-cloud/yandex" = "/path/to/local/provider" - } - - direct {} - } -``` - -Developing the Provider ---------------------------- - -If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.11+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`. - -To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. - -```sh -$ make build -... -$ $GOPATH/bin/terraform-provider-yandex -... -``` - -In order to test the provider, you can simply run `make test`. - -```sh -$ make test -``` - -In order to run the full suite of [Acceptance tests](https://www.terraform.io/docs/extend/testing/acceptance-tests/index.html), run `make testacc`. - -*Note:* Acceptance tests create real resources, and often cost money to run. - -```sh -$ make testacc -``` +Terraform Provider +================== + +- Documentation: https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs + +Requirements +------------ + +- [Terraform](https://www.terraform.io/downloads.html) 0.12+ +- [Go](https://golang.org/doc/install) 1.16 (to build the provider plugin) + +Building The Provider +--------------------- + +Clone repository to: `$GOPATH/src/github.com/yandex-cloud/terraform-provider-yandex` + +```sh +$ mkdir -p $GOPATH/src/github.com/yandex-cloud; cd $GOPATH/src/github.com/yandex-cloud +$ git clone git@github.com:yandex-cloud/terraform-provider-yandex +``` + +Enter the provider directory and build the provider + +```sh +$ cd $GOPATH/src/github.com/yandex-cloud/terraform-provider-yandex +$ make build +``` + +Using the provider +---------------------- +If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-plugins) After placing it into your plugins directory, run `terraform init` to initialize it. Documentation about the provider specific configuration options can be found on the [provider's website](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs). +An example of using an installed provider from local directory: + +Write following config into `~/.terraformrc` +``` +provider_installation { + dev_overrides { + "yandex-cloud/yandex" = "/path/to/local/provider" + } + + direct {} + } +``` + +Developing the Provider +--------------------------- + +If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.11+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`. + +To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. + +```sh +$ make build +... +$ $GOPATH/bin/terraform-provider-yandex +... +``` + +In order to test the provider, you can simply run `make test`. + +```sh +$ make test +``` + +In order to run the full suite of [Acceptance tests](https://www.terraform.io/docs/extend/testing/acceptance-tests/index.html), run `make testacc`. + +*Note:* Acceptance tests create real resources, and often cost money to run. + +```sh +$ make testacc +``` diff --git a/terraform/main.tf b/terraform/main.tf index 2821413..6f284c1 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,159 +1,159 @@ -terraform { - required_providers { - yandex = { - source = "yandex-cloud/yandex" - } - } - required_version = ">= 0.13" -} - -provider "yandex" { -} - - -resource "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { - name = "clickhouse_starschema" - environment = "PRESTABLE" - network_id = yandex_vpc_network.default_network.id - sql_database_management = true - sql_user_management = true - admin_password = var.admin_password - - clickhouse { - resources { - resource_preset_id = "s3-c4-m16" - disk_type_id = "network-ssd" - disk_size = 64 - } - - config { - log_level = "TRACE" - max_connections = 100 - max_concurrent_queries = 100 - keep_alive_timeout = 3000 - uncompressed_cache_size = 8589934592 - mark_cache_size = 5368709120 - max_table_size_to_drop = 53687091200 - max_partition_size_to_drop = 53687091200 - timezone = "UTC" - geobase_uri = "" - query_log_retention_size = 1073741824 - query_log_retention_time = 2592000 - query_thread_log_enabled = true - query_thread_log_retention_size = 536870912 - query_thread_log_retention_time = 2592000 - part_log_retention_size = 536870912 - part_log_retention_time = 2592000 - metric_log_enabled = true - metric_log_retention_size = 536870912 - metric_log_retention_time = 2592000 - trace_log_enabled = true - trace_log_retention_size = 536870912 - trace_log_retention_time = 2592000 - text_log_enabled = true - text_log_retention_size = 536870912 - text_log_retention_time = 2592000 - text_log_level = "TRACE" - background_pool_size = 16 - background_schedule_pool_size = 16 - - merge_tree { - replicated_deduplication_window = 100 - replicated_deduplication_window_seconds = 604800 - parts_to_delay_insert = 150 - parts_to_throw_insert = 300 - max_replicated_merges_in_queue = 16 - number_of_free_entries_in_pool_to_lower_max_size_of_merge = 8 - max_bytes_to_merge_at_min_space_in_pool = 1048576 - } - - kafka { - security_protocol = "SECURITY_PROTOCOL_PLAINTEXT" - sasl_mechanism = "SASL_MECHANISM_GSSAPI" - sasl_username = "user1" - sasl_password = "pass1" - } - - kafka_topic { - name = "topic1" - settings { - security_protocol = "SECURITY_PROTOCOL_SSL" - sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_256" - sasl_username = "user2" - sasl_password = "pass2" - } - } - - kafka_topic { - name = "topic2" - settings { - security_protocol = "SECURITY_PROTOCOL_SASL_PLAINTEXT" - sasl_mechanism = "SASL_MECHANISM_PLAIN" - } - } - - rabbitmq { - username = "rabbit_user" - password = "rabbit_pass" - } - - compression { - method = "LZ4" - min_part_size = 1024 - min_part_size_ratio = 0.5 - } - - compression { - method = "ZSTD" - min_part_size = 2048 - min_part_size_ratio = 0.7 - } - - graphite_rollup { - name = "rollup1" - pattern { - regexp = "abc" - function = "func1" - retention { - age = 1000 - precision = 3 - } - } - } - - graphite_rollup { - name = "rollup2" - pattern { - function = "func2" - retention { - age = 2000 - precision = 5 - } - } - } - } - } - - host { - type = "CLICKHOUSE" - zone = "ru-central1-b" - subnet_id = yandex_vpc_subnet.foo.id - assign_public_ip = true - } - - cloud_storage { - enabled = false - } - - maintenance_window { - type = "ANYTIME" - } -} - -resource "yandex_vpc_network" "default_network" {} - -resource "yandex_vpc_subnet" "foo" { - zone = "ru-central1-b" - network_id = yandex_vpc_network.default_network.id - v4_cidr_blocks = ["10.5.0.0/24"] +terraform { + required_providers { + yandex = { + source = "yandex-cloud/yandex" + } + } + required_version = ">= 0.13" +} + +provider "yandex" { +} + + +resource "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { + name = "clickhouse_starschema" + environment = "PRESTABLE" + network_id = yandex_vpc_network.default_network.id + sql_database_management = true + sql_user_management = true + admin_password = var.admin_password + + clickhouse { + resources { + resource_preset_id = "s3-c4-m16" + disk_type_id = "network-ssd" + disk_size = 64 + } + + config { + log_level = "TRACE" + max_connections = 100 + max_concurrent_queries = 100 + keep_alive_timeout = 3000 + uncompressed_cache_size = 8589934592 + mark_cache_size = 5368709120 + max_table_size_to_drop = 53687091200 + max_partition_size_to_drop = 53687091200 + timezone = "UTC" + geobase_uri = "" + query_log_retention_size = 1073741824 + query_log_retention_time = 2592000 + query_thread_log_enabled = true + query_thread_log_retention_size = 536870912 + query_thread_log_retention_time = 2592000 + part_log_retention_size = 536870912 + part_log_retention_time = 2592000 + metric_log_enabled = true + metric_log_retention_size = 536870912 + metric_log_retention_time = 2592000 + trace_log_enabled = true + trace_log_retention_size = 536870912 + trace_log_retention_time = 2592000 + text_log_enabled = true + text_log_retention_size = 536870912 + text_log_retention_time = 2592000 + text_log_level = "TRACE" + background_pool_size = 16 + background_schedule_pool_size = 16 + + merge_tree { + replicated_deduplication_window = 100 + replicated_deduplication_window_seconds = 604800 + parts_to_delay_insert = 150 + parts_to_throw_insert = 300 + max_replicated_merges_in_queue = 16 + number_of_free_entries_in_pool_to_lower_max_size_of_merge = 8 + max_bytes_to_merge_at_min_space_in_pool = 1048576 + } + + kafka { + security_protocol = "SECURITY_PROTOCOL_PLAINTEXT" + sasl_mechanism = "SASL_MECHANISM_GSSAPI" + sasl_username = "user1" + sasl_password = "pass1" + } + + kafka_topic { + name = "topic1" + settings { + security_protocol = "SECURITY_PROTOCOL_SSL" + sasl_mechanism = "SASL_MECHANISM_SCRAM_SHA_256" + sasl_username = "user2" + sasl_password = "pass2" + } + } + + kafka_topic { + name = "topic2" + settings { + security_protocol = "SECURITY_PROTOCOL_SASL_PLAINTEXT" + sasl_mechanism = "SASL_MECHANISM_PLAIN" + } + } + + rabbitmq { + username = "rabbit_user" + password = "rabbit_pass" + } + + compression { + method = "LZ4" + min_part_size = 1024 + min_part_size_ratio = 0.5 + } + + compression { + method = "ZSTD" + min_part_size = 2048 + min_part_size_ratio = 0.7 + } + + graphite_rollup { + name = "rollup1" + pattern { + regexp = "abc" + function = "func1" + retention { + age = 1000 + precision = 3 + } + } + } + + graphite_rollup { + name = "rollup2" + pattern { + function = "func2" + retention { + age = 2000 + precision = 5 + } + } + } + } + } + + host { + type = "CLICKHOUSE" + zone = "ru-central1-b" + subnet_id = yandex_vpc_subnet.foo.id + assign_public_ip = true + } + + cloud_storage { + enabled = false + } + + maintenance_window { + type = "ANYTIME" + } +} + +resource "yandex_vpc_network" "default_network" {} + +resource "yandex_vpc_subnet" "foo" { + zone = "ru-central1-b" + network_id = yandex_vpc_network.default_network.id + v4_cidr_blocks = ["10.5.0.0/24"] } \ No newline at end of file diff --git a/terraform/terraform.tfstate b/terraform/terraform.tfstate index bbdeb57..c9eb484 100644 --- a/terraform/terraform.tfstate +++ b/terraform/terraform.tfstate @@ -1,9 +1,9 @@ -{ - "version": 4, - "terraform_version": "1.3.7", - "serial": 13, - "lineage": "91507c43-828d-9074-1f0d-e47933c92f0f", - "outputs": {}, - "resources": [], - "check_results": null -} +{ + "version": 4, + "terraform_version": "1.3.7", + "serial": 13, + "lineage": "91507c43-828d-9074-1f0d-e47933c92f0f", + "outputs": {}, + "resources": [], + "check_results": null +} diff --git a/terraform/terraform.tfstate.backup b/terraform/terraform.tfstate.backup index 51024f3..6f9c382 100644 --- a/terraform/terraform.tfstate.backup +++ b/terraform/terraform.tfstate.backup @@ -1,315 +1,315 @@ -{ - "version": 4, - "terraform_version": "1.3.7", - "serial": 9, - "lineage": "91507c43-828d-9074-1f0d-e47933c92f0f", - "outputs": {}, - "resources": [ - { - "mode": "managed", - "type": "yandex_mdb_clickhouse_cluster", - "name": "clickhouse_starschema", - "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "access": [ - { - "data_lens": false, - "data_transfer": false, - "metrika": false, - "serverless": false, - "web_sql": false, - "yandex_query": false - } - ], - "admin_password": "clickhouse", - "backup_window_start": [ - { - "hours": 0, - "minutes": 0 - } - ], - "clickhouse": [ - { - "config": [ - { - "background_pool_size": 16, - "background_schedule_pool_size": 16, - "compression": [ - { - "method": "LZ4", - "min_part_size": 1024, - "min_part_size_ratio": 0.5 - }, - { - "method": "ZSTD", - "min_part_size": 2048, - "min_part_size_ratio": 0.7 - } - ], - "geobase_uri": "", - "graphite_rollup": [ - { - "name": "rollup1", - "pattern": [ - { - "function": "func1", - "regexp": "abc", - "retention": [ - { - "age": 1000, - "precision": 3 - } - ] - } - ] - }, - { - "name": "rollup2", - "pattern": [ - { - "function": "func2", - "regexp": "", - "retention": [ - { - "age": 2000, - "precision": 5 - } - ] - } - ] - } - ], - "kafka": [ - { - "sasl_mechanism": "SASL_MECHANISM_GSSAPI", - "sasl_password": "pass1", - "sasl_username": "user1", - "security_protocol": "SECURITY_PROTOCOL_PLAINTEXT" - } - ], - "kafka_topic": [ - { - "name": "topic1", - "settings": [ - { - "sasl_mechanism": "SASL_MECHANISM_SCRAM_SHA_256", - "sasl_password": "pass2", - "sasl_username": "user2", - "security_protocol": "SECURITY_PROTOCOL_SSL" - } - ] - }, - { - "name": "topic2", - "settings": [ - { - "sasl_mechanism": "SASL_MECHANISM_PLAIN", - "sasl_password": "", - "sasl_username": "", - "security_protocol": "SECURITY_PROTOCOL_SASL_PLAINTEXT" - } - ] - } - ], - "keep_alive_timeout": 3000, - "log_level": "TRACE", - "mark_cache_size": 5368709120, - "max_concurrent_queries": 100, - "max_connections": 100, - "max_partition_size_to_drop": 53687091200, - "max_table_size_to_drop": 53687091200, - "merge_tree": [ - { - "max_bytes_to_merge_at_min_space_in_pool": 1048576, - "max_replicated_merges_in_queue": 16, - "number_of_free_entries_in_pool_to_lower_max_size_of_merge": 8, - "parts_to_delay_insert": 150, - "parts_to_throw_insert": 300, - "replicated_deduplication_window": 100, - "replicated_deduplication_window_seconds": 604800 - } - ], - "metric_log_enabled": true, - "metric_log_retention_size": 536870912, - "metric_log_retention_time": 2592000, - "part_log_retention_size": 536870912, - "part_log_retention_time": 2592000, - "query_log_retention_size": 1073741824, - "query_log_retention_time": 2592000, - "query_thread_log_enabled": true, - "query_thread_log_retention_size": 536870912, - "query_thread_log_retention_time": 2592000, - "rabbitmq": [ - { - "password": "rabbit_pass", - "username": "rabbit_user" - } - ], - "text_log_enabled": true, - "text_log_level": "TRACE", - "text_log_retention_size": 536870912, - "text_log_retention_time": 2592000, - "timezone": "UTC", - "trace_log_enabled": true, - "trace_log_retention_size": 536870912, - "trace_log_retention_time": 2592000, - "uncompressed_cache_size": 8589934592 - } - ], - "resources": [ - { - "disk_size": 64, - "disk_type_id": "network-ssd", - "resource_preset_id": "s3-c4-m16" - } - ] - } - ], - "cloud_storage": [ - { - "data_cache_enabled": false, - "data_cache_max_size": 0, - "enabled": false, - "move_factor": 0 - } - ], - "copy_schema_on_new_hosts": false, - "created_at": "2023-02-06T13:35:01Z", - "database": [], - "deletion_protection": false, - "description": "", - "embedded_keeper": false, - "environment": "PRESTABLE", - "folder_id": "b1gnsje5cinlguhk98qm", - "format_schema": [], - "health": "HEALTH_UNKNOWN", - "host": [ - { - "assign_public_ip": true, - "fqdn": "rc1b-8dvbtj8ejqpipvh1.mdb.yandexcloud.net", - "shard_name": "shard1", - "subnet_id": "e2lgldjhl9h711fpr5dk", - "type": "CLICKHOUSE", - "zone": "ru-central1-b" - } - ], - "id": "c9qe56m9b970so84muts", - "labels": {}, - "maintenance_window": [ - { - "day": "", - "hour": 0, - "type": "ANYTIME" - } - ], - "ml_model": [], - "name": "clickhouse_starschema", - "network_id": "enp1l7gmmp23q5qqsapu", - "security_group_ids": [], - "service_account_id": "", - "shard": [ - { - "name": "shard1", - "weight": 100 - } - ], - "shard_group": [], - "sql_database_management": true, - "sql_user_management": true, - "status": "RUNNING", - "timeouts": null, - "user": [], - "version": "22.8", - "zookeeper": [ - { - "resources": [ - { - "disk_size": 0, - "disk_type_id": "", - "resource_preset_id": "" - } - ] - } - ] - }, - "sensitive_attributes": [ - [ - { - "type": "get_attr", - "value": "admin_password" - } - ] - ], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozNjAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6NTQwMDAwMDAwMDAwMH19", - "dependencies": [ - "yandex_vpc_network.default_network", - "yandex_vpc_subnet.foo" - ] - } - ] - }, - { - "mode": "managed", - "type": "yandex_vpc_network", - "name": "default_network", - "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "created_at": "2023-02-06T13:26:43Z", - "default_security_group_id": "", - "description": "", - "folder_id": "b1gnsje5cinlguhk98qm", - "id": "enp1l7gmmp23q5qqsapu", - "labels": {}, - "name": "", - "subnet_ids": [ - "e2lgldjhl9h711fpr5dk" - ], - "timeouts": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMCwiZGVsZXRlIjo2MDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMH19" - } - ] - }, - { - "mode": "managed", - "type": "yandex_vpc_subnet", - "name": "foo", - "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "created_at": "2023-02-06T13:26:44Z", - "description": "", - "dhcp_options": [], - "folder_id": "b1gnsje5cinlguhk98qm", - "id": "e2lgldjhl9h711fpr5dk", - "labels": {}, - "name": "", - "network_id": "enp1l7gmmp23q5qqsapu", - "route_table_id": "", - "timeouts": null, - "v4_cidr_blocks": [ - "10.5.0.0/24" - ], - "v6_cidr_blocks": [], - "zone": "ru-central1-b" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAsImRlbGV0ZSI6MTgwMDAwMDAwMDAwLCJ1cGRhdGUiOjE4MDAwMDAwMDAwMH19", - "dependencies": [ - "yandex_vpc_network.default_network" - ] - } - ] - } - ], - "check_results": null -} +{ + "version": 4, + "terraform_version": "1.3.7", + "serial": 9, + "lineage": "91507c43-828d-9074-1f0d-e47933c92f0f", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "yandex_mdb_clickhouse_cluster", + "name": "clickhouse_starschema", + "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access": [ + { + "data_lens": false, + "data_transfer": false, + "metrika": false, + "serverless": false, + "web_sql": false, + "yandex_query": false + } + ], + "admin_password": "clickhouse", + "backup_window_start": [ + { + "hours": 0, + "minutes": 0 + } + ], + "clickhouse": [ + { + "config": [ + { + "background_pool_size": 16, + "background_schedule_pool_size": 16, + "compression": [ + { + "method": "LZ4", + "min_part_size": 1024, + "min_part_size_ratio": 0.5 + }, + { + "method": "ZSTD", + "min_part_size": 2048, + "min_part_size_ratio": 0.7 + } + ], + "geobase_uri": "", + "graphite_rollup": [ + { + "name": "rollup1", + "pattern": [ + { + "function": "func1", + "regexp": "abc", + "retention": [ + { + "age": 1000, + "precision": 3 + } + ] + } + ] + }, + { + "name": "rollup2", + "pattern": [ + { + "function": "func2", + "regexp": "", + "retention": [ + { + "age": 2000, + "precision": 5 + } + ] + } + ] + } + ], + "kafka": [ + { + "sasl_mechanism": "SASL_MECHANISM_GSSAPI", + "sasl_password": "pass1", + "sasl_username": "user1", + "security_protocol": "SECURITY_PROTOCOL_PLAINTEXT" + } + ], + "kafka_topic": [ + { + "name": "topic1", + "settings": [ + { + "sasl_mechanism": "SASL_MECHANISM_SCRAM_SHA_256", + "sasl_password": "pass2", + "sasl_username": "user2", + "security_protocol": "SECURITY_PROTOCOL_SSL" + } + ] + }, + { + "name": "topic2", + "settings": [ + { + "sasl_mechanism": "SASL_MECHANISM_PLAIN", + "sasl_password": "", + "sasl_username": "", + "security_protocol": "SECURITY_PROTOCOL_SASL_PLAINTEXT" + } + ] + } + ], + "keep_alive_timeout": 3000, + "log_level": "TRACE", + "mark_cache_size": 5368709120, + "max_concurrent_queries": 100, + "max_connections": 100, + "max_partition_size_to_drop": 53687091200, + "max_table_size_to_drop": 53687091200, + "merge_tree": [ + { + "max_bytes_to_merge_at_min_space_in_pool": 1048576, + "max_replicated_merges_in_queue": 16, + "number_of_free_entries_in_pool_to_lower_max_size_of_merge": 8, + "parts_to_delay_insert": 150, + "parts_to_throw_insert": 300, + "replicated_deduplication_window": 100, + "replicated_deduplication_window_seconds": 604800 + } + ], + "metric_log_enabled": true, + "metric_log_retention_size": 536870912, + "metric_log_retention_time": 2592000, + "part_log_retention_size": 536870912, + "part_log_retention_time": 2592000, + "query_log_retention_size": 1073741824, + "query_log_retention_time": 2592000, + "query_thread_log_enabled": true, + "query_thread_log_retention_size": 536870912, + "query_thread_log_retention_time": 2592000, + "rabbitmq": [ + { + "password": "rabbit_pass", + "username": "rabbit_user" + } + ], + "text_log_enabled": true, + "text_log_level": "TRACE", + "text_log_retention_size": 536870912, + "text_log_retention_time": 2592000, + "timezone": "UTC", + "trace_log_enabled": true, + "trace_log_retention_size": 536870912, + "trace_log_retention_time": 2592000, + "uncompressed_cache_size": 8589934592 + } + ], + "resources": [ + { + "disk_size": 64, + "disk_type_id": "network-ssd", + "resource_preset_id": "s3-c4-m16" + } + ] + } + ], + "cloud_storage": [ + { + "data_cache_enabled": false, + "data_cache_max_size": 0, + "enabled": false, + "move_factor": 0 + } + ], + "copy_schema_on_new_hosts": false, + "created_at": "2023-02-06T13:35:01Z", + "database": [], + "deletion_protection": false, + "description": "", + "embedded_keeper": false, + "environment": "PRESTABLE", + "folder_id": "b1gnsje5cinlguhk98qm", + "format_schema": [], + "health": "HEALTH_UNKNOWN", + "host": [ + { + "assign_public_ip": true, + "fqdn": "rc1b-8dvbtj8ejqpipvh1.mdb.yandexcloud.net", + "shard_name": "shard1", + "subnet_id": "e2lgldjhl9h711fpr5dk", + "type": "CLICKHOUSE", + "zone": "ru-central1-b" + } + ], + "id": "c9qe56m9b970so84muts", + "labels": {}, + "maintenance_window": [ + { + "day": "", + "hour": 0, + "type": "ANYTIME" + } + ], + "ml_model": [], + "name": "clickhouse_starschema", + "network_id": "enp1l7gmmp23q5qqsapu", + "security_group_ids": [], + "service_account_id": "", + "shard": [ + { + "name": "shard1", + "weight": 100 + } + ], + "shard_group": [], + "sql_database_management": true, + "sql_user_management": true, + "status": "RUNNING", + "timeouts": null, + "user": [], + "version": "22.8", + "zookeeper": [ + { + "resources": [ + { + "disk_size": 0, + "disk_type_id": "", + "resource_preset_id": "" + } + ] + } + ] + }, + "sensitive_attributes": [ + [ + { + "type": "get_attr", + "value": "admin_password" + } + ] + ], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozNjAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6NTQwMDAwMDAwMDAwMH19", + "dependencies": [ + "yandex_vpc_network.default_network", + "yandex_vpc_subnet.foo" + ] + } + ] + }, + { + "mode": "managed", + "type": "yandex_vpc_network", + "name": "default_network", + "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "created_at": "2023-02-06T13:26:43Z", + "default_security_group_id": "", + "description": "", + "folder_id": "b1gnsje5cinlguhk98qm", + "id": "enp1l7gmmp23q5qqsapu", + "labels": {}, + "name": "", + "subnet_ids": [ + "e2lgldjhl9h711fpr5dk" + ], + "timeouts": null + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMCwiZGVsZXRlIjo2MDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMH19" + } + ] + }, + { + "mode": "managed", + "type": "yandex_vpc_subnet", + "name": "foo", + "provider": "provider[\"registry.terraform.io/yandex-cloud/yandex\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "created_at": "2023-02-06T13:26:44Z", + "description": "", + "dhcp_options": [], + "folder_id": "b1gnsje5cinlguhk98qm", + "id": "e2lgldjhl9h711fpr5dk", + "labels": {}, + "name": "", + "network_id": "enp1l7gmmp23q5qqsapu", + "route_table_id": "", + "timeouts": null, + "v4_cidr_blocks": [ + "10.5.0.0/24" + ], + "v6_cidr_blocks": [], + "zone": "ru-central1-b" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAsImRlbGV0ZSI6MTgwMDAwMDAwMDAwLCJ1cGRhdGUiOjE4MDAwMDAwMDAwMH19", + "dependencies": [ + "yandex_vpc_network.default_network" + ] + } + ] + } + ], + "check_results": null +} diff --git a/terraform/variables.tf b/terraform/variables.tf index 40ca601..c2342f3 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -1,14 +1,14 @@ -variable "admin_password" { - description = "Clickhouse admin password" - type = string - sensitive = true -# default = "password" -} - -data "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { - name = "clickhouse_starschema" -} - -output "clickhouse_host_fqdn" { - value = data.yandex_mdb_clickhouse_cluster.clickhouse_starschema.host[0].fqdn -} +variable "admin_password" { + description = "Clickhouse admin password" + type = string + sensitive = true +# default = "password" +} + +data "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { + name = "clickhouse_starschema" +} + +output "clickhouse_host_fqdn" { + value = data.yandex_mdb_clickhouse_cluster.clickhouse_starschema.host[0].fqdn +} diff --git a/terraformrc b/terraformrc index 9bc7728..59807d1 100644 --- a/terraformrc +++ b/terraformrc @@ -1,9 +1,9 @@ -provider_installation { - network_mirror { - url = "https://terraform-mirror.yandexcloud.net/" - include = ["registry.terraform.io/*/*"] - } - direct { - exclude = ["registry.terraform.io/*/*"] - } +provider_installation { + network_mirror { + url = "https://terraform-mirror.yandexcloud.net/" + include = ["registry.terraform.io/*/*"] + } + direct { + exclude = ["registry.terraform.io/*/*"] + } } \ No newline at end of file diff --git a/tests/assert_f_orders_stats_num_orders.sql b/tests/assert_f_orders_stats_num_orders.sql index e8f7f6d..b96afe1 100644 --- a/tests/assert_f_orders_stats_num_orders.sql +++ b/tests/assert_f_orders_stats_num_orders.sql @@ -1,4 +1,4 @@ -SELECT - (sum(num_orders) = 1500000) AS assert -FROM {{ ref('f_orders_stats') }} -HAVING assert NOT IN (1) +SELECT + (sum(num_orders) = 1500000) AS assert +FROM {{ ref('f_orders_stats') }} +HAVING assert NOT IN (1) diff --git a/tests/assert_f_orders_stats_rowcount.sql b/tests/assert_f_orders_stats_rowcount.sql index 44e57bf..a547217 100644 --- a/tests/assert_f_orders_stats_rowcount.sql +++ b/tests/assert_f_orders_stats_rowcount.sql @@ -1,4 +1,4 @@ -SELECT - (count(*) = 45) AS assert -FROM {{ ref('f_orders_stats') }} -HAVING assert NOT IN (1) +SELECT + (count(*) = 45) AS assert +FROM {{ ref('f_orders_stats') }} +HAVING assert NOT IN (1) diff --git a/variables.tf b/variables.tf index d32f88b..e1b7f0e 100644 --- a/variables.tf +++ b/variables.tf @@ -1,13 +1,13 @@ -variable "clickhouse_password" { - description = "Clickhouse admin password" - type = string - sensitive = true -} - -# data "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { -# name = "clickhouse_starschema" -# } - -output "clickhouse_host_fqdn" { - value = resource.yandex_mdb_clickhouse_cluster.clickhouse_starschema.host[0].fqdn -} +variable "clickhouse_password" { + description = "Clickhouse admin password" + type = string + sensitive = true +} + +# data "yandex_mdb_clickhouse_cluster" "clickhouse_starschema" { +# name = "clickhouse_starschema" +# } + +output "clickhouse_host_fqdn" { + value = resource.yandex_mdb_clickhouse_cluster.clickhouse_starschema.host[0].fqdn +}