databricks.SecretAcl
Explore with Pulumi AI
Create or overwrite the ACL associated with the given principal (user or group) on the specified databricks_secret_scope. Please consult Secrets User Guide for more details.
Related Resources
The following resources are often used in the same context:
- End to end workspace management guide.
- databricks.Notebook to manage Databricks Notebooks.
- databricks.Permissions to manage access control in Databricks workspace.
- databricks.Repo to manage Databricks Repos.
- databricks.Secret to manage secrets in Databricks workspace.
- databricks.SecretScope to create secret scopes in Databricks workspace.
Example Usage
This way, data scientists can read the Publishing API key that is synchronized from example, Azure Key Vault.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var ds = new Databricks.Group("ds");
var app = new Databricks.SecretScope("app");
var mySecretAcl = new Databricks.SecretAcl("mySecretAcl", new()
{
Principal = ds.DisplayName,
Permission = "READ",
Scope = app.Name,
});
var publishingApi = new Databricks.Secret("publishingApi", new()
{
Key = "publishing_api",
StringValue = data.Azurerm_key_vault_secret.Example.Value,
Scope = app.Name,
});
});
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ds, err := databricks.NewGroup(ctx, "ds", nil)
if err != nil {
return err
}
app, err := databricks.NewSecretScope(ctx, "app", nil)
if err != nil {
return err
}
_, err = databricks.NewSecretAcl(ctx, "mySecretAcl", &databricks.SecretAclArgs{
Principal: ds.DisplayName,
Permission: pulumi.String("READ"),
Scope: app.Name,
})
if err != nil {
return err
}
_, err = databricks.NewSecret(ctx, "publishingApi", &databricks.SecretArgs{
Key: pulumi.String("publishing_api"),
StringValue: pulumi.Any(data.Azurerm_key_vault_secret.Example.Value),
Scope: app.Name,
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.Group;
import com.pulumi.databricks.SecretScope;
import com.pulumi.databricks.SecretAcl;
import com.pulumi.databricks.SecretAclArgs;
import com.pulumi.databricks.Secret;
import com.pulumi.databricks.SecretArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ds = new Group("ds");
var app = new SecretScope("app");
var mySecretAcl = new SecretAcl("mySecretAcl", SecretAclArgs.builder()
.principal(ds.displayName())
.permission("READ")
.scope(app.name())
.build());
var publishingApi = new Secret("publishingApi", SecretArgs.builder()
.key("publishing_api")
.stringValue(data.azurerm_key_vault_secret().example().value())
.scope(app.name())
.build());
}
}
import pulumi
import pulumi_databricks as databricks
ds = databricks.Group("ds")
app = databricks.SecretScope("app")
my_secret_acl = databricks.SecretAcl("mySecretAcl",
principal=ds.display_name,
permission="READ",
scope=app.name)
publishing_api = databricks.Secret("publishingApi",
key="publishing_api",
string_value=data["azurerm_key_vault_secret"]["example"]["value"],
scope=app.name)
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const ds = new databricks.Group("ds", {});
const app = new databricks.SecretScope("app", {});
const mySecretAcl = new databricks.SecretAcl("mySecretAcl", {
principal: ds.displayName,
permission: "READ",
scope: app.name,
});
const publishingApi = new databricks.Secret("publishingApi", {
key: "publishing_api",
stringValue: data.azurerm_key_vault_secret.example.value,
scope: app.name,
});
resources:
ds:
type: databricks:Group
app:
type: databricks:SecretScope
mySecretAcl:
type: databricks:SecretAcl
properties:
principal: ${ds.displayName}
permission: READ
scope: ${app.name}
publishingApi:
type: databricks:Secret
properties:
key: publishing_api
# replace it with a secret management solution of your choice :-)
stringValue: ${data.azurerm_key_vault_secret.example.value}
scope: ${app.name}
Create SecretAcl Resource
new SecretAcl(name: string, args: SecretAclArgs, opts?: CustomResourceOptions);
@overload
def SecretAcl(resource_name: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
principal: Optional[str] = None,
scope: Optional[str] = None)
@overload
def SecretAcl(resource_name: str,
args: SecretAclArgs,
opts: Optional[ResourceOptions] = None)
func NewSecretAcl(ctx *Context, name string, args SecretAclArgs, opts ...ResourceOption) (*SecretAcl, error)
public SecretAcl(string name, SecretAclArgs args, CustomResourceOptions? opts = null)
public SecretAcl(String name, SecretAclArgs args)
public SecretAcl(String name, SecretAclArgs args, CustomResourceOptions options)
type: databricks:SecretAcl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecretAclArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecretAclArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretAclArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SecretAcl Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecretAcl resource accepts the following input properties:
- Permission string
READ
,WRITE
orMANAGE
.- Principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- Scope string
name of the scope
- Permission string
READ
,WRITE
orMANAGE
.- Principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- Scope string
name of the scope
- permission String
READ
,WRITE
orMANAGE
.- principal String
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope String
name of the scope
- permission string
READ
,WRITE
orMANAGE
.- principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope string
name of the scope
- permission str
READ
,WRITE
orMANAGE
.- principal str
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope str
name of the scope
- permission String
READ
,WRITE
orMANAGE
.- principal String
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope String
name of the scope
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretAcl resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing SecretAcl Resource
Get an existing SecretAcl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecretAclState, opts?: CustomResourceOptions): SecretAcl
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
permission: Optional[str] = None,
principal: Optional[str] = None,
scope: Optional[str] = None) -> SecretAcl
func GetSecretAcl(ctx *Context, name string, id IDInput, state *SecretAclState, opts ...ResourceOption) (*SecretAcl, error)
public static SecretAcl Get(string name, Input<string> id, SecretAclState? state, CustomResourceOptions? opts = null)
public static SecretAcl get(String name, Output<String> id, SecretAclState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Permission string
READ
,WRITE
orMANAGE
.- Principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- Scope string
name of the scope
- Permission string
READ
,WRITE
orMANAGE
.- Principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- Scope string
name of the scope
- permission String
READ
,WRITE
orMANAGE
.- principal String
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope String
name of the scope
- permission string
READ
,WRITE
orMANAGE
.- principal string
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope string
name of the scope
- permission str
READ
,WRITE
orMANAGE
.- principal str
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope str
name of the scope
- permission String
READ
,WRITE
orMANAGE
.- principal String
name of the principals. It can be
users
for all users or name ordisplay_name
of databricks_group- scope String
name of the scope
Import
The resource secret acl can be imported using scopeName|||principalName
combination. bash
$ pulumi import databricks:index/secretAcl:SecretAcl object `scopeName|||principalName`
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
databricks
Terraform Provider.