Altinity / terraform-provider-altinitycloud

Terraform provider for Altinity.Cloud ☁️
https://registry.terraform.io/providers/altinity/altinitycloud/latest/docs
Apache License 2.0
7 stars 0 forks source link

resources are provisioned in default region/zones when none/wrong values are provided #79

Closed Elmo33 closed 3 months ago

Elmo33 commented 3 months ago

my resource config:

resource "altinitycloud_env_aws" "this" {
  name = "altinity-byoc-region-zones-108a4f47"
  cidr = "10.1.0.0/21"
  region = ""
  aws_account_id = "260067921775"
  zones = ["bla"]
  load_balancers = {"public": {"enabled": true}}
  node_groups = [{"capacity_per_zone": 6, "name": "t4g.large", "node_type": "t4g.large", "reservations": ["CLICKHOUSE", "SYSTEM", "ZOOKEEPER"], "zones": ["us-west-1a", "us-west-1b"]}]
  cloud_connect = true
  force_destroy = true
  force_destroy_clusters = true
  depends_on = [module.altinitycloud_connect_aws]
}

the output of the resources that will be provisioned:

# module.altinitycloud_connect_aws.aws_subnet.this[0] will be created
  + resource "aws_subnet" "this" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-1a"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.1.0/24"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = (known after apply)
      + tags_all                                       = (known after apply)
      + vpc_id                                         = (known after apply)
    }

  # module.altinitycloud_connect_aws.aws_subnet.this[1] will be created
  + resource "aws_subnet" "this" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-1b"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.2.0/24"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = (known after apply)
      + tags_all                                       = (known after apply)
      + vpc_id                                         = (known after apply)
    }

  # module.altinitycloud_connect_aws.aws_subnet.this[2] will be created
  + resource "aws_subnet" "this" {
      + arn                                            = (known after apply)
      + assign_ipv6_address_on_creation                = false
      + availability_zone                              = "us-east-1c"
      + availability_zone_id                           = (known after apply)
      + cidr_block                                     = "10.0.3.0/24"
      + enable_dns64                                   = false
      + enable_resource_name_dns_a_record_on_launch    = false
      + enable_resource_name_dns_aaaa_record_on_launch = false
      + id                                             = (known after apply)
      + ipv6_cidr_block_association_id                 = (known after apply)
      + ipv6_native                                    = false
      + map_public_ip_on_launch                        = true
      + owner_id                                       = (known after apply)
      + private_dns_hostname_type_on_launch            = (known after apply)
      + tags                                           = (known after apply)
      + tags_all                                       = (known after apply)
      + vpc_id                                         = (known after apply)
    }

us-east-1 and its zones came from nowhere.

ianaya89 commented 3 months ago

Unrelated