scaleway.DatabaseAcl
Explore with Pulumi AI
Creates and manages Scaleway Database instance authorized IPs. For more information, see the documentation.
Examples
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";
const main = new scaleway.DatabaseAcl("main", {
instanceId: scaleway_rdb_instance.main.id,
aclRules: [{
ip: "1.2.3.4/32",
description: "foo",
}],
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway
main = scaleway.DatabaseAcl("main",
instance_id=scaleway_rdb_instance["main"]["id"],
acl_rules=[scaleway.DatabaseAclAclRuleArgs(
ip="1.2.3.4/32",
description="foo",
)])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.DatabaseAcl("main", new()
{
InstanceId = scaleway_rdb_instance.Main.Id,
AclRules = new[]
{
new Scaleway.Inputs.DatabaseAclAclRuleArgs
{
Ip = "1.2.3.4/32",
Description = "foo",
},
},
});
});
package main
import (
"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.NewDatabaseAcl(ctx, "main", &scaleway.DatabaseAclArgs{
InstanceId: pulumi.Any(scaleway_rdb_instance.Main.Id),
AclRules: scaleway.DatabaseAclAclRuleArray{
&scaleway.DatabaseAclAclRuleArgs{
Ip: pulumi.String("1.2.3.4/32"),
Description: pulumi.String("foo"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseAcl;
import com.pulumi.scaleway.DatabaseAclArgs;
import com.pulumi.scaleway.inputs.DatabaseAclAclRuleArgs;
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 main = new DatabaseAcl("main", DatabaseAclArgs.builder()
.instanceId(scaleway_rdb_instance.main().id())
.aclRules(DatabaseAclAclRuleArgs.builder()
.ip("1.2.3.4/32")
.description("foo")
.build())
.build());
}
}
resources:
main:
type: scaleway:DatabaseAcl
properties:
instanceId: ${scaleway_rdb_instance.main.id}
aclRules:
- ip: 1.2.3.4/32
description: foo
Create DatabaseAcl Resource
new DatabaseAcl(name: string, args: DatabaseAclArgs, opts?: CustomResourceOptions);
@overload
def DatabaseAcl(resource_name: str,
opts: Optional[ResourceOptions] = None,
acl_rules: Optional[Sequence[DatabaseAclAclRuleArgs]] = None,
instance_id: Optional[str] = None,
region: Optional[str] = None)
@overload
def DatabaseAcl(resource_name: str,
args: DatabaseAclArgs,
opts: Optional[ResourceOptions] = None)
func NewDatabaseAcl(ctx *Context, name string, args DatabaseAclArgs, opts ...ResourceOption) (*DatabaseAcl, error)
public DatabaseAcl(string name, DatabaseAclArgs args, CustomResourceOptions? opts = null)
public DatabaseAcl(String name, DatabaseAclArgs args)
public DatabaseAcl(String name, DatabaseAclArgs args, CustomResourceOptions options)
type: scaleway:DatabaseAcl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseAclArgs
- 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 DatabaseAclArgs
- 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 DatabaseAclArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseAclArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DatabaseAcl Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DatabaseAcl resource accepts the following input properties:
- Acl
Rules List<Lbrlabs.Pulumi Package. Scaleway. Inputs. Database Acl Acl Rule> A list of ACLs (structure is described below)
- Instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- Region string
region
) The region in which the Database Instance should be created.
- Acl
Rules []DatabaseAcl Acl Rule Args A list of ACLs (structure is described below)
- Instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- Region string
region
) The region in which the Database Instance should be created.
- acl
Rules List<DatabaseAcl Acl Rule> A list of ACLs (structure is described below)
- instance
Id String UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region String
region
) The region in which the Database Instance should be created.
- acl
Rules DatabaseAcl Acl Rule[] A list of ACLs (structure is described below)
- instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region string
region
) The region in which the Database Instance should be created.
- acl_
rules Sequence[DatabaseAcl Acl Rule Args] A list of ACLs (structure is described below)
- instance_
id str UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region str
region
) The region in which the Database Instance should be created.
- acl
Rules List<Property Map> A list of ACLs (structure is described below)
- instance
Id String UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region String
region
) The region in which the Database Instance should be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseAcl resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing DatabaseAcl Resource
Get an existing DatabaseAcl 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?: DatabaseAclState, opts?: CustomResourceOptions): DatabaseAcl
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl_rules: Optional[Sequence[DatabaseAclAclRuleArgs]] = None,
instance_id: Optional[str] = None,
region: Optional[str] = None) -> DatabaseAcl
func GetDatabaseAcl(ctx *Context, name string, id IDInput, state *DatabaseAclState, opts ...ResourceOption) (*DatabaseAcl, error)
public static DatabaseAcl Get(string name, Input<string> id, DatabaseAclState? state, CustomResourceOptions? opts = null)
public static DatabaseAcl get(String name, Output<String> id, DatabaseAclState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Acl
Rules List<Lbrlabs.Pulumi Package. Scaleway. Inputs. Database Acl Acl Rule> A list of ACLs (structure is described below)
- Instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- Region string
region
) The region in which the Database Instance should be created.
- Acl
Rules []DatabaseAcl Acl Rule Args A list of ACLs (structure is described below)
- Instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- Region string
region
) The region in which the Database Instance should be created.
- acl
Rules List<DatabaseAcl Acl Rule> A list of ACLs (structure is described below)
- instance
Id String UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region String
region
) The region in which the Database Instance should be created.
- acl
Rules DatabaseAcl Acl Rule[] A list of ACLs (structure is described below)
- instance
Id string UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region string
region
) The region in which the Database Instance should be created.
- acl_
rules Sequence[DatabaseAcl Acl Rule Args] A list of ACLs (structure is described below)
- instance_
id str UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region str
region
) The region in which the Database Instance should be created.
- acl
Rules List<Property Map> A list of ACLs (structure is described below)
- instance
Id String UUID of the rdb instance.
Important: Updates to
instance_id
will recreate the Database ACL.- region String
region
) The region in which the Database Instance should be created.
Supporting Types
DatabaseAclAclRule, DatabaseAclAclRuleArgs
- Ip string
The ip range to whitelist in CIDR notation
- Description string
A text describing this rule. Default description:
IP allowed
- Ip string
The ip range to whitelist in CIDR notation
- Description string
A text describing this rule. Default description:
IP allowed
- ip String
The ip range to whitelist in CIDR notation
- description String
A text describing this rule. Default description:
IP allowed
- ip string
The ip range to whitelist in CIDR notation
- description string
A text describing this rule. Default description:
IP allowed
- ip str
The ip range to whitelist in CIDR notation
- description str
A text describing this rule. Default description:
IP allowed
- ip String
The ip range to whitelist in CIDR notation
- description String
A text describing this rule. Default description:
IP allowed
Import
Database Instance can be imported using the {region}/{id}
, e.g. bash
$ pulumi import scaleway:index/databaseAcl:DatabaseAcl acl01 fr-par/11111111-1111-1111-1111-111111111111
Package Details
- Repository
- scaleway lbrlabs/pulumi-scaleway
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
scaleway
Terraform Provider.