secrets

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceSecret

func ResourceSecret() *schema.Resource

ResourceSecret manages secrets

func ResourceSecretACL

func ResourceSecretACL() *schema.Resource

ResourceSecretACL manages access to secret scopes

func ResourceSecretScope

func ResourceSecretScope() *schema.Resource

ResourceSecretScope manages secret scopes

Types

type ACLItem

type ACLItem struct {
	Principal  string        `json:"principal,omitempty"`
	Permission ACLPermission `json:"permission,omitempty"`
}

ACLItem is a struct that contains information about a secret scope acl

type ACLPermission

type ACLPermission string

ACLPermission is a custom type for acl permissions

const (
	ACLPermissionRead   ACLPermission = "READ"
	ACLPermissionWrite  ACLPermission = "WRITE"
	ACLPermissionManage ACLPermission = "MANAGE"
)

List of possible ACL Permissions on Databricks

type KeyvaultMetadata

type KeyvaultMetadata struct {
	// /subscriptions/.../resourceGroups/.../providers/Microsoft.KeyVault/vaults/my-azure-kv
	ResourceID string `json:"resource_id"`
	// https://my-azure-kv.vault.azure.net/
	DNSName string `json:"dns_name"`
}

KeyvaultMetadata Azure Key Vault metadata wrapper

type SecretACLRequest

type SecretACLRequest struct {
	Scope      string        `json:"scope,omitempty" url:"scope,omitempty"`
	Principal  string        `json:"principal,omitempty" url:"principal,omitempty"`
	Permission ACLPermission `json:"permission,omitempty" url:"permission,omitempty"`
}

SecretACLRequest generic request for secret acls

type SecretAclsAPI

type SecretAclsAPI struct {
	// contains filtered or unexported fields
}

SecretAclsAPI exposes the Secret ACL API

func NewSecretAclsAPI

func NewSecretAclsAPI(ctx context.Context, m any) SecretAclsAPI

NewSecretAclsAPI creates SecretAclsAPI instance from provider meta

func (SecretAclsAPI) Create

func (a SecretAclsAPI) Create(scope string, principal string, permission ACLPermission) error

Create creates or overwrites the ACL associated with the given principal (user or group) on the specified scope point

func (SecretAclsAPI) Delete

func (a SecretAclsAPI) Delete(scope string, principal string) error

Delete deletes the given ACL on the given scope

func (SecretAclsAPI) List

func (a SecretAclsAPI) List(scope string) ([]ACLItem, error)

List lists the ACLs set on the given scope

func (SecretAclsAPI) Read

func (a SecretAclsAPI) Read(scope string, principal string) (ACLItem, error)

Read describe the details about the given ACL, such as the group and permission

type SecretMetadata

type SecretMetadata struct {
	Key                  string `json:"key,omitempty"`
	LastUpdatedTimestamp int64  `json:"last_updated_timestamp,omitempty"`
}

SecretMetadata is a struct that encapsulates the metadata for a secret object in a scope

type SecretScope

type SecretScope struct {
	Name                   string            `json:"name" tf:"force_new"`
	BackendType            string            `json:"backend_type,omitempty" tf:"computed"`
	InitialManagePrincipal string            `json:"initial_manage_principal,omitempty" tf:"force_new"`
	KeyvaultMetadata       *KeyvaultMetadata `json:"keyvault_metadata,omitempty" tf:"force_new"`
}

SecretScope is a struct that encapsulates the secret scope

type SecretScopeACL

type SecretScopeACL struct {
	Items []ACLItem `json:"items,omitempty"`
}

SecretScopeACL ...

type SecretScopeList

type SecretScopeList struct {
	Scopes []SecretScope `json:"scopes,omitempty"`
}

SecretScopeList holds list of secret scopes

type SecretScopesAPI

type SecretScopesAPI struct {
	// contains filtered or unexported fields
}

SecretScopesAPI exposes the Secret Scopes API

func NewSecretScopesAPI

func NewSecretScopesAPI(ctx context.Context, m any) SecretScopesAPI

NewSecretScopesAPI creates SecretScopesAPI instance from provider meta

func (SecretScopesAPI) Create

func (a SecretScopesAPI) Create(s SecretScope) error

Create creates a new secret scope

func (SecretScopesAPI) Delete

func (a SecretScopesAPI) Delete(scope string) error

Delete deletes a secret scope

func (SecretScopesAPI) List

func (a SecretScopesAPI) List() ([]SecretScope, error)

List lists all secret scopes available in the workspace

func (SecretScopesAPI) Read

func (a SecretScopesAPI) Read(scopeName string) (SecretScope, error)

Read will return the metadata for the secret scope

type SecretsAPI

type SecretsAPI struct {
	// contains filtered or unexported fields
}

SecretsAPI exposes the Secrets API

func NewSecretsAPI

func NewSecretsAPI(ctx context.Context, m any) SecretsAPI

NewSecretsAPI creates SecretsAPI instance from provider meta

func (SecretsAPI) Create

func (a SecretsAPI) Create(stringValue, scope, key string) error

Create creates or modifies a string secret depends on the type of scope backend

func (SecretsAPI) Delete

func (a SecretsAPI) Delete(scope, key string) error

Delete deletes a secret depends on the type of scope backend

func (SecretsAPI) List

func (a SecretsAPI) List(scope string) ([]SecretMetadata, error)

List lists the secret keys that are stored at this scope

func (SecretsAPI) Read

func (a SecretsAPI) Read(scope string, key string) (SecretMetadata, error)

Read returns the metadata for the secret and not the contents of the secret

type SecretsList

type SecretsList struct {
	Secrets []SecretMetadata `json:"secrets,omitempty"`
}

SecretsList ...

type SecretsRequest

type SecretsRequest struct {
	StringValue string `json:"string_value,omitempty" mask:"true"`
	Scope       string `json:"scope,omitempty"`
	Key         string `json:"key,omitempty"`
}

SecretsRequest ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL