Skip to content

Commit d1ac73a

Browse files
authored
Merge pull request #9 from tomarv2/updates
upgrading module to work with databricks version 0.3.3
2 parents 1cfcbb2 + 8cef470 commit d1ac73a

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
## Versions
3838

3939
- Module tested for Terraform 0.14.
40-
- `databrickslabs/databricks` provider version [0.3.1](https://registry.terraform.io/providers/databrickslabs/databricks/latest)
41-
- AWS provider version [3.29.0](https://registry.terraform.io/providers/hashicorp/aws/latest)
40+
- `databrickslabs/databricks` provider version [0.3.3](https://registry.terraform.io/providers/databrickslabs/databricks/latest)
41+
- AWS provider version [3.30](https://registry.terraform.io/providers/hashicorp/aws/latest)
4242
- `main` branch: Provider versions not pinned to keep up with Terraform releases
4343
- `tags` releases: Tags are pinned with versions (use <a href="https://github.com/tomarv2/terraform-databricks-aws-workspace/tags" alt="GitHub tag">
4444
<img src="https://img.shields.io/github/v/tag/tomarv2/terraform-databricks-aws-workspace" /></a> in your releases)
@@ -103,6 +103,7 @@ module "databricks_workspace" {
103103
source = "git::git@github.com:tomarv2/terraform-databricks-aws-workspace.git"
104104
105105
profile_for_iam = "iam-admin"
106+
aws_region = "us-east-2"
106107
databricks_account_username = "example@example.com"
107108
databricks_account_password = "sample123!"
108109
databricks_account_id = "1234567-1234-1234-1234-1234567"
@@ -115,6 +116,10 @@ module "databricks_workspace" {
115116

116117
Please refer to examples directory [link](examples) for references.
117118

119+
## Coming up:
120+
121+
- Use [Customer Managed VPC](https://docs.databricks.com/administration-guide/cloud-configurations/aws/customer-managed-vpc.html)
122+
118123
## Troubleshooting:
119124

120125
### IAM policy error

examples/sample/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module "databricks_workspace" {
22
source = "../../"
33

44
profile_for_iam = "iam-admin"
5+
aws_region = "us-east-2"
56
databricks_account_username = "example@example.com"
67
databricks_account_password = "sample123!"
78
databricks_account_id = "1234567-1234-1234-1234-1234567"

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module "vpc" {
22
source = "git::git@github.com:tomarv2/terraform-aws-vpc.git?ref=v0.0.1"
33

4+
aws_region = var.aws_region
45
# -----------------------------------------
56
# Do not change the teamid, prjid once set.
67
teamid = var.teamid
@@ -24,7 +25,7 @@ module "iam_policies" {
2425

2526
profile_to_use = local.profile_to_use
2627
role_name = module.iam_role.iam_role_name
27-
policy_json = data.databricks_aws_crossaccount_policy.cross_account_iam_policy.json
28+
policy = data.databricks_aws_crossaccount_policy.cross_account_iam_policy.json
2829
inline_policy = true
2930
# -----------------------------------------
3031
# Do not change the teamid, prjid once set.
@@ -33,8 +34,9 @@ module "iam_policies" {
3334
}
3435

3536
module "s3" {
36-
source = "git::git@github.com:tomarv2/terraform-aws-s3.git?ref=v0.0.1"
37+
source = "git::git@github.com:tomarv2/terraform-aws-s3.git?ref=v0.0.2"
3738

39+
aws_region = var.aws_region
3840
# -----------------------------------------
3941
# Do not change the teamid, prjid once set.
4042
teamid = var.teamid

outputs.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,15 @@ output "workspace_url" {
7272
description = "databricks workspace url"
7373
value = databricks_mws_workspaces.this
7474
}
75+
76+
/*
77+
output "pat_token" {
78+
description = "databricks pat"
79+
value = databricks_token.pat.connection
80+
}
81+
82+
output "pat_token_duration" {
83+
description = "databricks pat"
84+
value = databricks_token.pat.lifetime_seconds
85+
}
86+
*/

pat_token.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Create PAT token to provision entities within workspace
22
https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs/resources/token
3-
4-
resource "databricks_token" "dapi" {
3+
*/
4+
resource "databricks_token" "pat" {
55
provider = databricks.created_workspace
66
comment = "Terraform managed: ${var.teamid}-${var.prjid}"
77
lifetime_seconds = 86400
88
}
9-
*/
9+

versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ terraform {
77
required_version = ">= 0.14"
88
required_providers {
99
aws = {
10-
version = "~> 3.29"
10+
version = "~> 3.30"
1111
}
1212
databricks = {
1313
source = "databrickslabs/databricks"
14-
version = "0.3.1"
14+
version = "0.3.3"
1515
}
1616
random = {
1717
version = "~> 3.1"

0 commit comments

Comments
 (0)