Skip to content

Commit

Permalink
Merge branch 'main' into use-tftypes-everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Dec 9, 2024
2 parents 0d49760 + fadb7c9 commit 7bd76e3
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 312 deletions.
3 changes: 0 additions & 3 deletions .codegen.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"formatter": "make fmt",
"mode": "tf_v1",
"packages": {
".codegen/model.go.tmpl": "internal/service/{{.Name}}_tf/model.go"
},
"changelog_config": ".codegen/changelog_config.yml",
"version": {
"common/version.go": "version = \"$VERSION\""
Expand Down
291 changes: 0 additions & 291 deletions .codegen/model.go.tmpl

This file was deleted.

8 changes: 8 additions & 0 deletions catalog/resource_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ func ResourceCredential() common.Resource {
if err != nil {
return err
}
// azure client secret is sensitive, so we need to preserve it
var credOrig catalog.CredentialInfo
common.DataToStructPointer(d, credentialSchema, &credOrig)
if credOrig.AzureServicePrincipal != nil {
if credOrig.AzureServicePrincipal.ClientSecret != "" {
cred.AzureServicePrincipal.ClientSecret = credOrig.AzureServicePrincipal.ClientSecret
}
}
d.Set("credential_id", cred.Id)
return common.StructToData(cred, credentialSchema, d)
},
Expand Down
8 changes: 8 additions & 0 deletions docs/data-sources/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Granting view [databricks_permissions](../resources/permissions.md) to all [data
```hcl
data "databricks_jobs" "this" {}
data "databricks_jobs" "tests" {
job_name_contains = "test"
}
resource "databricks_permissions" "everyone_can_view_all_jobs" {
for_each = data.databricks_jobs.this.ids
job_id = each.value
Expand All @@ -38,6 +42,10 @@ output "x" {
}
```

## Argument Reference

* `job_name_contains` - (Optional) Only return [databricks_job](../resources/job.md#) ids that match the given name string (case-insensitive).

## Attribute Reference

This data source exports the following attributes:
Expand Down
2 changes: 2 additions & 0 deletions exporter/importables.go
Original file line number Diff line number Diff line change
Expand Up @@ -2271,6 +2271,8 @@ var resourcesMap map[string]importable = map[string]importable{
},
Body: resourceOrDataBlockBody,
Depends: []reference{
{Path: "path", Resource: "databricks_user", Match: "home"},
{Path: "path", Resource: "databricks_service_principal", Match: "home"},
// TODO: it should try to find longest reference to another directory object that it not itself...
{Path: "path", Resource: "databricks_user", Match: "home",
MatchType: MatchPrefix, SearchValueTransformFunc: appendEndingSlashToDirName},
Expand Down
Loading

0 comments on commit 7bd76e3

Please sign in to comment.