Skip to content

[Feature] Add TF support for setting DisableLegacyFeatures #4676

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

Merged
merged 5 commits into from
May 7, 2025

Conversation

EmanueleFWM
Copy link
Contributor

Changes

This PR adds TF support for the DisableLegacyFeatures account level setting.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework

@EmanueleFWM EmanueleFWM marked this pull request as ready for review April 25, 2025 13:19
@EmanueleFWM EmanueleFWM requested review from a team as code owners April 25, 2025 13:19
@EmanueleFWM EmanueleFWM requested review from renaudhartert-db and removed request for a team April 25, 2025 13:19
@EmanueleFWM
Copy link
Contributor Author

EmanueleFWM commented Apr 25, 2025

This is for an account level setting, when this setting is toggled any new workspace that is created will have the disable_legacy_access and disable_legacy_dbfs workspace level settings turned on (but it does not overwrite the workspace level setting, i.e. you could still turn either of these two setting back off at the workspace level later)

@alexott
Copy link
Contributor

alexott commented Apr 25, 2025

There is a configuration drift that causes failure:

Error: -25T17:10:49.374Z [ERROR] sdk.helper_resource: Unexpected error:
  error=
  | After applying this test step, the non-refresh plan was not empty.
  | stdout:
  | 
  | 
  | Terraform used the selected providers to generate the following execution
  | plan. Resource actions are indicated with the following symbols:
  |   ~ update in-place
  | 
  | Terraform will perform the following actions:
  | 
  |   # databricks_disable_legacy_features_setting.this will be updated in-place
  |   ~ resource "databricks_disable_legacy_features_setting" "this" {
  |       - etag         = "ACi1L_0ASCQEADJIHR9QpeYBZJMJUHVhyKZtOkUSTdWb9qfF6kXMitMtnjUBSHpJG2v9-Zm08rscUBvPPl1T50fk_wIDBdI7wLXtkZ_X0if7dP0NJCwQkhyusnWkw4OEtefLLYRbrqh22BSLy6IgdKYaMkZJMM2QWHrrey1AB6RAAQMAHEXkrIT4S2YKCgEAAA==" -> null
  |         id           = "global"
  |       - setting_name = "default" -> null
  | 
  |         # (1 unchanged block hidden)
  |     }
  | 
  | Plan: 0 to add, 1 to change, 0 to destroy.

@EmanueleFWM
Copy link
Contributor Author

There seems to be a bug, for account level settings if a customizeSchemaFunc is provided the default customization (setting etag and setting name to Computed) is not applied, see difference between here (workspace setting) and here (account setting)

Should I make a separate PR for the fix?

@alexott
Copy link
Contributor

alexott commented Apr 25, 2025

it's ok to fix in this PR

@EmanueleFWM
Copy link
Contributor Author

fixed, should work now

@alexott alexott temporarily deployed to test-trigger-is May 5, 2025 07:39 — with GitHub Actions Inactive
@EmanueleFWM
Copy link
Contributor Author

@alexott any updates oh this PR? any changes still needed from my side?

Copy link

github-actions bot commented May 7, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4676
  • Commit SHA: 9046f41c2993e8c4fec5fa07eb9f7787a703a15d

Checks will be approved automatically on success.

@alexott alexott temporarily deployed to test-trigger-is May 7, 2025 12:59 — with GitHub Actions Inactive
@alexott alexott enabled auto-merge May 7, 2025 13:24
@alexott alexott added this pull request to the merge queue May 7, 2025
Merged via the queue into databricks:main with commit f5509c9 May 7, 2025
12 checks passed
deco-sdk-tagging bot added a commit that referenced this pull request May 8, 2025
## Release v1.77.0

### New Features and Improvements

 * Add `databricks_disable_legacy_features_setting` account-level resource ([#4676](#4676))
 * Update Databricks SDK to v0.68.0 ([#4694](#4694)).

### Documentation

 * Document minimum required Terraform version as 1.1.5 ([#4683](#4683)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants