Skip to content

Latest commit

 

History

History

anyscale-v2-existing-vpc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Anyscale Networking Stack v2 - Existing VPC

This example will build the resources necessary to run Anyscale in an AWS account. This example utilizes an existing VPC. It will not build VPC Endpoints (please see the anyscale-v2-createendpoints example for that solution]). It will create a security group in the existing VPC.

Using with Anyscale CLI

The outputs from this Terraform can be used to build an anyscale cloud with the anyscale CLI. To use:

  1. Make sure you have the latest Anyscale CLI installed pip install anyscale --upgrade
  2. The terraform output, anyscale_register_command will provide an example Anyscale CLI command that can be used to register an Anyscale Cloud. You will need to change <CUSTOMER_DEFINED_NAME> to a cloud name that you would like to use.

example:

anyscale cloud register --provider aws \
  --name <CUSTOMER_DEFINED_NAME> \
  --region <VPC_REGION> \
  --vpc-id <VPC ID FROM Outputs> \
  --subnet-ids <SUBNET_ID1>,<SUBNET_ID2>,<SUBNET_ID3>,<SUBNET_ID4> \
  --efs-id <FILE_SYSTEM_ID> \
  --anyscale-iam-role-id <ANYSCALE_IAM_ROLE_ARN> \
  --instance-iam-role-id <INSTANCE_IAM_ROLE_ARN> \
  --security-group-ids <SECURITY_GROUP_ID> \
  --s3-bucket-id <S3_BUCKET_NAME>

anyscale cloud verify --name <CUSTOMER_DEFINED_NAME>
anyscale cloud delete --name <CUSTOMER_DEFINED_NAME>

Requirements

Name Version
terraform >= 1.0
aws ~> 5.0

Providers

No providers.

Modules

Name Source Version
aws_anyscale_v2_existing_vpc ../../ n/a

Resources

No resources.

Inputs

Name Description Type Default Required
aws_region The AWS region in which all resources will be created. string n/a yes
customer_ingress_cidr_ranges The IPv4 CIDR block that is allowed to access the clusters.
This provides the ability to lock down the v1 stack to just the public IPs of a corporate network.
This is added to the security group and allows port 443 (https) and 22 (ssh) access.
ex: 52.1.1.23/32,10.1.0.0/16'<br>
string n/a yes
existing_subnet_ids (Required) Existing Subnet IDs.
The IDs of existing subnets to use. This should not be the entire ARN of the subnet, just the ID.
These subnets should be in the existing_vpc_id.
ex:
existing_subnet_ids = ["subnet-1234567890", "subnet-0987654321"]
list(string) n/a yes
existing_vpc_id (Required) Existing VPC ID.
The ID of an existing VPC to use. This should not be the entire ARN of the VPC, just the ID.
ex:
existing_vpc_id = "vpc-1234567890"
string n/a yes
s3_tag_value This is used to set the S3 tag value for testing purposes string n/a yes
anyscale_cloud_id (Optional) Anyscale Cloud ID. Default is null. string null no
anyscale_deploy_env (Optional) Anyscale deploy environment. Used in resource names and tags. string "production" no
tags (Optional) A map of tags to all resources that accept tags. map(string)
{
"environment": "test",
"test": true
}
no

Outputs

Name Description
anyscale_register_command Anyscale register command.
This output can be used with the Anyscale CLI to register a new Anyscale Cloud.
You will need to replace <CUSTOMER_DEFINED_NAME> with a name of your choosing before running the Anyscale CLI command.
anyscale_v2_efs_id Anyscale Elastic File System ID.
anyscale_v2_iam_instance_role_arn Anyscale IAM instance role arn.
anyscale_v2_iam_role_arn Anyscale IAM access role arn.
anyscale_v2_s3_bucket_id Anyscale S3 Bucket ID. If a bucket was not created, return an empty string.
anyscale_v2_security_group_id Anyscale Security Group ID. If a security group was not created, return an empty string.