diff --git a/README.md b/README.md index 783ffdf..698e80b 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,42 @@ ## AWS Databricks -The module can deploy an Intel Optimized AWS Databricks Workspace and Cluster. Instance Selection and Intel Optimizations have been defaulted in the code. +The module can deploy an Intel Optimized AWS Databricks Workspace. **Learn more about optimizations :** +## Performance Data -[Databricks Photon using AWS i4i](https://www.databricks.com/blog/2022/09/13/faster-insights-databricks-photon-using-aws-i4i-instances-latest-intel-ice-lake) +
+
+
+
+
+
+
+
+
+
+
+
+
{| no | | [prefix](#input\_prefix) | Prefix that will be added to all resources that are created | `string` | `null` | no | | [region](#input\_region) | AWS Region that will be used as a part of the deployment | `string` | `"us-east-2"` | no | | [s3\_bucket\_acl](#input\_s3\_bucket\_acl) | ACL that will be attached to the S3 bucket (if created) during the provisioning process. | `string` | `"private"` | no | diff --git a/images/aws-dbx-1.png b/images/aws-dbx-1.png new file mode 100644 index 0000000..c5608db Binary files /dev/null and b/images/aws-dbx-1.png differ diff --git a/images/aws-dbx-2.png b/images/aws-dbx-2.png new file mode 100644 index 0000000..8698d3b Binary files /dev/null and b/images/aws-dbx-2.png differ diff --git a/main.tf b/main.tf index e499e9c..cadeb23 100644 --- a/main.tf +++ b/main.tf @@ -4,6 +4,12 @@ resource "random_string" "naming" { length = 6 } +locals { + + #If the enable_intel_tags is true, then additional Intel tags will be added to the resources created + tags = var.enable_intel_tags ? merge(var.intel_tags, var.tags) : var.tags +} + ############################## Credentials Config ################################### data "databricks_aws_assume_role_policy" "rp" { @@ -35,7 +41,7 @@ resource "aws_iam_role" "ir" { count = var.create_aws_account_role ? 1 : 0 name = var.prefix != null ? "${var.prefix}-${random_string.naming.result}-${var.aws_cross_account_role_name}" : "${var.aws_cross_account_role_name}" assume_role_policy = data.databricks_aws_assume_role_policy.rp.json - tags = var.tags + tags = local.tags } resource "databricks_mws_credentials" "cr" { @@ -60,7 +66,7 @@ resource "aws_s3_bucket" "rsb" { bucket = var.prefix != null ? "${var.prefix}-${random_string.naming.result}-${var.bucket_name}" : "${random_string.naming.result}-${var.bucket_name}" force_destroy = var.s3_bucket_force_destroy acl = var.s3_bucket_acl - tags = merge(var.tags, { + tags = merge(local.tags, { Name = var.prefix != null ? "${var.prefix}-${random_string.naming.result}-${var.bucket_name}" : "${random_string.naming.result}-${var.bucket_name}" }) } diff --git a/variables.tf b/variables.tf index 8783945..6ff05cf 100644 --- a/variables.tf +++ b/variables.tf @@ -57,6 +57,21 @@ variable "tags" { default = {} } +variable "enable_intel_tags" { + type = bool + default = true + description = "If true adds additional Intel tags to resources" +} + +variable "intel_tags" { + default = { + intel-registry = "https://registry.terraform.io/namespaces/intel" + intel-module = "terraform-intel-aws-databricks-workspace" + } + type = map(string) + description = "Intel Tags" +} + variable "region" { type = string description = "AWS Region that will be used as a part of the deployment"
"intel-module": "terraform-intel-aws-databricks-workspace",
"intel-registry": "https://registry.terraform.io/namespaces/intel"
}