DatabaseAcl

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 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: DatabaseAclAclRuleArray{
				&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:

AclRules List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseAclAclRuleArgs>

A list of ACLs (structure is described below)

InstanceId string

The instance on which to create the ACL.

Region string

The region you want to attach the resource to

AclRules []DatabaseAclAclRuleArgs

A list of ACLs (structure is described below)

InstanceId string

The instance on which to create the ACL.

Region string

The region you want to attach the resource to

aclRules List<DatabaseAclAclRuleArgs>

A list of ACLs (structure is described below)

instanceId String

The instance on which to create the ACL.

region String

The region you want to attach the resource to

aclRules DatabaseAclAclRuleArgs[]

A list of ACLs (structure is described below)

instanceId string

The instance on which to create the ACL.

region string

The region you want to attach the resource to

acl_rules Sequence[DatabaseAclAclRuleArgs]

A list of ACLs (structure is described below)

instance_id str

The instance on which to create the ACL.

region str

The region you want to attach the resource to

aclRules List<Property Map>

A list of ACLs (structure is described below)

instanceId String

The instance on which to create the ACL.

region String

The region you want to attach the resource to

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.
The following state arguments are supported:
AclRules List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseAclAclRuleArgs>

A list of ACLs (structure is described below)

InstanceId string

The instance on which to create the ACL.

Region string

The region you want to attach the resource to

AclRules []DatabaseAclAclRuleArgs

A list of ACLs (structure is described below)

InstanceId string

The instance on which to create the ACL.

Region string

The region you want to attach the resource to

aclRules List<DatabaseAclAclRuleArgs>

A list of ACLs (structure is described below)

instanceId String

The instance on which to create the ACL.

region String

The region you want to attach the resource to

aclRules DatabaseAclAclRuleArgs[]

A list of ACLs (structure is described below)

instanceId string

The instance on which to create the ACL.

region string

The region you want to attach the resource to

acl_rules Sequence[DatabaseAclAclRuleArgs]

A list of ACLs (structure is described below)

instance_id str

The instance on which to create the ACL.

region str

The region you want to attach the resource to

aclRules List<Property Map>

A list of ACLs (structure is described below)

instanceId String

The instance on which to create the ACL.

region String

The region you want to attach the resource to

Supporting Types

DatabaseAclAclRule

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
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.