astra.PrivateLink
Explore with Pulumi AI
astra.PrivateLink
provides a private link resource. Private Link is a private network endpoint that can be created to connect from your vpc to Astra without using a publicly routable IP address. astra.PrivateLink
resources are associated with a database id. Once the private_link resource is created in Astra it must be linked to an endpoint within your vpc, use astra.PrivateLinkEndpoint
to do this.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Astra = Pulumiverse.Astra;
return await Deployment.RunAsync(() =>
{
var example = new Astra.PrivateLink("example", new()
{
AllowedPrincipals = new[]
{
"arn:aws:iam::111708290731:user/sebastian.estevez",
},
DatabaseId = "a6bc9c26-e7ce-424f-84c7-0a00afb12588",
DatacenterId = "a6bc9c26-e7ce-424f-84c7-0a00afb12588-1",
});
});
package main
import (
"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.NewPrivateLink(ctx, "example", &astra.PrivateLinkArgs{
AllowedPrincipals: pulumi.StringArray{
pulumi.String("arn:aws:iam::111708290731:user/sebastian.estevez"),
},
DatabaseId: pulumi.String("a6bc9c26-e7ce-424f-84c7-0a00afb12588"),
DatacenterId: pulumi.String("a6bc9c26-e7ce-424f-84c7-0a00afb12588-1"),
})
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.PrivateLink;
import com.pulumi.astra.PrivateLinkArgs;
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 PrivateLink("example", PrivateLinkArgs.builder()
.allowedPrincipals("arn:aws:iam::111708290731:user/sebastian.estevez")
.databaseId("a6bc9c26-e7ce-424f-84c7-0a00afb12588")
.datacenterId("a6bc9c26-e7ce-424f-84c7-0a00afb12588-1")
.build());
}
}
import pulumi
import pulumiverse_astra as astra
example = astra.PrivateLink("example",
allowed_principals=["arn:aws:iam::111708290731:user/sebastian.estevez"],
database_id="a6bc9c26-e7ce-424f-84c7-0a00afb12588",
datacenter_id="a6bc9c26-e7ce-424f-84c7-0a00afb12588-1")
import * as pulumi from "@pulumi/pulumi";
import * as astra from "@pulumi/astra";
const example = new astra.PrivateLink("example", {
allowedPrincipals: ["arn:aws:iam::111708290731:user/sebastian.estevez"],
databaseId: "a6bc9c26-e7ce-424f-84c7-0a00afb12588",
datacenterId: "a6bc9c26-e7ce-424f-84c7-0a00afb12588-1",
});
resources:
example:
type: astra:PrivateLink
properties:
allowedPrincipals:
- arn:aws:iam::111708290731:user/sebastian.estevez
databaseId: a6bc9c26-e7ce-424f-84c7-0a00afb12588
datacenterId: a6bc9c26-e7ce-424f-84c7-0a00afb12588-1
Create PrivateLink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivateLink(name: string, args: PrivateLinkArgs, opts?: CustomResourceOptions);
@overload
def PrivateLink(resource_name: str,
args: PrivateLinkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrivateLink(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_principals: Optional[Sequence[str]] = None,
database_id: Optional[str] = None,
datacenter_id: Optional[str] = None)
func NewPrivateLink(ctx *Context, name string, args PrivateLinkArgs, opts ...ResourceOption) (*PrivateLink, error)
public PrivateLink(string name, PrivateLinkArgs args, CustomResourceOptions? opts = null)
public PrivateLink(String name, PrivateLinkArgs args)
public PrivateLink(String name, PrivateLinkArgs args, CustomResourceOptions options)
type: astra:PrivateLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PrivateLinkArgs
- 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 PrivateLinkArgs
- 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 PrivateLinkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivateLinkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var privateLinkResource = new Astra.PrivateLink("privateLinkResource", new()
{
AllowedPrincipals = new[]
{
"string",
},
DatabaseId = "string",
DatacenterId = "string",
});
example, err := astra.NewPrivateLink(ctx, "privateLinkResource", &astra.PrivateLinkArgs{
AllowedPrincipals: pulumi.StringArray{
pulumi.String("string"),
},
DatabaseId: pulumi.String("string"),
DatacenterId: pulumi.String("string"),
})
var privateLinkResource = new PrivateLink("privateLinkResource", PrivateLinkArgs.builder()
.allowedPrincipals("string")
.databaseId("string")
.datacenterId("string")
.build());
private_link_resource = astra.PrivateLink("privateLinkResource",
allowed_principals=["string"],
database_id="string",
datacenter_id="string")
const privateLinkResource = new astra.PrivateLink("privateLinkResource", {
allowedPrincipals: ["string"],
databaseId: "string",
datacenterId: "string",
});
type: astra:PrivateLink
properties:
allowedPrincipals:
- string
databaseId: string
datacenterId: string
PrivateLink 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 PrivateLink resource accepts the following input properties:
- Allowed
Principals List<string> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- Database
Id string - Astra database where private link will be enabled.
- Datacenter
Id string - Astra datacenter in the region where the private link will be created.
- Allowed
Principals []string - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- Database
Id string - Astra database where private link will be enabled.
- Datacenter
Id string - Astra datacenter in the region where the private link will be created.
- allowed
Principals List<String> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id String - Astra database where private link will be enabled.
- datacenter
Id String - Astra datacenter in the region where the private link will be created.
- allowed
Principals string[] - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id string - Astra database where private link will be enabled.
- datacenter
Id string - Astra datacenter in the region where the private link will be created.
- allowed_
principals Sequence[str] - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database_
id str - Astra database where private link will be enabled.
- datacenter_
id str - Astra datacenter in the region where the private link will be created.
- allowed
Principals List<String> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id String - Astra database where private link will be enabled.
- datacenter
Id String - Astra datacenter in the region where the private link will be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivateLink resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - Name of the endpoint service for private link generated by the cloud provider.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
name str - Name of the endpoint service for private link generated by the cloud provider.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - Name of the endpoint service for private link generated by the cloud provider.
Look up Existing PrivateLink Resource
Get an existing PrivateLink 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?: PrivateLinkState, opts?: CustomResourceOptions): PrivateLink
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_principals: Optional[Sequence[str]] = None,
database_id: Optional[str] = None,
datacenter_id: Optional[str] = None,
service_name: Optional[str] = None) -> PrivateLink
func GetPrivateLink(ctx *Context, name string, id IDInput, state *PrivateLinkState, opts ...ResourceOption) (*PrivateLink, error)
public static PrivateLink Get(string name, Input<string> id, PrivateLinkState? state, CustomResourceOptions? opts = null)
public static PrivateLink get(String name, Output<String> id, PrivateLinkState 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.
- Allowed
Principals List<string> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- Database
Id string - Astra database where private link will be enabled.
- Datacenter
Id string - Astra datacenter in the region where the private link will be created.
- Service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- Allowed
Principals []string - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- Database
Id string - Astra database where private link will be enabled.
- Datacenter
Id string - Astra datacenter in the region where the private link will be created.
- Service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- allowed
Principals List<String> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id String - Astra database where private link will be enabled.
- datacenter
Id String - Astra datacenter in the region where the private link will be created.
- service
Name String - Name of the endpoint service for private link generated by the cloud provider.
- allowed
Principals string[] - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id string - Astra database where private link will be enabled.
- datacenter
Id string - Astra datacenter in the region where the private link will be created.
- service
Name string - Name of the endpoint service for private link generated by the cloud provider.
- allowed_
principals Sequence[str] - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database_
id str - Astra database where private link will be enabled.
- datacenter_
id str - Astra datacenter in the region where the private link will be created.
- service_
name str - Name of the endpoint service for private link generated by the cloud provider.
- allowed
Principals List<String> - List of service principals to apply to the Private Link (i.e. arn:aws:iam::123456789012:role/admin).
- database
Id String - Astra database where private link will be enabled.
- datacenter
Id String - Astra datacenter in the region where the private link will be created.
- service
Name String - Name of the endpoint service for private link generated by the cloud provider.
Import
$ pulumi import astra:index/privateLink:PrivateLink example a6bc9c26-e7ce-424f-84c7-0a00afb12588/datacenter/a6bc9c26-e7ce-424f-84c7-0a00afb12588/serviceNames/svc-name-here
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- astra pulumiverse/pulumi-astra
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
astra
Terraform Provider.