oci logo
Oracle Cloud Infrastructure v0.6.0, Jan 23 23

oci.Database.KeyStore

This resource provides the Key Store resource in Oracle Cloud Infrastructure Database service.

Creates a Key Store.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testKeyStore = new Oci.Database.KeyStore("testKeyStore", new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Key_store_display_name,
        TypeDetails = new Oci.Database.Inputs.KeyStoreTypeDetailsArgs
        {
            AdminUsername = @var.Key_store_type_details_admin_username,
            ConnectionIps = @var.Key_store_type_details_connection_ips,
            SecretId = oci_vault_secret.Test_secret.Id,
            Type = @var.Key_store_type_details_type,
            VaultId = oci_kms_vault.Test_vault.Id,
        },
        DefinedTags = @var.Key_store_defined_tags,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Database.NewKeyStore(ctx, "testKeyStore", &Database.KeyStoreArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			DisplayName:   pulumi.Any(_var.Key_store_display_name),
			TypeDetails: &database.KeyStoreTypeDetailsArgs{
				AdminUsername: pulumi.Any(_var.Key_store_type_details_admin_username),
				ConnectionIps: pulumi.Any(_var.Key_store_type_details_connection_ips),
				SecretId:      pulumi.Any(oci_vault_secret.Test_secret.Id),
				Type:          pulumi.Any(_var.Key_store_type_details_type),
				VaultId:       pulumi.Any(oci_kms_vault.Test_vault.Id),
			},
			DefinedTags: pulumi.Any(_var.Key_store_defined_tags),
			FreeformTags: pulumi.AnyMap{
				"Department": pulumi.Any("Finance"),
			},
		})
		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.oci.Database.KeyStore;
