terraform-provider-databricks
terraform-provider-databricks copied to clipboard
add support for gcp network info block
- [ ] create doc updates/guide updates
- [ ] run acceptance tests for aws
- [ ] test creating mws for aws with 1.0.2 and then upgrade and see impact on previous state
- [x] unit tests
Attempts to resolve #1393
byovpc example:
resource "google_compute_network" "dbx_private_vpc" {
project = var.google_project
name = "sri-tf-network"
auto_create_subnetworks = false
# mtu = 1460
}
resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" {
name = "test-dbx"
ip_cidr_range = "10.0.0.0/16"
region = "us-central1"
network = google_compute_network.dbx_private_vpc.id
secondary_ip_range {
range_name = "pods"
ip_cidr_range = "10.1.0.0/16"
}
secondary_ip_range {
range_name = "svc"
ip_cidr_range = "10.2.0.0/20"
}
}
resource "databricks_mws_networks" "this" {
provider = databricks.accounts
account_id = var.databricks_account_id
network_name = "sri-test-fs-demo"
gcp_network_info {
network_project_id = var.google_project
vpc_id = google_compute_network.dbx_private_vpc.name
subnet_id = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
subnet_region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
pod_ip_range_name = "pods"
service_ip_range_name = "svc"
}
}
Codecov Report
Merging #1479 (fbb2d12) into master (ccf3099) will decrease coverage by
0.03%. The diff coverage is73.91%.
Additional details and impacted files
@@ Coverage Diff @@
## master #1479 +/- ##
==========================================
- Coverage 90.02% 89.98% -0.04%
==========================================
Files 135 135
Lines 10836 10859 +23
==========================================
+ Hits 9755 9772 +17
- Misses 692 696 +4
- Partials 389 391 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| mws/resource_mws_workspaces.go | 90.15% <ø> (ø) |
|
| common/reflect_resource.go | 90.09% <66.66%> (-1.04%) |
:arrow_down: |
| mws/resource_mws_networks.go | 83.60% <100.00%> (+1.46%) |
:arrow_up: |
Thank you for the example, will also add the BYOVPC to integration testing infra.
@stikkireddy could you also remove TEST_PREFIX env variable in the other gcp test? =)
@stikkireddy / @nfx is this still active?
@stikkireddy any updates from GCP team?
okay, we can live without full "read" implementation, so that we can release this faster
I can pick this up next week and ignore the changes
@nfx please close this PR i am submitting another smaller PR. Eng has resolved the drift issue please close this for preference of managing the changes at #1748
@stikkireddy i think you can close the PR yourself if needed ;)