Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/e2e/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ runs:
name: Upgrade test - Run terraform using latest stable version
run: |
git checkout tags/${{ steps.get_latest_stable_release.outputs.tag }}
git checkout main -- .github/
if [ $(find examples/full/${{ inputs.test_name }}/${{ inputs.cloud_provider }} -name "*.tf" -type f 2>/dev/null | wc -l) -gt 0 ]
then
echo "::group::Run terraform using latest stable version"
else
echo "::group::Skipping upgrade E2E test as it does not exist for cloud provider ${{ inputs.cloud_provider }} and version ${{ steps.get_latest_stable_release.outputs.tag }}"
echo "SKIP_E2E_TEST=true" >> "$GITHUB_ENV"
git checkout ${{ github.ref }}
exit 0
fi
cd "examples/full/${{ inputs.test_name }}/${{ inputs.cloud_provider }}"
Expand All @@ -197,6 +197,8 @@ runs:
terraform plan -no-color -var-file=variables.tfvars
terraform apply -no-color -auto-approve -var-file=variables.tfvars

git checkout ${{ github.ref }}

echo "::endgroup::"

- shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/import/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ runs:
- shell: bash
name: Terraform destroy
env:
resource_type: ${{ inputs.resource_type }}
api_url: ${{inputs.api_url}}
RESOURCE_TYPE: ${{ inputs.resource_type }}
API_URL: ${{inputs.api_url}}
run: |
./.github/actions/import/import.sh
4 changes: 2 additions & 2 deletions examples/full/basic/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "service_name" {
default = "My Terraform Service"
}

variable "location" {
variable "region" {
type = string
default = "westus3"
}
Expand All @@ -37,7 +37,7 @@ data "clickhouse_api_key_id" "self" {
resource "clickhouse_service" "service" {
name = var.service_name
cloud_provider = "azure"
region = var.location
region = var.region
release_channel = var.release_channel
idle_scaling = true
idle_timeout_minutes = 5
Expand Down
11 changes: 6 additions & 5 deletions examples/full/private_endpoint/azure/azure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ locals {
tags = {
Name = var.service_name
}
resource_group_name = replace(var.service_name, "/\\[|\\]/", "")
}

resource "azurerm_resource_group" "this" {
name = var.service_name
location = var.location
name = local.resource_group_name
location = var.region
tags = local.tags
}

resource "azurerm_virtual_network" "this" {
name = var.service_name
address_space = ["10.0.0.0/16"]
location = var.location
location = var.region
resource_group_name = azurerm_resource_group.this.name
tags = local.tags
}
Expand All @@ -42,7 +43,7 @@ resource "azurerm_subnet" "this" {

resource "azurerm_private_endpoint" "this" {
name = var.service_name
location = var.location
location = var.region
resource_group_name = azurerm_resource_group.this.name
subnet_id = azurerm_subnet.this.id

Expand All @@ -58,7 +59,7 @@ resource "azurerm_private_endpoint" "this" {

resource "azurerm_network_security_group" "this" {
name = var.service_name
location = var.location
location = var.region
resource_group_name = azurerm_resource_group.this.name
tags = local.tags
}
Expand Down
4 changes: 2 additions & 2 deletions examples/full/private_endpoint/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ variable "service_name" {
type = string
}

variable "location" {
variable "region" {
type = string
default = "westus3"
}

resource "clickhouse_service" "this" {
name = var.service_name
cloud_provider = "azure"
region = var.location
region = var.region
idle_scaling = true
idle_timeout_minutes = 5
password_hash = "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=" # base64 encoded sha256 hash of "test"
Expand Down
Loading