import com.pulumi.oci.Database.KeyStoreArgs;
import com.pulumi.oci.Database.inputs.KeyStoreTypeDetailsArgs;
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 testKeyStore = new KeyStore("testKeyStore", KeyStoreArgs.builder()        
            .compartmentId(var_.compartment_id())
            .displayName(var_.key_store_display_name())
            .typeDetails(KeyStoreTypeDetailsArgs.builder()
                .adminUsername(var_.key_store_type_details_admin_username())
                .connectionIps(var_.key_store_type_details_connection_ips())
                .secretId(oci_vault_secret.test_secret().id())
                .type(var_.key_store_type_details_type())
                .vaultId(oci_kms_vault.test_vault().id())
                .build())
            .definedTags(var_.key_store_defined_tags())
            .freeformTags(Map.of("Department", "Finance"))
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_key_store = oci.database.KeyStore("testKeyStore",
    compartment_id=var["compartment_id"],
    display_name=var["key_store_display_name"],
    type_details=oci.database.KeyStoreTypeDetailsArgs(
        admin_username=var["key_store_type_details_admin_username"],
        connection_ips=var["key_store_type_details_connection_ips"],
        secret_id=oci_vault_secret["test_secret"]["id"],
        type=var["key_store_type_details_type"],
        vault_id=oci_kms_vault["test_vault"]["id"],
    ),
    defined_tags=var["key_store_defined_tags"],
    freeform_tags={
        "Department": "Finance",
    })
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testKeyStore = new oci.database.KeyStore("testKeyStore", {
    compartmentId: _var.compartment_id,
    displayName: _var.key_store_display_name,
    typeDetails: {
        adminUsername: _var.key_store_type_details_admin_username,
        connectionIps: _var.key_store_type_details_connection_ips,
        secretId: oci_vault_secret.test_secret.id,
        type: _var.key_store_type_details_type,
        vaultId: oci_kms_vault.test_vault.id,
    },
    definedTags: _var.key_store_defined_tags,
    freeformTags: {
        Department: "Finance",
    },
});
resources:
  testKeyStore:
    type: oci:Database:KeyStore
    properties:
      #Required
      compartmentId: ${var.compartment_id}
      displayName: ${var.key_store_display_name}
      typeDetails:
        adminUsername: ${var.key_store_type_details_admin_username}
        connectionIps: ${var.key_store_type_details_connection_ips}
        secretId: ${oci_vault_secret.test_secret.id}
        type: ${var.key_store_type_details_type}
        vaultId: ${oci_kms_vault.test_vault.id}
      #Optional
      definedTags: ${var.key_store_defined_tags}
      freeformTags:
        Department: Finance

Create KeyStore Resource

new KeyStore(name: string, args: KeyStoreArgs, opts?: CustomResourceOptions);
@overload
def KeyStore(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             compartment_id: Optional[str] = None,
             defined_tags: Optional[Mapping[str, Any]] = None,
             display_name: Optional[str] = None,
             freeform_tags: Optional[Mapping[str, Any]] = None,
             type_details: Optional[_database.KeyStoreTypeDetailsArgs] = None)
@overload
def KeyStore(resource_name: str,
             args: KeyStoreArgs,
             opts: Optional[ResourceOptions] = None)
func NewKeyStore(ctx *Context, name string, args KeyStoreArgs, opts ...ResourceOption) (*KeyStore, error)
public KeyStore(string name, KeyStoreArgs args, CustomResourceOptions? opts = null)
public KeyStore(String name, KeyStoreArgs args)
public KeyStore(String name, KeyStoreArgs args, CustomResourceOptions options)
type: oci:Database:KeyStore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args KeyStoreArgs
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 KeyStoreArgs
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 KeyStoreArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KeyStoreArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args KeyStoreArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

KeyStore 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 KeyStore resource accepts the following input properties:

CompartmentId string

(Updatable) The OCID of the compartment.

DisplayName string

The user-friendly name for the key store. The name does not need to be unique.

TypeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

FreeformTags Dictionary<string, object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

CompartmentId string

(Updatable) The OCID of the compartment.

DisplayName string

The user-friendly name for the key store. The name does not need to be unique.

TypeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

FreeformTags map[string]interface{}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

compartmentId String

(Updatable) The OCID of the compartment.

displayName String

The user-friendly name for the key store. The name does not need to be unique.

typeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

freeformTags Map<String,Object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

compartmentId string

(Updatable) The OCID of the compartment.

displayName string

The user-friendly name for the key store. The name does not need to be unique.

typeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

freeformTags {[key: string]: any}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

compartment_id str

(Updatable) The OCID of the compartment.

display_name str

The user-friendly name for the key store. The name does not need to be unique.

type_details KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

freeform_tags Mapping[str, Any]

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

compartmentId String

(Updatable) The OCID of the compartment.

displayName String

The user-friendly name for the key store. The name does not need to be unique.

typeDetails Property Map

(Updatable) Key store type details.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

freeformTags Map<Any>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Outputs

All input properties are implicitly available as output properties. Additionally, the KeyStore resource produces the following output properties:

AssociatedDatabases List<KeyStoreAssociatedDatabase>

List of databases associated with the key store.

Id string

The provider-assigned unique ID for this managed resource.

LifecycleDetails string

Additional information about the current lifecycle state.

State string

The current state of the key store.

TimeCreated string

The date and time that the key store was created.

AssociatedDatabases []KeyStoreAssociatedDatabase

List of databases associated with the key store.

Id string

The provider-assigned unique ID for this managed resource.

LifecycleDetails string

Additional information about the current lifecycle state.

State string

The current state of the key store.

TimeCreated string

The date and time that the key store was created.

associatedDatabases List<KeyStoreAssociated>

List of databases associated with the key store.

id String

The provider-assigned unique ID for this managed resource.

lifecycleDetails String

Additional information about the current lifecycle state.

state String

The current state of the key store.

timeCreated String

The date and time that the key store was created.

associatedDatabases KeyStoreAssociatedDatabase[]

List of databases associated with the key store.

id string

The provider-assigned unique ID for this managed resource.

lifecycleDetails string

Additional information about the current lifecycle state.

state string

The current state of the key store.

timeCreated string

The date and time that the key store was created.

associated_databases KeyStoreAssociatedDatabase]

List of databases associated with the key store.

id str

The provider-assigned unique ID for this managed resource.

lifecycle_details str

Additional information about the current lifecycle state.

state str

The current state of the key store.

time_created str

The date and time that the key store was created.

associatedDatabases List<Property Map>

List of databases associated with the key store.

id String

The provider-assigned unique ID for this managed resource.

lifecycleDetails String

Additional information about the current lifecycle state.

state String

The current state of the key store.

timeCreated String

The date and time that the key store was created.

Look up Existing KeyStore Resource

Get an existing KeyStore 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?: KeyStoreState, opts?: CustomResourceOptions): KeyStore
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        associated_databases: Optional[Sequence[_database.KeyStoreAssociatedDatabaseArgs]] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        lifecycle_details: Optional[str] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None,
        type_details: Optional[_database.KeyStoreTypeDetailsArgs] = None) -> KeyStore
