Astra

Community
Package contributed by a community member
v1.0.25 published on Tuesday, Jun 21, 2022 by pulumiverse

AccessList

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 Pulumi;
using Astra = Pulumiverse.Astra;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Astra.AccessList("example", new Astra.AccessListArgs
        {
            Addresses = 
            {
                new Astra.Inputs.AccessListAddressArgs
                {
                    Requests = 
                    {
                        new Astra.Inputs.AccessListAddressRequestArgs
                        {
                            Address = "0.0.0.0/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-index/sdk/go/index"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := astra.NewAccessList(ctx, "example", &astra.AccessListArgs{
			Addresses: AccessListAddressArray{
				&AccessListAddressArgs{
					Requests: AccessListAddressRequestArray{
						&AccessListAddressRequestArgs{
							Address: pulumi.String("0.0.0.0/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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()
                .requests(AccessListAddressRequestArgs.builder()
                    .address("0.0.0.0/0")
                    .enabled(true)
                    .build())
                .build())
            .databaseId("a6bc9c26-e7ce-424f-84c7-0a00afb12588")
            .enabled(true)
            .build());

    }
}
import pulumi
import pulumiverse_astra as astra

example = astra.AccessList("example",
    addresses=[astra.AccessListAddressArgs(
        requests=[astra.AccessListAddressRequestArgs(
            address="0.0.0.0/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: [{
        requests: [{
            address: "0.0.0.0/0",
            enabled: true,
        }],
    }],
    databaseId: "a6bc9c26-e7ce-424f-84c7-0a00afb12588",
    enabled: true,
});
resources:
  example:
    type: astra:AccessList
    properties:
      addresses:
        - requests:
            - address: 0.0.0.0/0
              enabled: true
      databaseId: a6bc9c26-e7ce-424f-84c7-0a00afb12588
      enabled: true

Create a 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 an 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

AccessListAddressRequest

Address string
Enabled bool
Description string
Address string
Enabled bool
Description string
address String
enabled Boolean
description String
address string
enabled boolean
description string
address String
enabled Boolean
description String

Import

the import id includes the database_id and the keyspace name.

 $ pulumi import astra:index/accessList:AccessList example 48bfc13b-c1a5-48db-b70f-b6ef9709872b/keyspace/example

Package Details

Repository
https://github.com/pulumiverse/pulumi-astra
License
Apache-2.0
Notes

This Pulumi package is based on the astra Terraform Provider.