Skip to content

Commit a7d6ccf

Browse files
authored
chore: make instance type as variable (#8)
1 parent b49d7f2 commit a7d6ccf

File tree

4 files changed

+36
-12
lines changed

4 files changed

+36
-12
lines changed

examples/aws-project-byoc-standard/main.tf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ module "aws_iam" {
2020
module "aws_vpc" {
2121
source = "../../modules/aws_vpc"
2222

23-
aws_region = var.aws_region
24-
vpc_cidr = var.vpc_cidr
25-
name = var.name
23+
aws_region = var.aws_region
24+
vpc_cidr = var.vpc_cidr
25+
name = var.name
2626
enable_private_link = var.enable_private_link
2727
}
2828

@@ -34,8 +34,8 @@ resource "zillizcloud_byoc_project" "this" {
3434
region = "aws-${var.aws_region}"
3535

3636
network = {
37-
vpc_id = module.aws_vpc.vpc_id
38-
subnet_ids = module.aws_vpc.subnet_ids
37+
vpc_id = module.aws_vpc.vpc_id
38+
subnet_ids = module.aws_vpc.subnet_ids
3939
security_group_ids = [module.aws_vpc.sg_id]
4040
vpc_endpoint_id = var.enable_private_link ? module.aws_vpc.vpc_endpoint : null
4141
}
@@ -49,9 +49,9 @@ resource "zillizcloud_byoc_project" "this" {
4949
}
5050

5151
instances = {
52-
core_vm = "m6i.2xlarge"
53-
fundamental_vm = "m6i.2xlarge"
54-
search_vm = "m6id.2xlarge"
52+
core_vm = var.core_instance_type
53+
fundamental_vm = var.fundamental_instance_type
54+
search_vm = var.search_instance_type
5555
}
5656
}
5757
}
@@ -86,7 +86,7 @@ output "storage_role_arn" {
8686

8787
output "external_id" {
8888
value = module.aws_iam.external_id
89-
89+
9090
}
9191

9292
output "project_id" {

examples/aws-project-byoc-standard/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ terraform {
1414
}
1515

1616
provider "aws" {
17-
region = var.aws_region
17+
region = var.aws_region
1818
}
1919

2020
provider "zillizcloud" {
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
2-
"aws_region": "us-west-2",
3-
"vpc_cidr": "10.0.0.0/16",
42
"name": "zilliz-byoc-standard",
3+
4+
"aws_region": "us-west-2",
5+
"vpc_cidr": "10.0.0.0/16",
6+
7+
"core_instance_type": "m6i.2xlarge",
8+
"fundamental_instance_type": "m6i.2xlarge",
9+
"search_instance_type": "m6id.2xlarge",
10+
511
"enable_private_link": false
612
}

examples/aws-project-byoc-standard/variables.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,21 @@ variable "enable_private_link" {
3131
type = bool
3232
default = false
3333
}
34+
35+
variable "core_instance_type" {
36+
description = "Instance type for core VM"
37+
type = string
38+
default = "m6i.2xlarge"
39+
}
40+
41+
variable "fundamental_instance_type" {
42+
description = "Instance type for fundamental VM"
43+
type = string
44+
default = "m6i.2xlarge"
45+
}
46+
47+
variable "search_instance_type" {
48+
description = "Instance type for search VM"
49+
type = string
50+
default = "m6id.2xlarge"
51+
}

0 commit comments

Comments
 (0)