Viewing docs for defang-scaleway v2.12.2
published on Tuesday, Nov 17, 2026 by Defang
published on Tuesday, Nov 17, 2026 by Defang
defang-scalewayViewing docs for defang-scaleway v2.12.2
published on Tuesday, Nov 17, 2026 by Defang
published on Tuesday, Nov 17, 2026 by Defang
Create Postgres Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Postgres(name: string, args: PostgresArgs, opts?: ComponentResourceOptions);@overload
def Postgres(resource_name: str,
args: PostgresArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Postgres(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_name: Optional[str] = None,
deploy: Optional[_compose.DeployConfigArgs] = None,
environment: Optional[Mapping[str, str]] = None,
image: Optional[str] = None,
ports: Optional[Sequence[_compose.ServicePortConfigArgs]] = None,
postgres: Optional[_compose.PostgresConfigArgs] = None,
scaleway: Optional[_scaleway.SharedInfraArgs] = None)func NewPostgres(ctx *Context, name string, args PostgresArgs, opts ...ResourceOption) (*Postgres, error)public Postgres(string name, PostgresArgs args, ComponentResourceOptions? opts = null)
public Postgres(String name, PostgresArgs args)
public Postgres(String name, PostgresArgs args, ComponentResourceOptions options)
type: defang-scaleway:Postgres
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "defang-scaleway_postgres" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresArgs
- 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 PostgresArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresArgs
- The arguments to resource properties.
- opts ComponentResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresArgs
- The arguments to resource properties.
- options ComponentResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var postgresResource = new DefangScaleway.Postgres("postgresResource", new()
{
ProjectName = "string",
Deploy = new DefangScaleway.Compose.Inputs.DeployConfigArgs
{
Replicas = 0,
Resources = new DefangScaleway.Compose.Inputs.ResourcesArgs
{
Reservations = new DefangScaleway.Compose.Inputs.ResourceConfigArgs
{
Cpus = 0.0,
Memory = "string",
},
},
},
Environment =
{
{ "string", "string" },
},
Image = "string",
Ports = new[]
{
new DefangScaleway.Compose.Inputs.ServicePortConfigArgs
{
Target = 0,
AppProtocol = "string",
Listener = "string",
Mode = "string",
Protocol = "string",
},
},
Postgres = new DefangScaleway.Compose.Inputs.PostgresConfigArgs
{
AllowDowntime = false,
FromSnapshot = "string",
},
Scaleway = new() { },
});
example, err := defangscaleway.NewPostgres(ctx, "postgresResource", &defangscaleway.PostgresArgs{
ProjectName: "string",
Deploy: &compose.DeployConfigArgs{
Replicas: pulumi.Int(0),
Resources: &compose.ResourcesArgs{
Reservations: &compose.ResourceConfigArgs{
Cpus: pulumi.Float64(0),
Memory: pulumi.String("string"),
},
},
},
Environment: pulumi.StringMap{
"string": pulumi.String("string"),
},
Image: pulumi.String("string"),
Ports: compose.ServicePortConfigArray{
&compose.ServicePortConfigArgs{
Target: pulumi.Int(0),
AppProtocol: pulumi.String("string"),
Listener: pulumi.String("string"),
Mode: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
},
Postgres: &compose.PostgresConfigArgs{
AllowDowntime: pulumi.Bool(false),
FromSnapshot: pulumi.String("string"),
},
Scaleway: &scaleway.SharedInfraArgs{},
})
resource "defang-scaleway_postgres" "postgresResource" {
lifecycle {
create_before_destroy = true
}
project_name = "string"
deploy = {
replicas = 0
resources = {
reservations = {
cpus = 0
memory = "string"
}
}
}
environment = {
"string" = "string"
}
image = "string"
ports {
target = 0
app_protocol = "string"
listener = "string"
mode = "string"
protocol = "string"
}
postgres = {
allow_downtime = false
from_snapshot = "string"
}
scaleway = {}
}
var postgresResource = new Postgres("postgresResource", PostgresArgs.builder()
.projectName("string")
.deploy(DeployConfigArgs.builder()
.replicas(0)
.resources(ResourcesArgs.builder()
.reservations(ResourceConfigArgs.builder()
.cpus(0.0)
.memory("string")
.build())
.build())
.build())
.environment(Map.of("string", "string"))
.image("string")
.ports(ServicePortConfigArgs.builder()
.target(0)
.appProtocol("string")
.listener("string")
.mode("string")
.protocol("string")
.build())
.postgres(PostgresConfigArgs.builder()
.allowDowntime(false)
.fromSnapshot("string")
.build())
.scaleway(SharedInfraArgs.builder()
.build())
.build());
postgres_resource = defang_scaleway.Postgres("postgresResource",
project_name="string",
deploy={
"replicas": 0,
"resources": {
"reservations": {
"cpus": float(0),
"memory": "string",
},
},
},
environment={
"string": "string",
},
image="string",
ports=[{
"target": 0,
"app_protocol": "string",
"listener": "string",
"mode": "string",
"protocol": "string",
}],
postgres={
"allow_downtime": False,
"from_snapshot": "string",
},
scaleway={})
const postgresResource = new defang_scaleway.Postgres("postgresResource", {
projectName: "string",
deploy: {
replicas: 0,
resources: {
reservations: {
cpus: 0,
memory: "string",
},
},
},
environment: {
string: "string",
},
image: "string",
ports: [{
target: 0,
appProtocol: "string",
listener: "string",
mode: "string",
protocol: "string",
}],
postgres: {
allowDowntime: false,
fromSnapshot: "string",
},
scaleway: {},
});
type: defang-scaleway:Postgres
properties:
deploy:
replicas: 0
resources:
reservations:
cpus: 0
memory: string
environment:
string: string
image: string
ports:
- appProtocol: string
listener: string
mode: string
protocol: string
target: 0
postgres:
allowDowntime: false
fromSnapshot: string
projectName: string
scaleway: {}
Postgres 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 Postgres resource accepts the following input properties:
- Project
Name string - Deploy
Defang
Labs. Defang Scaleway. Compose. Inputs. Deploy Config - Environment Dictionary<string, string>
- Image string
- Ports
List<Defang
Labs. Defang Scaleway. Compose. Inputs. Service Port Config> - Postgres
Defang
Labs. Defang Scaleway. Compose. Inputs. Postgres Config - Scaleway
Defang
Labs. Defang Scaleway. Scaleway. Inputs. Shared Infra
- Project
Name string - Deploy
Deploy
Config Args - Environment map[string]string
- Image string
- Ports
Service
Port Config Args - Postgres
Postgres
Config Args - Scaleway
Shared
Infra Args
- project_
name string - deploy object
- environment map(string)
- image string
- ports list(object)
- postgres object
- scaleway object
- project
Name String - deploy
Deploy
Config - environment Map<String,String>
- image String
- ports
List<Service
Port Config> - postgres
Postgres
Config - scaleway
Shared
Infra
- project
Name string - deploy
compose
Deploy Config - environment {[key: string]: string}
- image string
- ports
compose
Service Port Config[] - postgres
compose
Postgres Config - scaleway
scaleway
Shared Infra
- project
Name String - deploy Property Map
- environment Map<String>
- image String
- ports List<Property Map>
- postgres Property Map
- scaleway Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Postgres resource produces the following output properties:
- Connection
Url string - Defang
Deployment string - Endpoint string
- Connection
Url string - Defang
Deployment string - Endpoint string
- connection_
url string - defang_
deployment string - endpoint string
- connection
Url String - defang
Deployment String - endpoint String
- connection
Url string - defang
Deployment string - endpoint string
- connection_
url str - defang_
deployment str - endpoint str
- connection
Url String - defang
Deployment String - endpoint String
Supporting Types
DeployConfig, DeployConfigArgs
- replicas Number
- resources Property Map
PostgresConfig, PostgresConfigArgs
- Allow
Downtime bool - From
Snapshot string
- Allow
Downtime bool - From
Snapshot string
- allow_
downtime bool - from_
snapshot string
- allow
Downtime Boolean - from
Snapshot String
- allow
Downtime boolean - from
Snapshot string
- allow_
downtime bool - from_
snapshot str
- allow
Downtime Boolean - from
Snapshot String
ResourceConfig, ResourceConfigArgs
Resources, ResourcesArgs
ServicePortConfig, ServicePortConfigArgs
- Target int
- App
Protocol string - Listener string
- Mode string
- Protocol string
- Target int
- App
Protocol string - Listener string
- Mode string
- Protocol string
- target number
- app_
protocol string - listener string
- mode string
- protocol string
- target Integer
- app
Protocol String - listener String
- mode String
- protocol String
- target number
- app
Protocol string - listener string
- mode string
- protocol string
- target int
- app_
protocol str - listener str
- mode str
- protocol str
- target Number
- app
Protocol String - listener String
- mode String
- protocol String
Package Details
- Repository
- defang-scaleway DefangLabs/pulumi-defang
- License
- Apache-2.0
defang-scalewayViewing docs for defang-scaleway v2.12.2
published on Tuesday, Nov 17, 2026 by Defang
published on Tuesday, Nov 17, 2026 by Defang