-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathproviders.tf
48 lines (40 loc) · 913 Bytes
/
providers.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
46
47
48
terraform {
required_version = ">= 1.0.1"
required_providers {
aws = {
version = "~> 3.63"
}
databricks = {
source = "databrickslabs/databricks"
version = "0.5.1"
}
random = {
version = "~> 3.1"
}
time = {
version = "~> 0.7"
}
}
}
provider "aws" {
region = var.region
profile = var.profile
}
provider "aws" {
alias = "iam-management"
region = var.region
profile = local.profile
}
# initialize provider in "MWS" mode to provision new workspace
provider "databricks" {
alias = "mws"
host = var.databricks_hostname
username = var.databricks_account_username
password = var.databricks_account_password
}
# initialize provider in normal mode
provider "databricks" {
# in normal scenario you won't have to give providers aliases
alias = "created_workspace"
host = databricks_mws_workspaces.this.workspace_name
}