astra logo
Astra DB v1.0.39, May 24 23

astra.AccessList

Explore with Pulumi AI

astra.AccessList resource represents a database access list, used to limit the ip’s / CIDR groups that have access to a database.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Astra = Pulumiverse.Astra;

return await Deployment.RunAsync(() => 
{
    var example = new Astra.AccessList("example", new()
    {
        Addresses = new[]
        {
            new Astra.Inputs.AccessListAddressArgs
            {
                Address = "0.0.0.1/0",
                Enabled = true,
            },
            new Astra.Inputs.AccessListAddressArgs
            {
                Address = "0.0.0.2/0",
                Enabled = true,
            },
            new Astra.Inputs.AccessListAddressArgs
            {
                Address = "0.0.0.3/0",
                Enabled = true,
            },
        },
        DatabaseId = "a6bc9c26-e7ce-424f-84c7-0a00afb12588",
        Enabled = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-astra/sdk/go/astra"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-astra/sdk/go/astra"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.NewAccessList(ctx, "example", &astra.AccessListArgs{
			Addresses: AccessListAddressArray{
				&AccessListAddressArgs{
					Address: pulumi.String("0.0.0.1/0"),
					Enabled: pulumi.Bool(true),
				},
				&AccessListAddressArgs{
					Address: pulumi.String("0.0.0.2/0"),
					Enabled: pulumi.Bool(true),
				},
				&AccessListAddressArgs{
					Address: pulumi.String("0.0.0.3/0"),
					Enabled: pulumi.Bool(true),
				},
			},
			DatabaseId: pulumi.String("a6bc9c26-e7ce-424f-84c7-0a00afb12588"),
			Enabled:    pulumi.Bool(true),
		})
		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.astra.AccessList;
import com.pulumi.astra.AccessListArgs;
import com.pulumi.astra.inputs.AccessListAddressArgs;
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 example = new AccessList("example", AccessListArgs.builder()        
            .addresses(            
                AccessListAddressArgs.builder()
                    .address("0.0.0.1/0")
                    .enabled(true)
                    .build(),
                AccessListAddressArgs.builder()
                    .address("0.0.0.2/0")
                    .enabled(true)
                    .build(),
                AccessListAddressArgs.builder()
                    .address("0.0.0.3/0")
                    .enabled(true)
                    .build())
            .databaseId("a6bc9c26-e7ce-424f-84c7-0a00afb12588")
            .enabled(true)
            .build());

    }
}
import pulumi
import pulumiverse_astra as astra

example = astra.AccessList("example",
    addresses=[
        astra.AccessListAddressArgs(
            address="0.0.0.1/0",
            enabled=True,
        ),
        astra.AccessListAddressArgs(
            address="0.0.0.2/0",
            enabled=True,
        ),
        astra.AccessListAddressArgs(
            address="0.0.0.3/0",
            enabled=True,
        ),
    ],
    database_id="a6bc9c26-e7ce-424f-84c7-0a00afb12588",
    enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";

const example = new astra.AccessList("example", {
    addresses: [
        {
            address: "0.0.0.1/0",
            enabled: true,
        },
        {
            address: "0.0.0.2/0",
            enabled: true,
        },
        {
            address: "0.0.0.3/0",
            enabled: true,
        },
    ],
    databaseId: "a6bc9c26-e7ce-424f-84c7-0a00afb12588",
    enabled: true,
});
resources:
  example:
    type: astra:AccessList
    properties:
      addresses:
        - address: 0.0.0.1/0
          enabled: true
        - address: 0.0.0.2/0
          enabled: true
        - address: 0.0.0.3/0
          enabled: true
      databaseId: a6bc9c26-e7ce-424f-84c7-0a00afb12588
      enabled: true

Create AccessList Resource

new AccessList(name: string, args: AccessListArgs, opts?: CustomResourceOptions);
@overload
def AccessList(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               addresses: Optional[Sequence[AccessListAddressArgs]] = None,
               database_id: Optional[str] = None,
               enabled: Optional[bool] = None)
@overload
def AccessList(resource_name: str,
               args: AccessListArgs,
               opts: Optional[ResourceOptions] = None)
func NewAccessList(ctx *Context, name string, args AccessListArgs, opts ...ResourceOption) (*AccessList, error)
public AccessList(string name, AccessListArgs args, CustomResourceOptions? opts = null)
public AccessList(String name, AccessListArgs args)
public AccessList(String name, AccessListArgs args, CustomResourceOptions options)
type: astra:AccessList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AccessListArgs
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 AccessListArgs
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 AccessListArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AccessListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AccessListArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AccessList 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 AccessList resource accepts the following input properties:

Addresses List<Pulumiverse.Astra.Inputs.AccessListAddressArgs>

List of address requests that should have access to database endpoints.

DatabaseId string

The ID of the Astra database.

Enabled bool

Public access restrictions enabled or disabled

Addresses []AccessListAddressArgs

List of address requests that should have access to database endpoints.

DatabaseId string

The ID of the Astra database.

Enabled bool

Public access restrictions enabled or disabled

addresses List<AccessListAddressArgs>

List of address requests that should have access to database endpoints.

databaseId String

The ID of the Astra database.

enabled Boolean

Public access restrictions enabled or disabled

addresses AccessListAddressArgs[]

List of address requests that should have access to database endpoints.

databaseId string

The ID of the Astra database.

enabled boolean

Public access restrictions enabled or disabled

addresses Sequence[AccessListAddressArgs]

List of address requests that should have access to database endpoints.

database_id str

The ID of the Astra database.

enabled bool

Public access restrictions enabled or disabled

addresses List<Property Map>

List of address requests that should have access to database endpoints.

databaseId String

The ID of the Astra database.

enabled Boolean

Public access restrictions enabled or disabled

Outputs

All input properties are implicitly available as output properties. Additionally, the AccessList 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 AccessList Resource

Get an existing AccessList 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?: AccessListState, opts?: CustomResourceOptions): AccessList
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        addresses: Optional[Sequence[AccessListAddressArgs]] = None,
        database_id: Optional[str] = None,
        enabled: Optional[bool] = None) -> AccessList
func GetAccessList(ctx *Context, name string, id IDInput, state *AccessListState, opts ...ResourceOption) (*AccessList, error)
public static AccessList Get(string name, Input<string> id, AccessListState? state, CustomResourceOptions? opts = null)
public static AccessList get(String name, Output<String> id, AccessListState 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:
Addresses List<Pulumiverse.Astra.Inputs.AccessListAddressArgs>

List of address requests that should have access to database endpoints.

DatabaseId string

The ID of the Astra database.

Enabled bool

Public access restrictions enabled or disabled

Addresses []AccessListAddressArgs

List of address requests that should have access to database endpoints.

DatabaseId string

The ID of the Astra database.

Enabled bool

Public access restrictions enabled or disabled

addresses List<AccessListAddressArgs>

List of address requests that should have access to database endpoints.

databaseId String

The ID of the Astra database.

enabled Boolean

Public access restrictions enabled or disabled

addresses AccessListAddressArgs[]

List of address requests that should have access to database endpoints.

databaseId string

The ID of the Astra database.

enabled boolean

Public access restrictions enabled or disabled

addresses Sequence[AccessListAddressArgs]

List of address requests that should have access to database endpoints.

database_id str

The ID of the Astra database.

enabled bool

Public access restrictions enabled or disabled

addresses List<Property Map>

List of address requests that should have access to database endpoints.

databaseId String

The ID of the Astra database.

enabled Boolean

Public access restrictions enabled or disabled

Supporting Types

AccessListAddress

Address string

IP Address/CIDR group that should have access

Enabled bool

Enable/disable this IP Address/CIDR group's access

Description string

Description for the IP Address/CIDR group

Address string

IP Address/CIDR group that should have access

Enabled bool

Enable/disable this IP Address/CIDR group's access

Description string

Description for the IP Address/CIDR group

address String

IP Address/CIDR group that should have access

enabled Boolean

Enable/disable this IP Address/CIDR group's access

description String

Description for the IP Address/CIDR group

address string

IP Address/CIDR group that should have access

enabled boolean

Enable/disable this IP Address/CIDR group's access

description string

Description for the IP Address/CIDR group

address str

IP Address/CIDR group that should have access

enabled bool

Enable/disable this IP Address/CIDR group's access

description str

Description for the IP Address/CIDR group

address String

IP Address/CIDR group that should have access

enabled Boolean

Enable/disable this IP Address/CIDR group's access

description String

Description for the IP Address/CIDR group

Import

the import id should be the database_id.

 $ pulumi import astra:index/accessList:AccessList example a6bc9c26-e7ce-424f-84c7-0a00afb12588

Package Details

Repository
astra pulumiverse/pulumi-astra
License
Apache-2.0
Notes

This Pulumi package is based on the astra Terraform Provider.