terraform { required_providers { rubrik = { source = "rubrikinc/rubrik" version = ">= 1.0.0" } } } provider "rubrik" { credentials = "rsc.json" } variable "account_name" { type = string } variable "region" { type = string } variable "cluster_name" { type = string } variable "admin_email" { type = string } variable "admin_password" { type = string } variable "bucket_name" { type = string } variable "instance_profile_name" { type = string } variable "vpc_id" { type = string } variable "subnet_id" { type = string } variable "security_group_ids" { type = list(string) } # Look up the AWS account by name to get the RSC UUID data "rubrik_aws_account" "account" { name = var.account_name } resource "rubrik_aws_cloud_cluster" "newcluster" { cloud_account_id = data.rubrik_aws_account.account.id region = var.region use_placement_groups = true cluster_config { cluster_name = var.cluster_name admin_email = var.admin_email admin_password = var.admin_password dns_name_servers = ["8.8.8.8"] dns_search_domains = ["example.com"] ntp_servers = ["pool.ntp.org"] num_nodes = 3 bucket_name = var.bucket_name enable_immutability = true keep_cluster_on_failure = false } vm_config { cdm_version = "9.4.3-p2-31324" instance_type = "M6I_2XLARGE" instance_profile_name = var.instance_profile_name vpc_id = var.vpc_id subnet_id = var.subnet_id security_group_ids = var.security_group_ids vm_type = "EXTRA_DENSE" } }