-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated databricks_ip_access_list
resource to Go SDK
#2306
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2306 +/- ##
==========================================
- Coverage 88.67% 88.58% -0.10%
==========================================
Files 140 140
Lines 11551 11546 -5
==========================================
- Hits 10243 10228 -15
- Misses 874 879 +5
- Partials 434 439 +5
|
common.DataToStructPointer(d, s, &iacl) | ||
return NewIPAccessListsAPI(ctx, c).Update(d.Id(), iacl) | ||
iacl.IpAccessListId = d.Id() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do this because Update call doesn't take id so we have to pass it through the resource data.
Any reason why we don't pass id through the Update method call?
TestingIpAddresses = []string{"1.2.3.4", "1.2.4.0/24"} | ||
TestingIpAddressesState = []any{"1.2.3.4", "1.2.4.0/24"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename this (IP -> Ip) as well for consistency (although not required)
UpdatedAt: 87939234, | ||
UpdatorUserID: 1234556, | ||
Enabled: TestingEnabled, | ||
Method: http.MethodPatch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put -> Patch because: https://docs.databricks.com/api-explorer/workspace/ipaccesslists/update update uses PATCH. Can this be breaking for customers? Also why was put using query parameters earlier (wasn't taking expected request)? Should put use body?
Label string `json:"label"` | ||
ListType string `json:"list_type"` | ||
IPAddresses []string `json:"ip_addresses"` | ||
Enabled bool `json:"enabled,omitempty" tf:"default:true"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all these are same, I don't think updates is needed in docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for code, make PR title changelog-friendly
databricks_ip_access_list
Resource to Go SDK
databricks_ip_access_list
Resource to Go SDKdatabricks_ip_access_list
resource to Go SDK
* **Removed support for releasing 32-bit binaries** ([#2315](#2315), [#2320](#2320)). * Added more information on impact of using a cluster policy in [databricks_cluster](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/cluster) resource ([#2313](#2313)). * Added missing `serverless` option to [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) ([#2308](#2308)). * Updated `channel` and `edition` values in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) docs ([#2322](#2322)). * Automatically add `CAN_MANAGE` permission on [databricks_instance_pool](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/instance_pool) for calling user ([#2298](#2298)). * Migrated [databricks_ip_access_list](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/ip_access_list) resource to Go SDK ([#2306](#2306)). Updated dependency versions: * Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 ([#2317](#2317)). * Bump github.com/databricks/databricks-sdk-go from v0.8.1 to v0.9.0 ([#2327](#2327)).
Changes
Tests
make test
run locallydocs/
folderinternal/acceptance
Integration test: internal/acceptance/ip_access_list_test.go. Full integration test suite is also running successfully.