Provides a Datadog Datastore resource. This can be used to create and manage Datadog datastore.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Create a new datastore resource
const foo = new datadog.Datastore("foo", {
name: "my-datastore",
description: "My application datastore",
primaryColumnName: "id",
primaryKeyGenerationStrategy: "none",
orgAccess: "contributor",
});
// Create a datastore with auto-generated UUIDs for primary keys
const autoUuid = new datadog.Datastore("auto_uuid", {
name: "my-uuid-datastore",
description: "Datastore with auto-generated primary keys",
primaryColumnName: "uuid",
primaryKeyGenerationStrategy: "uuid",
});
import pulumi
import pulumi_datadog as datadog
# Create a new datastore resource
foo = datadog.Datastore("foo",
name="my-datastore",
description="My application datastore",
primary_column_name="id",
primary_key_generation_strategy="none",
org_access="contributor")
# Create a datastore with auto-generated UUIDs for primary keys
auto_uuid = datadog.Datastore("auto_uuid",
name="my-uuid-datastore",
description="Datastore with auto-generated primary keys",
primary_column_name="uuid",
primary_key_generation_strategy="uuid")
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new datastore resource
_, err := datadog.NewDatastore(ctx, "foo", &datadog.DatastoreArgs{
Name: pulumi.String("my-datastore"),
Description: pulumi.String("My application datastore"),
PrimaryColumnName: pulumi.String("id"),
PrimaryKeyGenerationStrategy: pulumi.String("none"),
OrgAccess: pulumi.String("contributor"),
})
if err != nil {
return err
}
// Create a datastore with auto-generated UUIDs for primary keys
_, err = datadog.NewDatastore(ctx, "auto_uuid", &datadog.DatastoreArgs{
Name: pulumi.String("my-uuid-datastore"),
Description: pulumi.String("Datastore with auto-generated primary keys"),
PrimaryColumnName: pulumi.String("uuid"),
PrimaryKeyGenerationStrategy: pulumi.String("uuid"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
// Create a new datastore resource
var foo = new Datadog.Datastore("foo", new()
{
Name = "my-datastore",
Description = "My application datastore",
PrimaryColumnName = "id",
PrimaryKeyGenerationStrategy = "none",
OrgAccess = "contributor",
});
// Create a datastore with auto-generated UUIDs for primary keys
var autoUuid = new Datadog.Datastore("auto_uuid", new()
{
Name = "my-uuid-datastore",
Description = "Datastore with auto-generated primary keys",
PrimaryColumnName = "uuid",
PrimaryKeyGenerationStrategy = "uuid",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.Datastore;
import com.pulumi.datadog.DatastoreArgs;
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) {
// Create a new datastore resource
var foo = new Datastore("foo", DatastoreArgs.builder()
.name("my-datastore")
.description("My application datastore")
.primaryColumnName("id")
.primaryKeyGenerationStrategy("none")
.orgAccess("contributor")
.build());
// Create a datastore with auto-generated UUIDs for primary keys
var autoUuid = new Datastore("autoUuid", DatastoreArgs.builder()
.name("my-uuid-datastore")
.description("Datastore with auto-generated primary keys")
.primaryColumnName("uuid")
.primaryKeyGenerationStrategy("uuid")
.build());
}
}
resources:
# Create a new datastore resource
foo:
type: datadog:Datastore
properties:
name: my-datastore
description: My application datastore
primaryColumnName: id
primaryKeyGenerationStrategy: none
orgAccess: contributor
# Create a datastore with auto-generated UUIDs for primary keys
autoUuid:
type: datadog:Datastore
name: auto_uuid
properties:
name: my-uuid-datastore
description: Datastore with auto-generated primary keys
primaryColumnName: uuid
primaryKeyGenerationStrategy: uuid
Create Datastore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Datastore(name: string, args: DatastoreArgs, opts?: CustomResourceOptions);@overload
def Datastore(resource_name: str,
args: DatastoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Datastore(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
primary_column_name: Optional[str] = None,
description: Optional[str] = None,
org_access: Optional[str] = None,
primary_key_generation_strategy: Optional[str] = None)func NewDatastore(ctx *Context, name string, args DatastoreArgs, opts ...ResourceOption) (*Datastore, error)public Datastore(string name, DatastoreArgs args, CustomResourceOptions? opts = null)
public Datastore(String name, DatastoreArgs args)
public Datastore(String name, DatastoreArgs args, CustomResourceOptions options)
type: datadog:Datastore
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatastoreArgs
- 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 DatastoreArgs
- 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 DatastoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatastoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatastoreArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var datastoreResource = new Datadog.Datastore("datastoreResource", new()
{
Name = "string",
PrimaryColumnName = "string",
Description = "string",
OrgAccess = "string",
PrimaryKeyGenerationStrategy = "string",
});
example, err := datadog.NewDatastore(ctx, "datastoreResource", &datadog.DatastoreArgs{
Name: pulumi.String("string"),
PrimaryColumnName: pulumi.String("string"),
Description: pulumi.String("string"),
OrgAccess: pulumi.String("string"),
PrimaryKeyGenerationStrategy: pulumi.String("string"),
})
var datastoreResource = new Datastore("datastoreResource", DatastoreArgs.builder()
.name("string")
.primaryColumnName("string")
.description("string")
.orgAccess("string")
.primaryKeyGenerationStrategy("string")
.build());
datastore_resource = datadog.Datastore("datastoreResource",
name="string",
primary_column_name="string",
description="string",
org_access="string",
primary_key_generation_strategy="string")
const datastoreResource = new datadog.Datastore("datastoreResource", {
name: "string",
primaryColumnName: "string",
description: "string",
orgAccess: "string",
primaryKeyGenerationStrategy: "string",
});
type: datadog:Datastore
properties:
description: string
name: string
orgAccess: string
primaryColumnName: string
primaryKeyGenerationStrategy: string
Datastore Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Datastore resource accepts the following input properties:
- Name string
- The display name for the new datastore.
- Primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- Description string
- A human-readable description about the datastore.
- Org
Access string - The organization access level for the datastore. For example, 'contributor'.
- Primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- Name string
- The display name for the new datastore.
- Primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- Description string
- A human-readable description about the datastore.
- Org
Access string - The organization access level for the datastore. For example, 'contributor'.
- Primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- name String
- The display name for the new datastore.
- primary
Column StringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- description String
- A human-readable description about the datastore.
- org
Access String - The organization access level for the datastore. For example, 'contributor'.
- primary
Key StringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- name string
- The display name for the new datastore.
- primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- description string
- A human-readable description about the datastore.
- org
Access string - The organization access level for the datastore. For example, 'contributor'.
- primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- name str
- The display name for the new datastore.
- primary_
column_ strname - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- description str
- A human-readable description about the datastore.
- org_
access str - The organization access level for the datastore. For example, 'contributor'.
- primary_
key_ strgeneration_ strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- name String
- The display name for the new datastore.
- primary
Column StringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- description String
- A human-readable description about the datastore.
- org
Access String - The organization access level for the datastore. For example, 'contributor'.
- primary
Key StringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
Outputs
All input properties are implicitly available as output properties. Additionally, the Datastore resource produces the following output properties:
- Created
At string - Timestamp when the datastore was created.
- Creator
User intId - The numeric ID of the user who created the datastore.
- Creator
User stringUuid - The UUID of the user who created the datastore.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - Timestamp when the datastore was last modified.
- Org
Id int - The ID of the organization that owns this datastore.
- Created
At string - Timestamp when the datastore was created.
- Creator
User intId - The numeric ID of the user who created the datastore.
- Creator
User stringUuid - The UUID of the user who created the datastore.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - Timestamp when the datastore was last modified.
- Org
Id int - The ID of the organization that owns this datastore.
- created
At String - Timestamp when the datastore was created.
- creator
User IntegerId - The numeric ID of the user who created the datastore.
- creator
User StringUuid - The UUID of the user who created the datastore.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - Timestamp when the datastore was last modified.
- org
Id Integer - The ID of the organization that owns this datastore.
- created
At string - Timestamp when the datastore was created.
- creator
User numberId - The numeric ID of the user who created the datastore.
- creator
User stringUuid - The UUID of the user who created the datastore.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
At string - Timestamp when the datastore was last modified.
- org
Id number - The ID of the organization that owns this datastore.
- created_
at str - Timestamp when the datastore was created.
- creator_
user_ intid - The numeric ID of the user who created the datastore.
- creator_
user_ struuid - The UUID of the user who created the datastore.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
at str - Timestamp when the datastore was last modified.
- org_
id int - The ID of the organization that owns this datastore.
- created
At String - Timestamp when the datastore was created.
- creator
User NumberId - The numeric ID of the user who created the datastore.
- creator
User StringUuid - The UUID of the user who created the datastore.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - Timestamp when the datastore was last modified.
- org
Id Number - The ID of the organization that owns this datastore.
Look up Existing Datastore Resource
Get an existing Datastore 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?: DatastoreState, opts?: CustomResourceOptions): Datastore@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
creator_user_id: Optional[int] = None,
creator_user_uuid: Optional[str] = None,
description: Optional[str] = None,
modified_at: Optional[str] = None,
name: Optional[str] = None,
org_access: Optional[str] = None,
org_id: Optional[int] = None,
primary_column_name: Optional[str] = None,
primary_key_generation_strategy: Optional[str] = None) -> Datastorefunc GetDatastore(ctx *Context, name string, id IDInput, state *DatastoreState, opts ...ResourceOption) (*Datastore, error)public static Datastore Get(string name, Input<string> id, DatastoreState? state, CustomResourceOptions? opts = null)public static Datastore get(String name, Output<String> id, DatastoreState state, CustomResourceOptions options)resources: _: type: datadog:Datastore get: id: ${id}- 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.
- Created
At string - Timestamp when the datastore was created.
- Creator
User intId - The numeric ID of the user who created the datastore.
- Creator
User stringUuid - The UUID of the user who created the datastore.
- Description string
- A human-readable description about the datastore.
- Modified
At string - Timestamp when the datastore was last modified.
- Name string
- The display name for the new datastore.
- Org
Access string - The organization access level for the datastore. For example, 'contributor'.
- Org
Id int - The ID of the organization that owns this datastore.
- Primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- Primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- Created
At string - Timestamp when the datastore was created.
- Creator
User intId - The numeric ID of the user who created the datastore.
- Creator
User stringUuid - The UUID of the user who created the datastore.
- Description string
- A human-readable description about the datastore.
- Modified
At string - Timestamp when the datastore was last modified.
- Name string
- The display name for the new datastore.
- Org
Access string - The organization access level for the datastore. For example, 'contributor'.
- Org
Id int - The ID of the organization that owns this datastore.
- Primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- Primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- created
At String - Timestamp when the datastore was created.
- creator
User IntegerId - The numeric ID of the user who created the datastore.
- creator
User StringUuid - The UUID of the user who created the datastore.
- description String
- A human-readable description about the datastore.
- modified
At String - Timestamp when the datastore was last modified.
- name String
- The display name for the new datastore.
- org
Access String - The organization access level for the datastore. For example, 'contributor'.
- org
Id Integer - The ID of the organization that owns this datastore.
- primary
Column StringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- primary
Key StringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- created
At string - Timestamp when the datastore was created.
- creator
User numberId - The numeric ID of the user who created the datastore.
- creator
User stringUuid - The UUID of the user who created the datastore.
- description string
- A human-readable description about the datastore.
- modified
At string - Timestamp when the datastore was last modified.
- name string
- The display name for the new datastore.
- org
Access string - The organization access level for the datastore. For example, 'contributor'.
- org
Id number - The ID of the organization that owns this datastore.
- primary
Column stringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- primary
Key stringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- created_
at str - Timestamp when the datastore was created.
- creator_
user_ intid - The numeric ID of the user who created the datastore.
- creator_
user_ struuid - The UUID of the user who created the datastore.
- description str
- A human-readable description about the datastore.
- modified_
at str - Timestamp when the datastore was last modified.
- name str
- The display name for the new datastore.
- org_
access str - The organization access level for the datastore. For example, 'contributor'.
- org_
id int - The ID of the organization that owns this datastore.
- primary_
column_ strname - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- primary_
key_ strgeneration_ strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
- created
At String - Timestamp when the datastore was created.
- creator
User NumberId - The numeric ID of the user who created the datastore.
- creator
User StringUuid - The UUID of the user who created the datastore.
- description String
- A human-readable description about the datastore.
- modified
At String - Timestamp when the datastore was last modified.
- name String
- The display name for the new datastore.
- org
Access String - The organization access level for the datastore. For example, 'contributor'.
- org
Id Number - The ID of the organization that owns this datastore.
- primary
Column StringName - The name of the primary key column for this datastore. Primary column names: - Must abide by both PostgreSQL naming conventions - Cannot exceed 63 characters
- primary
Key StringGeneration Strategy - Can be set to
uuidto automatically generate primary keys when new items are added. Default value isnone, which requires you to supply a primary key for each new item.
Import
The pulumi import command can be used, for example:
$ pulumi import datadog:index/datastore:Datastore foo "datastore-id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadogTerraform Provider.
