Created
February 17, 2024 14:09
-
-
Save ianaya89/39bd2a230a125f733db5575ec6504619 to your computer and use it in GitHub Desktop.
main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
altinitycloud = { | |
source = "altinity/altinitycloud" | |
# https://github.com/altinity/terraform-provider-altinitycloud/blob/master/CHANGELOG.md | |
version = "0.1.2" | |
} | |
} | |
} | |
provider "altinitycloud" { | |
api_token = "xxx" | |
api_url = "https://anywhere.staging.altinity.cloud" | |
} | |
provider "aws" { | |
region = "us-east-1" | |
} | |
module "altinitycloud_connect_aws" { | |
source = "altinity/connect-aws/altinitycloud" | |
pem = altinitycloud_env_certificate.this.pem | |
url = "https://anywhere.staging.altinity.cloud" | |
} | |
resource "altinitycloud_env_certificate" "this" { | |
env_name = "ianaya89-staging" | |
} | |
resource "altinitycloud_env_aws" "this" { | |
name = altinitycloud_env_certificate.this.env_name | |
aws_account_id = "434208318714" | |
region = "us-east-1" | |
zones = ["us-east-1a", "us-east-1b"] | |
cidr = "10.67.0.0/21" | |
load_balancers = { | |
public = { | |
enabled = true | |
source_ip_ranges = ["0.0.0.0/0"] | |
} | |
} | |
node_groups = [ | |
{ | |
node_type = "t4g.large" | |
capacity_per_zone = 10 | |
reservations = ["SYSTEM", "ZOOKEEPER", "CLICKHOUSE"] | |
} | |
] | |
cloud_connect = true | |
depends_on = [ | |
// "depends_on" is here to enforce "this resource, then altinitycloud_connect_aws" order on destroy. | |
module.altinitycloud_connect_aws | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment