-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
45 lines (39 loc) · 1.37 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ---------------------------------------------------------------------------------------------------------------------
# Create core Anyscale v2 Stack with existing VPC (Public Subnets)
# Creates a v2 stack including
# - IAM Roles
# - S3 Bucket
# - Custom tags for the S3 bucket
# - VPC Security Groups
# - EFS
# ---------------------------------------------------------------------------------------------------------------------
locals {
full_tags = merge(tomap({
anyscale-cloud-id = var.anyscale_cloud_id,
anyscale-deploy-environment = var.anyscale_deploy_env
}),
var.tags
)
}
module "aws_anyscale_v2_existing_vpc" {
source = "../../" #this should be changed if executing this example outside of this repository
tags = local.full_tags
anyscale_deploy_env = var.anyscale_deploy_env
anyscale_cloud_id = var.anyscale_cloud_id
# VPC Related
existing_vpc_id = var.existing_vpc_id
existing_vpc_subnet_ids = var.existing_subnet_ids
# Security Group Related
security_group_ingress_allow_access_from_cidr_range = var.customer_ingress_cidr_ranges
anyscale_s3_tags = {
"resource_tag_test" : true,
"s3_tagging" : var.s3_tag_value
}
# Optionally, the following create VPC endpoints for S3 in the existing VPC
anyscale_gateway_vpc_endpoints = {
"s3" = {
name = "s3"
policy = null
}
}
}