func GetKeyStore(ctx *Context, name string, id IDInput, state *KeyStoreState, opts ...ResourceOption) (*KeyStore, error)
public static KeyStore Get(string name, Input<string> id, KeyStoreState? state, CustomResourceOptions? opts = null)
public static KeyStore get(String name, Output<String> id, KeyStoreState 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.
The following state arguments are supported:
AssociatedDatabases List<KeyStoreAssociatedDatabaseArgs>

List of databases associated with the key store.

CompartmentId string

(Updatable) The OCID of the compartment.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

DisplayName string

The user-friendly name for the key store. The name does not need to be unique.

FreeformTags Dictionary<string, object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

LifecycleDetails string

Additional information about the current lifecycle state.

State string

The current state of the key store.

TimeCreated string

The date and time that the key store was created.

TypeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

AssociatedDatabases []KeyStoreAssociatedDatabaseArgs

List of databases associated with the key store.

CompartmentId string

(Updatable) The OCID of the compartment.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

DisplayName string

The user-friendly name for the key store. The name does not need to be unique.

FreeformTags map[string]interface{}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

LifecycleDetails string

Additional information about the current lifecycle state.

State string

The current state of the key store.

TimeCreated string

The date and time that the key store was created.

TypeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

associatedDatabases List<KeyStoreAssociatedArgs>

List of databases associated with the key store.

compartmentId String

(Updatable) The OCID of the compartment.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

displayName String

The user-friendly name for the key store. The name does not need to be unique.

freeformTags Map<String,Object>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

lifecycleDetails String

Additional information about the current lifecycle state.

state String

The current state of the key store.

timeCreated String

The date and time that the key store was created.

typeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

associatedDatabases KeyStoreAssociatedDatabaseArgs[]

List of databases associated with the key store.

compartmentId string

(Updatable) The OCID of the compartment.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

displayName string

The user-friendly name for the key store. The name does not need to be unique.

freeformTags {[key: string]: any}

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

lifecycleDetails string

Additional information about the current lifecycle state.

state string

The current state of the key store.

timeCreated string

The date and time that the key store was created.

typeDetails KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

associated_databases KeyStoreAssociatedDatabaseArgs]

List of databases associated with the key store.

compartment_id str

(Updatable) The OCID of the compartment.

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

display_name str

The user-friendly name for the key store. The name does not need to be unique.

freeform_tags Mapping[str, Any]

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

lifecycle_details str

Additional information about the current lifecycle state.

state str

The current state of the key store.

time_created str

The date and time that the key store was created.

type_details KeyStoreTypeDetailsArgs

(Updatable) Key store type details.

associatedDatabases List<Property Map>

List of databases associated with the key store.

compartmentId String

(Updatable) The OCID of the compartment.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

displayName String

The user-friendly name for the key store. The name does not need to be unique.

freeformTags Map<Any>

(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

lifecycleDetails String

Additional information about the current lifecycle state.

state String

The current state of the key store.

timeCreated String

The date and time that the key store was created.

typeDetails Property Map

(Updatable) Key store type details.

Supporting Types

KeyStoreAssociatedDatabase

DbName string

The name of the database that is associated with the key store.

Id string

The OCID of the key store.

DbName string

The name of the database that is associated with the key store.

Id string

The OCID of the key store.

dbName String

The name of the database that is associated with the key store.

id String

The OCID of the key store.

dbName string

The name of the database that is associated with the key store.

id string

The OCID of the key store.

db_name str

The name of the database that is associated with the key store.

id str

The OCID of the key store.

dbName String

The name of the database that is associated with the key store.

id String

The OCID of the key store.

KeyStoreTypeDetails

AdminUsername string

(Updatable) The administrator username to connect to Oracle Key Vault

ConnectionIps List<string>

(Updatable) The list of Oracle Key Vault connection IP addresses.

SecretId string

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

Type string

(Updatable) The type of key store.

VaultId string

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

AdminUsername string

(Updatable) The administrator username to connect to Oracle Key Vault

ConnectionIps []string

(Updatable) The list of Oracle Key Vault connection IP addresses.

SecretId string

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

Type string

(Updatable) The type of key store.

VaultId string

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

adminUsername String

(Updatable) The administrator username to connect to Oracle Key Vault

connectionIps List<String>

(Updatable) The list of Oracle Key Vault connection IP addresses.

secretId String

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

type String

(Updatable) The type of key store.

vaultId String

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

adminUsername string

(Updatable) The administrator username to connect to Oracle Key Vault

connectionIps string[]

(Updatable) The list of Oracle Key Vault connection IP addresses.

secretId string

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

type string

(Updatable) The type of key store.

vaultId string

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

admin_username str

(Updatable) The administrator username to connect to Oracle Key Vault

connection_ips Sequence[str]

(Updatable) The list of Oracle Key Vault connection IP addresses.

secret_id str

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

type str

(Updatable) The type of key store.

vault_id str

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

adminUsername String

(Updatable) The administrator username to connect to Oracle Key Vault

connectionIps List<String>

(Updatable) The list of Oracle Key Vault connection IP addresses.

secretId String

(Updatable) The OCID of the Oracle Cloud Infrastructure secret.

type String

(Updatable) The type of key store.

vaultId String

(Updatable) The OCID of the Oracle Cloud Infrastructure vault.

Import

KeyStores can be imported using the id, e.g.

 $ pulumi import oci:Database/keyStore:KeyStore test_key_store "id"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.