@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
231 lines (230 loc) • 7.96 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
*
* Custom App Templates store the metadata of custom app code hosted in an external Git repository, enabling users to reuse boilerplate code when creating apps.
*
* ## Example Usage
*
* ### Basic Example
*
* This example creates a Custom Template in the workspace with the specified name.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.AppsSettingsCustomTemplate("this", {
* name: "my-custom-template",
* description: "A sample custom app template",
* gitRepo: "https://github.com/example/repo.git",
* path: "path-to-template",
* gitProvider: "github",
* manifest: {
* version: 1,
* name: "my-custom-app",
* },
* });
* ```
*
* ### Example with API Scopes
*
* This example creates a custom template that declares required user API scopes.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const apiScopesExample = new databricks.AppsSettingsCustomTemplate("api_scopes_example", {
* name: "my-api-template",
* description: "A template that requests user API scopes",
* gitRepo: "https://github.com/example/my-app.git",
* path: "templates/app",
* gitProvider: "github",
* manifest: {
* version: 1,
* name: "my-databricks-app",
* description: "This app requires the SQL API scope.",
* userApiScopes: ["sql"],
* },
* });
* ```
*
* ### Example with Resource Requirements
*
* This example defines a template that requests specific workspace resources with permissions granted.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const resourcesExample = new databricks.AppsSettingsCustomTemplate("resources_example", {
* name: "my-resource-template",
* description: "Template that requires secret and SQL warehouse access",
* gitRepo: "https://github.com/example/resource-app.git",
* path: "resource-template",
* gitProvider: "github",
* manifest: {
* version: 1,
* name: "resource-consuming-app",
* description: "This app requires access to a secret and SQL warehouse.",
* resourceSpecs: [
* {
* name: "my-secret",
* description: "A secret needed by the app",
* secretSpec: {
* permission: "READ",
* },
* },
* {
* name: "warehouse",
* description: "Warehouse access",
* sqlWarehouseSpec: {
* permission: "CAN_USE",
* },
* },
* ],
* },
* });
* ```
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = "name"
*
* to = databricks_apps_settings_custom_template.this
*
* }
*
* If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:
*
* ```sh
* $ pulumi import databricks:index/appsSettingsCustomTemplate:AppsSettingsCustomTemplate this "name"
* ```
*/
export declare class AppsSettingsCustomTemplate extends pulumi.CustomResource {
/**
* Get an existing AppsSettingsCustomTemplate resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AppsSettingsCustomTemplateState, opts?: pulumi.CustomResourceOptions): AppsSettingsCustomTemplate;
/**
* Returns true if the given object is an instance of AppsSettingsCustomTemplate. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AppsSettingsCustomTemplate;
/**
* (string)
*/
readonly creator: pulumi.Output<string>;
/**
* The description of the template
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The Git provider of the template
*/
readonly gitProvider: pulumi.Output<string>;
/**
* The Git repository URL that the template resides in
*/
readonly gitRepo: pulumi.Output<string>;
/**
* The manifest of the template. It defines fields and default values when installing the template
*/
readonly manifest: pulumi.Output<outputs.AppsSettingsCustomTemplateManifest>;
/**
* The name of the template. It must contain only alphanumeric characters, hyphens, underscores, and whitespaces.
* It must be unique within the workspace
*/
readonly name: pulumi.Output<string>;
/**
* The path to the template within the Git repository
*/
readonly path: pulumi.Output<string>;
/**
* Create a AppsSettingsCustomTemplate resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AppsSettingsCustomTemplateArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AppsSettingsCustomTemplate resources.
*/
export interface AppsSettingsCustomTemplateState {
/**
* (string)
*/
creator?: pulumi.Input<string>;
/**
* The description of the template
*/
description?: pulumi.Input<string>;
/**
* The Git provider of the template
*/
gitProvider?: pulumi.Input<string>;
/**
* The Git repository URL that the template resides in
*/
gitRepo?: pulumi.Input<string>;
/**
* The manifest of the template. It defines fields and default values when installing the template
*/
manifest?: pulumi.Input<inputs.AppsSettingsCustomTemplateManifest>;
/**
* The name of the template. It must contain only alphanumeric characters, hyphens, underscores, and whitespaces.
* It must be unique within the workspace
*/
name?: pulumi.Input<string>;
/**
* The path to the template within the Git repository
*/
path?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AppsSettingsCustomTemplate resource.
*/
export interface AppsSettingsCustomTemplateArgs {
/**
* The description of the template
*/
description?: pulumi.Input<string>;
/**
* The Git provider of the template
*/
gitProvider: pulumi.Input<string>;
/**
* The Git repository URL that the template resides in
*/
gitRepo: pulumi.Input<string>;
/**
* The manifest of the template. It defines fields and default values when installing the template
*/
manifest: pulumi.Input<inputs.AppsSettingsCustomTemplateManifest>;
/**
* The name of the template. It must contain only alphanumeric characters, hyphens, underscores, and whitespaces.
* It must be unique within the workspace
*/
name?: pulumi.Input<string>;
/**
* The path to the template within the Git repository
*/
path: pulumi.Input<string>;
}