-
Notifications
You must be signed in to change notification settings - Fork 215
internal: split resources.yml into one file per resource #6334
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
Open
denik
wants to merge
3
commits into
main
Choose a base branch
from
denik/split-resources-yml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| *.generated.yml linguist-generated=true | ||
| *.generated.yaml linguist-generated=true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| provided_id_fields: | ||
| - field: name | ||
| reason: id_field | ||
| backend_defaults: | ||
| # Backend sets it "MEDIUM" when not specified in the config | ||
| - field: compute_size | ||
| # Backend enables token forwarding and reports true even when the config omits it, | ||
| # so an omitted field would otherwise plan an update on every deploy. An explicit | ||
| # value in the config still diffs normally. | ||
| - field: forward_user_access_token | ||
| # lifecycle.started is derived from remote compute status in RemapState, so the | ||
| # remote side always has a value. When the user omits lifecycle from config, | ||
| # both old and new are nil and backend_defaults correctly skips the remote value. | ||
| # When the user explicitly sets lifecycle.started, old/new are non-nil and normal | ||
| # drift detection applies (e.g. detecting out-of-band stop). | ||
| - field: lifecycle | ||
| - field: lifecycle.started | ||
| ignore_remote_changes: | ||
| - field: space # This field is not yet supported by Update APIs but exposed in the API spec. TODO: fix when update APIs supports it. | ||
| reason: managed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| recreate_on_changes: | ||
| - field: storage_root | ||
| reason: immutable | ||
| - field: connection_name | ||
| reason: immutable | ||
| - field: provider_name | ||
| reason: immutable | ||
| - field: share_name | ||
| reason: immutable | ||
| updatable_id_fields: | ||
| - field: name | ||
| reason: id_changes | ||
| backend_defaults: | ||
| # UC auto-populates unity.catalog.managed.<format>.defaults.* keys after create. | ||
| - field: properties['unity.catalog.managed.*.defaults.*'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| ignore_remote_changes: | ||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L361-L363 | ||
| # s.SchemaPath("aws_attributes").SetSuppressDiff() | ||
| # s.SchemaPath("azure_attributes").SetSuppressDiff() | ||
| # s.SchemaPath("gcp_attributes").SetSuppressDiff() | ||
| - field: aws_attributes | ||
| reason: managed | ||
| - field: azure_attributes | ||
| reason: managed | ||
| - field: gcp_attributes | ||
| reason: managed | ||
| backend_defaults: | ||
| # lifecycle.started is derived from remote cluster state in RemapState, so the | ||
| # remote side always has a value. When the user omits lifecycle from config, | ||
| # both old and new are nil and backend_defaults correctly skips the remote value. | ||
| # When the user explicitly sets lifecycle.started, old/new are non-nil and normal | ||
| # drift detection applies (e.g. detecting out-of-band terminate). | ||
| - field: lifecycle | ||
| - field: lifecycle.started | ||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L331 | ||
| # s.SchemaPath("enable_elastic_disk").SetComputed() | ||
| - field: enable_elastic_disk | ||
|
|
||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L332 | ||
| # s.SchemaPath("enable_local_disk_encryption").SetComputed() | ||
| - field: enable_local_disk_encryption | ||
|
|
||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L333 | ||
| # s.SchemaPath("node_type_id").SetComputed() | ||
| - field: node_type_id | ||
|
|
||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L334 | ||
| # s.SchemaPath("driver_node_type_id").SetComputed() | ||
| - field: driver_node_type_id | ||
|
|
||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L335 | ||
| # s.SchemaPath("driver_instance_pool_id").SetComputed() | ||
| - field: driver_instance_pool_id | ||
|
|
||
| # Terraform currently does not do this, but it is a field with backend default. | ||
| # See https://github.com/databricks/cli/issues/4418 | ||
| - field: single_user_name | ||
|
|
||
| # We have custom handler for this in cluster.go | ||
| # https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/clusters/resource_cluster.go#L109-L118 | ||
| # DataSecurityModeDiffSuppressFunc: suppress when old != "" && new == "" | ||
| #- field: data_security_mode |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The .yml vs .yaml nuance is lost on me. Can we move these per-type configs into a subdir?