Skip to content

Commit ac6f753

Browse files
authored
Merge pull request #23 from tomarv2/updates
enhacing vpc support
2 parents 8b9e117 + 19dc339 commit ac6f753

File tree

6 files changed

+31
-17
lines changed

6 files changed

+31
-17
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ Error: MALFORMED_REQUEST: Failed credentials validation checks: Spot Cancellatio
187187
|------|---------|
188188
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.38.0 |
189189
| <a name="provider_databricks"></a> [databricks](#provider\_databricks) | 0.3.3 |
190-
| <a name="provider_databricks.created_workspace"></a> [databricks.created\_workspace](#provider\_databricks.created\_workspace) | 0.3.3 |
191190
| <a name="provider_databricks.mws"></a> [databricks.mws](#provider\_databricks.mws) | 0.3.3 |
192191
| <a name="provider_random"></a> [random](#provider\_random) | 3.1.0 |
193192
| <a name="provider_time"></a> [time](#provider\_time) | 0.7.1 |
@@ -199,7 +198,7 @@ Error: MALFORMED_REQUEST: Failed credentials validation checks: Spot Cancellatio
199198
| <a name="module_iam_policies"></a> [iam\_policies](#module\_iam\_policies) | git::git@github.com:tomarv2/terraform-aws-iam-policies.git | v0.0.4 |
200199
| <a name="module_iam_role"></a> [iam\_role](#module\_iam\_role) | git::git@github.com:tomarv2/terraform-aws-iam-role.git//modules/iam_role_external | v0.0.4 |
201200
| <a name="module_s3"></a> [s3](#module\_s3) | git::git@github.com:tomarv2/terraform-aws-s3.git | v0.0.3 |
202-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | git::git@github.com:tomarv2/terraform-aws-vpc.git | v0.0.2 |
201+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | git::git@github.com:tomarv2/terraform-aws-vpc.git | v0.0.3 |
203202

204203
## Resources
205204

@@ -210,7 +209,6 @@ Error: MALFORMED_REQUEST: Failed credentials validation checks: Spot Cancellatio
210209
| [databricks_mws_networks.this](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/resources/mws_networks) | resource |
211210
| [databricks_mws_storage_configurations.this](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/resources/mws_storage_configurations) | resource |
212211
| [databricks_mws_workspaces.this](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/resources/mws_workspaces) | resource |
213-
| [databricks_token.pat](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/resources/token) | resource |
214212
| [random_string.naming](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource |
215213
| [time_sleep.wait](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
216214
| [databricks_aws_assume_role_policy.this](https://registry.terraform.io/providers/databrickslabs/databricks/0.3.5/docs/data-sources/aws_assume_role_policy) | data source |
@@ -222,6 +220,7 @@ Error: MALFORMED_REQUEST: Failed credentials validation checks: Spot Cancellatio
222220
| Name | Description | Type | Default | Required |
223221
|------|-------------|------|---------|:--------:|
224222
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | default aws region | `string` | `"us-west-2"` | no |
223+
| <a name="input_cidr_block"></a> [cidr\_block](#input\_cidr\_block) | The CIDR block for the VPC | `string` | `"10.4.0.0/16"` | no |
225224
| <a name="input_databricks_account_id"></a> [databricks\_account\_id](#input\_databricks\_account\_id) | External ID provided by third party. | `string` | n/a | yes |
226225
| <a name="input_databricks_account_password"></a> [databricks\_account\_password](#input\_databricks\_account\_password) | databricks account password | `string` | n/a | yes |
227226
| <a name="input_databricks_account_username"></a> [databricks\_account\_username](#input\_databricks\_account\_username) | databricks account username | `string` | n/a | yes |
@@ -244,7 +243,6 @@ Error: MALFORMED_REQUEST: Failed credentials validation checks: Spot Cancellatio
244243
| <a name="output_databricks_mws_storage_id"></a> [databricks\_mws\_storage\_id](#output\_databricks\_mws\_storage\_id) | databricks mws storage id |
245244
| <a name="output_iam_role_arn"></a> [iam\_role\_arn](#output\_iam\_role\_arn) | iam role arn |
246245
| <a name="output_inline_policy_id"></a> [inline\_policy\_id](#output\_inline\_policy\_id) | inline policy id |
247-
| <a name="output_pat_token_duration"></a> [pat\_token\_duration](#output\_pat\_token\_duration) | databricks pat |
248246
| <a name="output_s3_bucket_arn"></a> [s3\_bucket\_arn](#output\_s3\_bucket\_arn) | s3 bucket arn |
249247
| <a name="output_s3_bucket_id"></a> [s3\_bucket\_id](#output\_s3\_bucket\_id) | s3 bucket id |
250248
| <a name="output_s3_bucket_name"></a> [s3\_bucket\_name](#output\_s3\_bucket\_name) | s3 bucket name |

examples/sample/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "databricks_workspace" {
2-
source = "git::git@github.com:tomarv2/terraform-databricks-aws-workspace.git?ref=v0.0.7"
2+
source = "../../"
33

44
# NOTE: One of the below is required:
55
# - 'profile_for_iam' - for IAM creation (if none is provided 'default' is used)

examples/sample/outputs.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ output "pat_token" {
4545
description = "databricks pat"
4646
value = module.databricks_workspace.pat_token
4747
}
48-
*/
48+
4949
5050
output "pat_token_duration" {
5151
description = "databricks pat"
5252
value = module.databricks_workspace.pat_token_duration
5353
}
54+
*/

main.tf

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

4-
aws_region = var.aws_region
5-
# -----------------------------------------
4+
enable_dns_hostnames = true
5+
enable_nat_gateway = true
6+
single_nat_gateway = true
7+
one_nat_gateway_per_az = false
8+
create_igw = true
9+
default_security_group_egress = [{
10+
cidr_blocks = "0.0.0.0/0"
11+
}]
12+
13+
default_security_group_ingress = [{
14+
description = "Allow all internal TCP and UDP"
15+
self = true
16+
}]
17+
18+
public_subnets = [cidrsubnet(var.cidr_block, 3, 0)]
19+
private_subnets = [cidrsubnet(var.cidr_block, 3, 1),
20+
cidrsubnet(var.cidr_block, 3, 2)]
21+
#------------------------------------------
622
# Do not change the teamid, prjid once set.
723
teamid = var.teamid
8-
prjid = "${var.prjid}-${local.suffix}"
24+
prjid = var.prjid
925
}
1026

1127
module "iam_role" {

remote_backend.tf

Lines changed: 0 additions & 7 deletions
This file was deleted.

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,9 @@ variable "existing_role_name" {
5555
default = null
5656
type = string
5757
}
58+
59+
variable "cidr_block" {
60+
description = "The CIDR block for the VPC"
61+
default = "10.4.0.0/16"
62+
type = string
63+
}

0 commit comments

Comments
 (0)