Example Usage
Basic Read-Write Endpoint
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = new databricks.PostgresProject("this", {
projectId: "my-project",
spec: {
pgVersion: 17,
displayName: "My Project",
},
});
const dev = new databricks.PostgresBranch("dev", {
branchId: "dev-branch",
parent: _this.name,
spec: {
noExpiry: true,
},
});
const primary = new databricks.PostgresEndpoint("primary", {
endpointId: "primary",
parent: dev.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_WRITE",
},
});
import pulumi
import pulumi_databricks as databricks
this = databricks.PostgresProject("this",
project_id="my-project",
spec={
"pg_version": 17,
"display_name": "My Project",
})
dev = databricks.PostgresBranch("dev",
branch_id="dev-branch",
parent=this.name,
spec={
"no_expiry": True,
})
primary = databricks.PostgresEndpoint("primary",
endpoint_id="primary",
parent=dev.name,
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_WRITE",
})
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 {
this, err := databricks.NewPostgresProject(ctx, "this", &databricks.PostgresProjectArgs{
ProjectId: pulumi.String("my-project"),
Spec: &databricks.PostgresProjectSpecArgs{
PgVersion: pulumi.Int(17),
DisplayName: pulumi.String("My Project"),
},
})
if err != nil {
return err
}
dev, err := databricks.NewPostgresBranch(ctx, "dev", &databricks.PostgresBranchArgs{
BranchId: pulumi.String("dev-branch"),
Parent: this.Name,
Spec: &databricks.PostgresBranchSpecArgs{
NoExpiry: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = databricks.NewPostgresEndpoint(ctx, "primary", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("primary"),
Parent: dev.Name,
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_WRITE"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = new Databricks.PostgresProject("this", new()
{
ProjectId = "my-project",
Spec = new Databricks.Inputs.PostgresProjectSpecArgs
{
PgVersion = 17,
DisplayName = "My Project",
},
});
var dev = new Databricks.PostgresBranch("dev", new()
{
BranchId = "dev-branch",
Parent = @this.Name,
Spec = new Databricks.Inputs.PostgresBranchSpecArgs
{
NoExpiry = true,
},
});
var primary = new Databricks.PostgresEndpoint("primary", new()
{
EndpointId = "primary",
Parent = dev.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_WRITE",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresProject;
import com.pulumi.databricks.PostgresProjectArgs;
import com.pulumi.databricks.inputs.PostgresProjectSpecArgs;
import com.pulumi.databricks.PostgresBranch;
import com.pulumi.databricks.PostgresBranchArgs;
import com.pulumi.databricks.inputs.PostgresBranchSpecArgs;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 this_ = new PostgresProject("this", PostgresProjectArgs.builder()
.projectId("my-project")
.spec(PostgresProjectSpecArgs.builder()
.pgVersion(17)
.displayName("My Project")
.build())
.build());
var dev = new PostgresBranch("dev", PostgresBranchArgs.builder()
.branchId("dev-branch")
.parent(this_.name())
.spec(PostgresBranchSpecArgs.builder()
.noExpiry(true)
.build())
.build());
var primary = new PostgresEndpoint("primary", PostgresEndpointArgs.builder()
.endpointId("primary")
.parent(dev.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_WRITE")
.build())
.build());
}
}
resources:
this:
type: databricks:PostgresProject
properties:
projectId: my-project
spec:
pgVersion: 17
displayName: My Project
dev:
type: databricks:PostgresBranch
properties:
branchId: dev-branch
parent: ${this.name}
spec:
noExpiry: true
primary:
type: databricks:PostgresEndpoint
properties:
endpointId: primary
parent: ${dev.name}
spec:
endpointType: ENDPOINT_TYPE_READ_WRITE
Read-Only Endpoint with Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const readReplica = new databricks.PostgresEndpoint("read_replica", {
endpointId: "read-replica-1",
parent: dev.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_ONLY",
autoscalingLimitMinCu: 0.5,
autoscalingLimitMaxCu: 4,
},
});
import pulumi
import pulumi_databricks as databricks
read_replica = databricks.PostgresEndpoint("read_replica",
endpoint_id="read-replica-1",
parent=dev["name"],
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"autoscaling_limit_min_cu": 0.5,
"autoscaling_limit_max_cu": 4,
})
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 {
_, err := databricks.NewPostgresEndpoint(ctx, "read_replica", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("read-replica-1"),
Parent: pulumi.Any(dev.Name),
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_ONLY"),
AutoscalingLimitMinCu: pulumi.Float64(0.5),
AutoscalingLimitMaxCu: pulumi.Float64(4),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var readReplica = new Databricks.PostgresEndpoint("read_replica", new()
{
EndpointId = "read-replica-1",
Parent = dev.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_ONLY",
AutoscalingLimitMinCu = 0.5,
AutoscalingLimitMaxCu = 4,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 readReplica = new PostgresEndpoint("readReplica", PostgresEndpointArgs.builder()
.endpointId("read-replica-1")
.parent(dev.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_ONLY")
.autoscalingLimitMinCu(0.5)
.autoscalingLimitMaxCu(4.0)
.build())
.build());
}
}
resources:
readReplica:
type: databricks:PostgresEndpoint
name: read_replica
properties:
endpointId: read-replica-1
parent: ${dev.name}
spec:
endpointType: ENDPOINT_TYPE_READ_ONLY
autoscalingLimitMinCu: 0.5
autoscalingLimitMaxCu: 4
Endpoint with Custom Autoscaling and Suspension
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const analytics = new databricks.PostgresEndpoint("analytics", {
endpointId: "analytics",
parent: dev.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_ONLY",
autoscalingLimitMinCu: 1,
autoscalingLimitMaxCu: 8,
suspendTimeoutDuration: "600s",
},
});
import pulumi
import pulumi_databricks as databricks
analytics = databricks.PostgresEndpoint("analytics",
endpoint_id="analytics",
parent=dev["name"],
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"autoscaling_limit_min_cu": 1,
"autoscaling_limit_max_cu": 8,
"suspend_timeout_duration": "600s",
})
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 {
_, err := databricks.NewPostgresEndpoint(ctx, "analytics", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("analytics"),
Parent: pulumi.Any(dev.Name),
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_ONLY"),
AutoscalingLimitMinCu: pulumi.Float64(1),
AutoscalingLimitMaxCu: pulumi.Float64(8),
SuspendTimeoutDuration: pulumi.String("600s"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var analytics = new Databricks.PostgresEndpoint("analytics", new()
{
EndpointId = "analytics",
Parent = dev.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_ONLY",
AutoscalingLimitMinCu = 1,
AutoscalingLimitMaxCu = 8,
SuspendTimeoutDuration = "600s",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 analytics = new PostgresEndpoint("analytics", PostgresEndpointArgs.builder()
.endpointId("analytics")
.parent(dev.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_ONLY")
.autoscalingLimitMinCu(1.0)
.autoscalingLimitMaxCu(8.0)
.suspendTimeoutDuration("600s")
.build())
.build());
}
}
resources:
analytics:
type: databricks:PostgresEndpoint
properties:
endpointId: analytics
parent: ${dev.name}
spec:
endpointType: ENDPOINT_TYPE_READ_ONLY
autoscalingLimitMinCu: 1
autoscalingLimitMaxCu: 8
suspendTimeoutDuration: 600s
Disabled Endpoint
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const maintenance = new databricks.PostgresEndpoint("maintenance", {
endpointId: "primary",
parent: dev.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_WRITE",
disabled: true,
},
});
import pulumi
import pulumi_databricks as databricks
maintenance = databricks.PostgresEndpoint("maintenance",
endpoint_id="primary",
parent=dev["name"],
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_WRITE",
"disabled": True,
})
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 {
_, err := databricks.NewPostgresEndpoint(ctx, "maintenance", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("primary"),
Parent: pulumi.Any(dev.Name),
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_WRITE"),
Disabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var maintenance = new Databricks.PostgresEndpoint("maintenance", new()
{
EndpointId = "primary",
Parent = dev.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_WRITE",
Disabled = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 maintenance = new PostgresEndpoint("maintenance", PostgresEndpointArgs.builder()
.endpointId("primary")
.parent(dev.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_WRITE")
.disabled(true)
.build())
.build());
}
}
resources:
maintenance:
type: databricks:PostgresEndpoint
properties:
endpointId: primary
parent: ${dev.name}
spec:
endpointType: ENDPOINT_TYPE_READ_WRITE
disabled: true
Endpoint with No Suspension
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const alwaysOn = new databricks.PostgresEndpoint("always_on", {
endpointId: "always-on",
parent: dev.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_WRITE",
noSuspension: true,
},
});
import pulumi
import pulumi_databricks as databricks
always_on = databricks.PostgresEndpoint("always_on",
endpoint_id="always-on",
parent=dev["name"],
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_WRITE",
"no_suspension": True,
})
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 {
_, err := databricks.NewPostgresEndpoint(ctx, "always_on", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("always-on"),
Parent: pulumi.Any(dev.Name),
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_WRITE"),
NoSuspension: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var alwaysOn = new Databricks.PostgresEndpoint("always_on", new()
{
EndpointId = "always-on",
Parent = dev.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_WRITE",
NoSuspension = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 alwaysOn = new PostgresEndpoint("alwaysOn", PostgresEndpointArgs.builder()
.endpointId("always-on")
.parent(dev.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_WRITE")
.noSuspension(true)
.build())
.build());
}
}
resources:
alwaysOn:
type: databricks:PostgresEndpoint
name: always_on
properties:
endpointId: always-on
parent: ${dev.name}
spec:
endpointType: ENDPOINT_TYPE_READ_WRITE
noSuspension: true
Complete Example
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const prod = new databricks.PostgresProject("prod", {
projectId: "production",
spec: {
pgVersion: 17,
displayName: "Production Workloads",
historyRetentionDuration: "2592000s",
defaultEndpointSettings: {
autoscalingLimitMinCu: 1,
autoscalingLimitMaxCu: 8,
suspendTimeoutDuration: "300s",
},
},
});
const main = new databricks.PostgresBranch("main", {
branchId: "main",
parent: prod.name,
spec: {
noExpiry: true,
},
});
const primary = new databricks.PostgresEndpoint("primary", {
endpointId: "primary",
parent: main.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_WRITE",
autoscalingLimitMinCu: 1,
autoscalingLimitMaxCu: 9,
noSuspension: true,
},
});
const readReplica = new databricks.PostgresEndpoint("read_replica", {
endpointId: "read-replica",
parent: main.name,
spec: {
endpointType: "ENDPOINT_TYPE_READ_ONLY",
autoscalingLimitMinCu: 0.5,
autoscalingLimitMaxCu: 8,
suspendTimeoutDuration: "600s",
},
});
import pulumi
import pulumi_databricks as databricks
prod = databricks.PostgresProject("prod",
project_id="production",
spec={
"pg_version": 17,
"display_name": "Production Workloads",
"history_retention_duration": "2592000s",
"default_endpoint_settings": {
"autoscaling_limit_min_cu": 1,
"autoscaling_limit_max_cu": 8,
"suspend_timeout_duration": "300s",
},
})
main = databricks.PostgresBranch("main",
branch_id="main",
parent=prod.name,
spec={
"no_expiry": True,
})
primary = databricks.PostgresEndpoint("primary",
endpoint_id="primary",
parent=main.name,
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_WRITE",
"autoscaling_limit_min_cu": 1,
"autoscaling_limit_max_cu": 9,
"no_suspension": True,
})
read_replica = databricks.PostgresEndpoint("read_replica",
endpoint_id="read-replica",
parent=main.name,
spec={
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"autoscaling_limit_min_cu": 0.5,
"autoscaling_limit_max_cu": 8,
"suspend_timeout_duration": "600s",
})
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 {
prod, err := databricks.NewPostgresProject(ctx, "prod", &databricks.PostgresProjectArgs{
ProjectId: pulumi.String("production"),
Spec: &databricks.PostgresProjectSpecArgs{
PgVersion: pulumi.Int(17),
DisplayName: pulumi.String("Production Workloads"),
HistoryRetentionDuration: pulumi.String("2592000s"),
DefaultEndpointSettings: &databricks.PostgresProjectSpecDefaultEndpointSettingsArgs{
AutoscalingLimitMinCu: pulumi.Float64(1),
AutoscalingLimitMaxCu: pulumi.Float64(8),
SuspendTimeoutDuration: pulumi.String("300s"),
},
},
})
if err != nil {
return err
}
main, err := databricks.NewPostgresBranch(ctx, "main", &databricks.PostgresBranchArgs{
BranchId: pulumi.String("main"),
Parent: prod.Name,
Spec: &databricks.PostgresBranchSpecArgs{
NoExpiry: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = databricks.NewPostgresEndpoint(ctx, "primary", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("primary"),
Parent: main.Name,
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_WRITE"),
AutoscalingLimitMinCu: pulumi.Float64(1),
AutoscalingLimitMaxCu: pulumi.Float64(9),
NoSuspension: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = databricks.NewPostgresEndpoint(ctx, "read_replica", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("read-replica"),
Parent: main.Name,
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("ENDPOINT_TYPE_READ_ONLY"),
AutoscalingLimitMinCu: pulumi.Float64(0.5),
AutoscalingLimitMaxCu: pulumi.Float64(8),
SuspendTimeoutDuration: pulumi.String("600s"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var prod = new Databricks.PostgresProject("prod", new()
{
ProjectId = "production",
Spec = new Databricks.Inputs.PostgresProjectSpecArgs
{
PgVersion = 17,
DisplayName = "Production Workloads",
HistoryRetentionDuration = "2592000s",
DefaultEndpointSettings = new Databricks.Inputs.PostgresProjectSpecDefaultEndpointSettingsArgs
{
AutoscalingLimitMinCu = 1,
AutoscalingLimitMaxCu = 8,
SuspendTimeoutDuration = "300s",
},
},
});
var main = new Databricks.PostgresBranch("main", new()
{
BranchId = "main",
Parent = prod.Name,
Spec = new Databricks.Inputs.PostgresBranchSpecArgs
{
NoExpiry = true,
},
});
var primary = new Databricks.PostgresEndpoint("primary", new()
{
EndpointId = "primary",
Parent = main.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_WRITE",
AutoscalingLimitMinCu = 1,
AutoscalingLimitMaxCu = 9,
NoSuspension = true,
},
});
var readReplica = new Databricks.PostgresEndpoint("read_replica", new()
{
EndpointId = "read-replica",
Parent = main.Name,
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "ENDPOINT_TYPE_READ_ONLY",
AutoscalingLimitMinCu = 0.5,
AutoscalingLimitMaxCu = 8,
SuspendTimeoutDuration = "600s",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.PostgresProject;
import com.pulumi.databricks.PostgresProjectArgs;
import com.pulumi.databricks.inputs.PostgresProjectSpecArgs;
import com.pulumi.databricks.inputs.PostgresProjectSpecDefaultEndpointSettingsArgs;
import com.pulumi.databricks.PostgresBranch;
import com.pulumi.databricks.PostgresBranchArgs;
import com.pulumi.databricks.inputs.PostgresBranchSpecArgs;
import com.pulumi.databricks.PostgresEndpoint;
import com.pulumi.databricks.PostgresEndpointArgs;
import com.pulumi.databricks.inputs.PostgresEndpointSpecArgs;
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 prod = new PostgresProject("prod", PostgresProjectArgs.builder()
.projectId("production")
.spec(PostgresProjectSpecArgs.builder()
.pgVersion(17)
.displayName("Production Workloads")
.historyRetentionDuration("2592000s")
.defaultEndpointSettings(PostgresProjectSpecDefaultEndpointSettingsArgs.builder()
.autoscalingLimitMinCu(1.0)
.autoscalingLimitMaxCu(8.0)
.suspendTimeoutDuration("300s")
.build())
.build())
.build());
var main = new PostgresBranch("main", PostgresBranchArgs.builder()
.branchId("main")
.parent(prod.name())
.spec(PostgresBranchSpecArgs.builder()
.noExpiry(true)
.build())
.build());
var primary = new PostgresEndpoint("primary", PostgresEndpointArgs.builder()
.endpointId("primary")
.parent(main.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_WRITE")
.autoscalingLimitMinCu(1.0)
.autoscalingLimitMaxCu(9.0)
.noSuspension(true)
.build())
.build());
var readReplica = new PostgresEndpoint("readReplica", PostgresEndpointArgs.builder()
.endpointId("read-replica")
.parent(main.name())
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("ENDPOINT_TYPE_READ_ONLY")
.autoscalingLimitMinCu(0.5)
.autoscalingLimitMaxCu(8.0)
.suspendTimeoutDuration("600s")
.build())
.build());
}
}
resources:
prod:
type: databricks:PostgresProject
properties:
projectId: production
spec:
pgVersion: 17
displayName: Production Workloads
historyRetentionDuration: 2592000s
defaultEndpointSettings:
autoscalingLimitMinCu: 1
autoscalingLimitMaxCu: 8
suspendTimeoutDuration: 300s
main:
type: databricks:PostgresBranch
properties:
branchId: main
parent: ${prod.name}
spec:
noExpiry: true
primary:
type: databricks:PostgresEndpoint
properties:
endpointId: primary
parent: ${main.name}
spec:
endpointType: ENDPOINT_TYPE_READ_WRITE
autoscalingLimitMinCu: 1
autoscalingLimitMaxCu: 9
noSuspension: true
readReplica:
type: databricks:PostgresEndpoint
name: read_replica
properties:
endpointId: read-replica
parent: ${main.name}
spec:
endpointType: ENDPOINT_TYPE_READ_ONLY
autoscalingLimitMinCu: 0.5
autoscalingLimitMaxCu: 8
suspendTimeoutDuration: 600s
Create PostgresEndpoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresEndpoint(name: string, args: PostgresEndpointArgs, opts?: CustomResourceOptions);@overload
def PostgresEndpoint(resource_name: str,
args: PostgresEndpointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresEndpoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint_id: Optional[str] = None,
parent: Optional[str] = None,
spec: Optional[PostgresEndpointSpecArgs] = None)func NewPostgresEndpoint(ctx *Context, name string, args PostgresEndpointArgs, opts ...ResourceOption) (*PostgresEndpoint, error)public PostgresEndpoint(string name, PostgresEndpointArgs args, CustomResourceOptions? opts = null)
public PostgresEndpoint(String name, PostgresEndpointArgs args)
public PostgresEndpoint(String name, PostgresEndpointArgs args, CustomResourceOptions options)
type: databricks:PostgresEndpoint
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 PostgresEndpointArgs
- 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 PostgresEndpointArgs
- 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 PostgresEndpointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresEndpointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresEndpointArgs
- 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 postgresEndpointResource = new Databricks.PostgresEndpoint("postgresEndpointResource", new()
{
EndpointId = "string",
Parent = "string",
Spec = new Databricks.Inputs.PostgresEndpointSpecArgs
{
EndpointType = "string",
AutoscalingLimitMaxCu = 0,
AutoscalingLimitMinCu = 0,
Disabled = false,
NoSuspension = false,
Settings = new Databricks.Inputs.PostgresEndpointSpecSettingsArgs
{
PgSettings =
{
{ "string", "string" },
},
},
SuspendTimeoutDuration = "string",
},
});
example, err := databricks.NewPostgresEndpoint(ctx, "postgresEndpointResource", &databricks.PostgresEndpointArgs{
EndpointId: pulumi.String("string"),
Parent: pulumi.String("string"),
Spec: &databricks.PostgresEndpointSpecArgs{
EndpointType: pulumi.String("string"),
AutoscalingLimitMaxCu: pulumi.Float64(0),
AutoscalingLimitMinCu: pulumi.Float64(0),
Disabled: pulumi.Bool(false),
NoSuspension: pulumi.Bool(false),
Settings: &databricks.PostgresEndpointSpecSettingsArgs{
PgSettings: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
SuspendTimeoutDuration: pulumi.String("string"),
},
})
var postgresEndpointResource = new PostgresEndpoint("postgresEndpointResource", PostgresEndpointArgs.builder()
.endpointId("string")
.parent("string")
.spec(PostgresEndpointSpecArgs.builder()
.endpointType("string")
.autoscalingLimitMaxCu(0.0)
.autoscalingLimitMinCu(0.0)
.disabled(false)
.noSuspension(false)
.settings(PostgresEndpointSpecSettingsArgs.builder()
.pgSettings(Map.of("string", "string"))
.build())
.suspendTimeoutDuration("string")
.build())
.build());
postgres_endpoint_resource = databricks.PostgresEndpoint("postgresEndpointResource",
endpoint_id="string",
parent="string",
spec={
"endpoint_type": "string",
"autoscaling_limit_max_cu": 0,
"autoscaling_limit_min_cu": 0,
"disabled": False,
"no_suspension": False,
"settings": {
"pg_settings": {
"string": "string",
},
},
"suspend_timeout_duration": "string",
})
const postgresEndpointResource = new databricks.PostgresEndpoint("postgresEndpointResource", {
endpointId: "string",
parent: "string",
spec: {
endpointType: "string",
autoscalingLimitMaxCu: 0,
autoscalingLimitMinCu: 0,
disabled: false,
noSuspension: false,
settings: {
pgSettings: {
string: "string",
},
},
suspendTimeoutDuration: "string",
},
});
type: databricks:PostgresEndpoint
properties:
endpointId: string
parent: string
spec:
autoscalingLimitMaxCu: 0
autoscalingLimitMinCu: 0
disabled: false
endpointType: string
noSuspension: false
settings:
pgSettings:
string: string
suspendTimeoutDuration: string
PostgresEndpoint 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 PostgresEndpoint resource accepts the following input properties:
- Endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- Parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- Spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- Endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- Parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- Spec
Postgres
Endpoint Spec Args - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- endpoint
Id String - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- parent String
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- endpoint_
id str - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- parent str
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec Args - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- endpoint
Id String - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- parent String
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec Property Map
- The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresEndpoint resource produces the following output properties:
- Create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - Status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- Uid string
- (string) - System-generated unique ID for the endpoint
- Update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- Create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - Status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- Uid string
- (string) - System-generated unique ID for the endpoint
- Update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time String - (string) - A timestamp indicating when the compute endpoint was created
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- uid String
- (string) - System-generated unique ID for the endpoint
- update
Time String - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- uid string
- (string) - System-generated unique ID for the endpoint
- update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- create_
time str - (string) - A timestamp indicating when the compute endpoint was created
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- uid str
- (string) - System-generated unique ID for the endpoint
- update_
time str - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time String - (string) - A timestamp indicating when the compute endpoint was created
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - status Property Map
- (EndpointStatus) - Current operational status of the compute endpoint
- uid String
- (string) - System-generated unique ID for the endpoint
- update
Time String - (string) - A timestamp indicating when the compute endpoint was last updated
Look up Existing PostgresEndpoint Resource
Get an existing PostgresEndpoint 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?: PostgresEndpointState, opts?: CustomResourceOptions): PostgresEndpoint@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
endpoint_id: Optional[str] = None,
name: Optional[str] = None,
parent: Optional[str] = None,
spec: Optional[PostgresEndpointSpecArgs] = None,
status: Optional[PostgresEndpointStatusArgs] = None,
uid: Optional[str] = None,
update_time: Optional[str] = None) -> PostgresEndpointfunc GetPostgresEndpoint(ctx *Context, name string, id IDInput, state *PostgresEndpointState, opts ...ResourceOption) (*PostgresEndpoint, error)public static PostgresEndpoint Get(string name, Input<string> id, PostgresEndpointState? state, CustomResourceOptions? opts = null)public static PostgresEndpoint get(String name, Output<String> id, PostgresEndpointState state, CustomResourceOptions options)resources: _: type: databricks:PostgresEndpoint 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.
- Create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- Endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- Name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - Parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- Spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- Status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- Uid string
- (string) - System-generated unique ID for the endpoint
- Update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- Create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- Endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- Name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - Parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- Spec
Postgres
Endpoint Spec Args - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- Status
Postgres
Endpoint Status Args - (EndpointStatus) - Current operational status of the compute endpoint
- Uid string
- (string) - System-generated unique ID for the endpoint
- Update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time String - (string) - A timestamp indicating when the compute endpoint was created
- endpoint
Id String - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- name String
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - parent String
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- uid String
- (string) - System-generated unique ID for the endpoint
- update
Time String - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time string - (string) - A timestamp indicating when the compute endpoint was created
- endpoint
Id string - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- name string
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - parent string
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- status
Postgres
Endpoint Status - (EndpointStatus) - Current operational status of the compute endpoint
- uid string
- (string) - System-generated unique ID for the endpoint
- update
Time string - (string) - A timestamp indicating when the compute endpoint was last updated
- create_
time str - (string) - A timestamp indicating when the compute endpoint was created
- endpoint_
id str - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- name str
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - parent str
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec
Postgres
Endpoint Spec Args - The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- status
Postgres
Endpoint Status Args - (EndpointStatus) - Current operational status of the compute endpoint
- uid str
- (string) - System-generated unique ID for the endpoint
- update_
time str - (string) - A timestamp indicating when the compute endpoint was last updated
- create
Time String - (string) - A timestamp indicating when the compute endpoint was created
- endpoint
Id String - The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name.
The ID must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens (RFC 1123).
Examples:
- With custom ID:
primary→ name becomesprojects/{project_id}/branches/{branch_id}/endpoints/primary - Without custom ID: system generates slug → name becomes
projects/{project_id}/branches/{branch_id}/endpoints/ep-example-name-x1y2z3a4
- With custom ID:
- name String
- (string) - The resource name of the endpoint. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} - parent String
- The branch containing this endpoint (API resource hierarchy). Format: projects/{project_id}/branches/{branch_id}
- spec Property Map
- The spec contains the compute endpoint configuration, including autoscaling limits, suspend timeout, and disabled state
- status Property Map
- (EndpointStatus) - Current operational status of the compute endpoint
- uid String
- (string) - System-generated unique ID for the endpoint
- update
Time String - (string) - A timestamp indicating when the compute endpoint was last updated
Supporting Types
PostgresEndpointSpec, PostgresEndpointSpecArgs
- Endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - Autoscaling
Limit doubleMax Cu - (number) - The maximum number of Compute Units
- Autoscaling
Limit doubleMin Cu - (number) - The minimum number of Compute Units
- Disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- No
Suspension bool - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- Settings
Postgres
Endpoint Spec Settings - (EndpointSettings)
- Suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- Endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - Autoscaling
Limit float64Max Cu - (number) - The maximum number of Compute Units
- Autoscaling
Limit float64Min Cu - (number) - The minimum number of Compute Units
- Disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- No
Suspension bool - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- Settings
Postgres
Endpoint Spec Settings - (EndpointSettings)
- Suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- endpoint
Type String - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - autoscaling
Limit DoubleMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit DoubleMin Cu - (number) - The minimum number of Compute Units
- disabled Boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- no
Suspension Boolean - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- settings
Postgres
Endpoint Spec Settings - (EndpointSettings)
- suspend
Timeout StringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - autoscaling
Limit numberMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit numberMin Cu - (number) - The minimum number of Compute Units
- disabled boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- no
Suspension boolean - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- settings
Postgres
Endpoint Spec Settings - (EndpointSettings)
- suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- endpoint_
type str - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - autoscaling_
limit_ floatmax_ cu - (number) - The maximum number of Compute Units
- autoscaling_
limit_ floatmin_ cu - (number) - The minimum number of Compute Units
- disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- no_
suspension bool - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- settings
Postgres
Endpoint Spec Settings - (EndpointSettings)
- suspend_
timeout_ strduration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- endpoint
Type String - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - autoscaling
Limit NumberMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit NumberMin Cu - (number) - The minimum number of Compute Units
- disabled Boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- no
Suspension Boolean - When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided
- settings Property Map
- (EndpointSettings)
- suspend
Timeout StringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
PostgresEndpointSpecSettings, PostgresEndpointSpecSettingsArgs
- Pg
Settings Dictionary<string, string> - A raw representation of Postgres settings
- Pg
Settings map[string]string - A raw representation of Postgres settings
- pg
Settings Map<String,String> - A raw representation of Postgres settings
- pg
Settings {[key: string]: string} - A raw representation of Postgres settings
- pg_
settings Mapping[str, str] - A raw representation of Postgres settings
- pg
Settings Map<String> - A raw representation of Postgres settings
PostgresEndpointStatus, PostgresEndpointStatusArgs
- Autoscaling
Limit doubleMax Cu - (number) - The maximum number of Compute Units
- Autoscaling
Limit doubleMin Cu - (number) - The minimum number of Compute Units
- Current
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - Disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- Endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - Hosts
Postgres
Endpoint Status Hosts - (EndpointHosts) - Contains host information for connecting to the endpoint
- Pending
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - Settings
Postgres
Endpoint Status Settings - (EndpointSettings)
- Suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- Autoscaling
Limit float64Max Cu - (number) - The maximum number of Compute Units
- Autoscaling
Limit float64Min Cu - (number) - The minimum number of Compute Units
- Current
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - Disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- Endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - Hosts
Postgres
Endpoint Status Hosts - (EndpointHosts) - Contains host information for connecting to the endpoint
- Pending
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - Settings
Postgres
Endpoint Status Settings - (EndpointSettings)
- Suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- autoscaling
Limit DoubleMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit DoubleMin Cu - (number) - The minimum number of Compute Units
- current
State String - (string) - Possible values are:
ACTIVE,IDLE,INIT - disabled Boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- endpoint
Type String - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - hosts
Postgres
Endpoint Status Hosts - (EndpointHosts) - Contains host information for connecting to the endpoint
- pending
State String - (string) - Possible values are:
ACTIVE,IDLE,INIT - settings
Postgres
Endpoint Status Settings - (EndpointSettings)
- suspend
Timeout StringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- autoscaling
Limit numberMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit numberMin Cu - (number) - The minimum number of Compute Units
- current
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - disabled boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- endpoint
Type string - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - hosts
Postgres
Endpoint Status Hosts - (EndpointHosts) - Contains host information for connecting to the endpoint
- pending
State string - (string) - Possible values are:
ACTIVE,IDLE,INIT - settings
Postgres
Endpoint Status Settings - (EndpointSettings)
- suspend
Timeout stringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- autoscaling_
limit_ floatmax_ cu - (number) - The maximum number of Compute Units
- autoscaling_
limit_ floatmin_ cu - (number) - The minimum number of Compute Units
- current_
state str - (string) - Possible values are:
ACTIVE,IDLE,INIT - disabled bool
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- endpoint_
type str - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - hosts
Postgres
Endpoint Status Hosts - (EndpointHosts) - Contains host information for connecting to the endpoint
- pending_
state str - (string) - Possible values are:
ACTIVE,IDLE,INIT - settings
Postgres
Endpoint Status Settings - (EndpointSettings)
- suspend_
timeout_ strduration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
- autoscaling
Limit NumberMax Cu - (number) - The maximum number of Compute Units
- autoscaling
Limit NumberMin Cu - (number) - The minimum number of Compute Units
- current
State String - (string) - Possible values are:
ACTIVE,IDLE,INIT - disabled Boolean
- (boolean) - Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action
- endpoint
Type String - (string) - The endpoint type. A branch can only have one READ_WRITE endpoint. Possible values are:
ENDPOINT_TYPE_READ_ONLY,ENDPOINT_TYPE_READ_WRITE - hosts Property Map
- (EndpointHosts) - Contains host information for connecting to the endpoint
- pending
State String - (string) - Possible values are:
ACTIVE,IDLE,INIT - settings Property Map
- (EndpointSettings)
- suspend
Timeout StringDuration - (string) - Duration of inactivity after which the compute endpoint is automatically suspended
PostgresEndpointStatusHosts, PostgresEndpointStatusHostsArgs
- Host string
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
- Host string
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
- host String
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
- host string
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
- host str
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
- host String
- (string) - The hostname to connect to this endpoint. For read-write endpoints, this is a read-write hostname which connects to the primary compute. For read-only endpoints, this is a read-only hostname which allows read-only operations
PostgresEndpointStatusSettings, PostgresEndpointStatusSettingsArgs
- Pg
Settings Dictionary<string, string> - A raw representation of Postgres settings
- Pg
Settings map[string]string - A raw representation of Postgres settings
- pg
Settings Map<String,String> - A raw representation of Postgres settings
- pg
Settings {[key: string]: string} - A raw representation of Postgres settings
- pg_
settings Mapping[str, str] - A raw representation of Postgres settings
- pg
Settings Map<String> - A raw representation of Postgres settings
Import
As of Pulumi v1.5, resources can be imported through configuration.
hcl
import {
id = “name”
to = databricks_postgres_endpoint.this
}
If you are using an older version of Pulumi, import the resource using the pulumi import command as follows:
$ pulumi import databricks:index/postgresEndpoint:PostgresEndpoint this "name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
