aiven.AzurePrivatelinkConnectionApproval
Explore with Pulumi AI
Approves an Azure Private Link connection to an Aiven service with an associated endpoint IP.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
import * as azurerm from "@pulumi/azurerm";
const staticIps: aiven.StaticIp[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
staticIps.push(new aiven.StaticIp(`static_ips-${range.value}`, {
project: projectId,
cloudName: region,
}));
}
const _default = new aiven.Pg("default", {
serviceName: "postgres",
project: aivenProjectId,
projectVpcId: aivenProjectVpcId,
cloudName: region,
plan: plan,
staticIps: staticIps.map(sip => (sip.staticIpAddressId)),
pgUserConfig: {
pgVersion: "13",
staticIps: true,
privatelinkAccess: {
pg: true,
pgbouncer: true,
},
},
});
const privatelink = new aiven.AzurePrivatelink("privatelink", {
project: aivenProjectId,
serviceName: _default.name,
userSubscriptionIds: [azureSubscriptionId],
});
const endpoint = new azurerm.index.PrivateEndpoint("endpoint", {
name: "postgres-endpoint",
location: region,
resourceGroupName: azureResourceGroup.name,
subnetId: azureSubnetId,
privateServiceConnection: [{
name: _default.name,
privateConnectionResourceId: privatelink.azureServiceId,
isManualConnection: true,
requestMessage: _default.name,
}],
}, {
dependsOn: [privatelink],
});
const approval = new aiven.AzurePrivatelinkConnectionApproval("approval", {
project: aivenProjectId,
serviceName: _default.serviceName,
endpointIpAddress: endpoint.privateServiceConnection[0].privateIpAddress,
});
import pulumi
import pulumi_aiven as aiven
import pulumi_azurerm as azurerm
static_ips = []
for range in [{"value": i} for i in range(0, 2)]:
static_ips.append(aiven.StaticIp(f"static_ips-{range['value']}",
project=project_id,
cloud_name=region))
default = aiven.Pg("default",
service_name="postgres",
project=aiven_project_id,
project_vpc_id=aiven_project_vpc_id,
cloud_name=region,
plan=plan,
static_ips=[sip.static_ip_address_id for sip in static_ips],
pg_user_config={
"pg_version": "13",
"static_ips": True,
"privatelink_access": {
"pg": True,
"pgbouncer": True,
},
})
privatelink = aiven.AzurePrivatelink("privatelink",
project=aiven_project_id,
service_name=default.name,
user_subscription_ids=[azure_subscription_id])
endpoint = azurerm.index.PrivateEndpoint("endpoint",
name=postgres-endpoint,
location=region,
resource_group_name=azure_resource_group.name,
subnet_id=azure_subnet_id,
private_service_connection=[{
name: default.name,
privateConnectionResourceId: privatelink.azure_service_id,
isManualConnection: True,
requestMessage: default.name,
}],
opts = pulumi.ResourceOptions(depends_on=[privatelink]))
approval = aiven.AzurePrivatelinkConnectionApproval("approval",
project=aiven_project_id,
service_name=default.service_name,
endpoint_ip_address=endpoint["privateServiceConnection"][0]["privateIpAddress"])
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
using Azurerm = Pulumi.Azurerm;
return await Deployment.RunAsync(() =>
{
var staticIps = new List<Aiven.StaticIp>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
staticIps.Add(new Aiven.StaticIp($"static_ips-{range.Value}", new()
{
Project = projectId,
CloudName = region,
}));
}
var @default = new Aiven.Pg("default", new()
{
ServiceName = "postgres",
Project = aivenProjectId,
ProjectVpcId = aivenProjectVpcId,
CloudName = region,
Plan = plan,
StaticIps = staticIps.Select(sip =>
{
return sip.StaticIpAddressId;
}).ToList(),
PgUserConfig = new Aiven.Inputs.PgPgUserConfigArgs
{
PgVersion = "13",
StaticIps = true,
PrivatelinkAccess = new Aiven.Inputs.PgPgUserConfigPrivatelinkAccessArgs
{
Pg = true,
Pgbouncer = true,
},
},
});
var privatelink = new Aiven.AzurePrivatelink("privatelink", new()
{
Project = aivenProjectId,
ServiceName = @default.Name,
UserSubscriptionIds = new[]
{
azureSubscriptionId,
},
});
var endpoint = new Azurerm.Index.PrivateEndpoint("endpoint", new()
{
Name = "postgres-endpoint",
Location = region,
ResourceGroupName = azureResourceGroup.Name,
SubnetId = azureSubnetId,
PrivateServiceConnection = new[]
{
{
{ "name", @default.Name },
{ "privateConnectionResourceId", privatelink.AzureServiceId },
{ "isManualConnection", true },
{ "requestMessage", @default.Name },
},
},
}, new CustomResourceOptions
{
DependsOn =
{
privatelink,
},
});
var approval = new Aiven.AzurePrivatelinkConnectionApproval("approval", new()
{
Project = aivenProjectId,
ServiceName = @default.ServiceName,
EndpointIpAddress = endpoint.PrivateServiceConnection[0].PrivateIpAddress,
});
});
Coming soon!
Coming soon!
Create AzurePrivatelinkConnectionApproval Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AzurePrivatelinkConnectionApproval(name: string, args: AzurePrivatelinkConnectionApprovalArgs, opts?: CustomResourceOptions);
@overload
def AzurePrivatelinkConnectionApproval(resource_name: str,
args: AzurePrivatelinkConnectionApprovalArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AzurePrivatelinkConnectionApproval(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
endpoint_ip_address: Optional[str] = None)
func NewAzurePrivatelinkConnectionApproval(ctx *Context, name string, args AzurePrivatelinkConnectionApprovalArgs, opts ...ResourceOption) (*AzurePrivatelinkConnectionApproval, error)
public AzurePrivatelinkConnectionApproval(string name, AzurePrivatelinkConnectionApprovalArgs args, CustomResourceOptions? opts = null)
public AzurePrivatelinkConnectionApproval(String name, AzurePrivatelinkConnectionApprovalArgs args)
public AzurePrivatelinkConnectionApproval(String name, AzurePrivatelinkConnectionApprovalArgs args, CustomResourceOptions options)
type: aiven:AzurePrivatelinkConnectionApproval
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 AzurePrivatelinkConnectionApprovalArgs
- 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 AzurePrivatelinkConnectionApprovalArgs
- 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 AzurePrivatelinkConnectionApprovalArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AzurePrivatelinkConnectionApprovalArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AzurePrivatelinkConnectionApprovalArgs
- 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 azurePrivatelinkConnectionApprovalResource = new Aiven.AzurePrivatelinkConnectionApproval("azurePrivatelinkConnectionApprovalResource", new()
{
Project = "string",
ServiceName = "string",
EndpointIpAddress = "string",
});
example, err := aiven.NewAzurePrivatelinkConnectionApproval(ctx, "azurePrivatelinkConnectionApprovalResource", &aiven.AzurePrivatelinkConnectionApprovalArgs{
Project: pulumi.String("string"),
ServiceName: pulumi.String("string"),
EndpointIpAddress: pulumi.String("string"),
})
var azurePrivatelinkConnectionApprovalResource = new AzurePrivatelinkConnectionApproval("azurePrivatelinkConnectionApprovalResource", AzurePrivatelinkConnectionApprovalArgs.builder()
.project("string")
.serviceName("string")
.endpointIpAddress("string")
.build());
azure_privatelink_connection_approval_resource = aiven.AzurePrivatelinkConnectionApproval("azurePrivatelinkConnectionApprovalResource",
project="string",
service_name="string",
endpoint_ip_address="string")
const azurePrivatelinkConnectionApprovalResource = new aiven.AzurePrivatelinkConnectionApproval("azurePrivatelinkConnectionApprovalResource", {
project: "string",
serviceName: "string",
endpointIpAddress: "string",
});
type: aiven:AzurePrivatelinkConnectionApproval
properties:
endpointIpAddress: string
project: string
serviceName: string
AzurePrivatelinkConnectionApproval 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 AzurePrivatelinkConnectionApproval resource accepts the following input properties:
- Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Endpoint
Ip stringAddress - IP address of Azure private endpoint.
- Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Endpoint
Ip stringAddress - IP address of Azure private endpoint.
- project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name String - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- endpoint
Ip StringAddress - IP address of Azure private endpoint.
- project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- endpoint
Ip stringAddress - IP address of Azure private endpoint.
- project str
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service_
name str - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- endpoint_
ip_ straddress - IP address of Azure private endpoint.
- project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name String - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- endpoint
Ip StringAddress - IP address of Azure private endpoint.
Outputs
All input properties are implicitly available as output properties. Additionally, the AzurePrivatelinkConnectionApproval resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Privatelink
Connection stringId - The ID of the Private Link connection.
- State string
- The state of the Private Link connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Privatelink
Connection stringId - The ID of the Private Link connection.
- State string
- The state of the Private Link connection.
- id String
- The provider-assigned unique ID for this managed resource.
- privatelink
Connection StringId - The ID of the Private Link connection.
- state String
- The state of the Private Link connection.
- id string
- The provider-assigned unique ID for this managed resource.
- privatelink
Connection stringId - The ID of the Private Link connection.
- state string
- The state of the Private Link connection.
- id str
- The provider-assigned unique ID for this managed resource.
- privatelink_
connection_ strid - The ID of the Private Link connection.
- state str
- The state of the Private Link connection.
- id String
- The provider-assigned unique ID for this managed resource.
- privatelink
Connection StringId - The ID of the Private Link connection.
- state String
- The state of the Private Link connection.
Look up Existing AzurePrivatelinkConnectionApproval Resource
Get an existing AzurePrivatelinkConnectionApproval 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?: AzurePrivatelinkConnectionApprovalState, opts?: CustomResourceOptions): AzurePrivatelinkConnectionApproval
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint_ip_address: Optional[str] = None,
privatelink_connection_id: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
state: Optional[str] = None) -> AzurePrivatelinkConnectionApproval
func GetAzurePrivatelinkConnectionApproval(ctx *Context, name string, id IDInput, state *AzurePrivatelinkConnectionApprovalState, opts ...ResourceOption) (*AzurePrivatelinkConnectionApproval, error)
public static AzurePrivatelinkConnectionApproval Get(string name, Input<string> id, AzurePrivatelinkConnectionApprovalState? state, CustomResourceOptions? opts = null)
public static AzurePrivatelinkConnectionApproval get(String name, Output<String> id, AzurePrivatelinkConnectionApprovalState 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.
- Endpoint
Ip stringAddress - IP address of Azure private endpoint.
- Privatelink
Connection stringId - The ID of the Private Link connection.
- Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- State string
- The state of the Private Link connection.
- Endpoint
Ip stringAddress - IP address of Azure private endpoint.
- Privatelink
Connection stringId - The ID of the Private Link connection.
- Project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- Service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- State string
- The state of the Private Link connection.
- endpoint
Ip StringAddress - IP address of Azure private endpoint.
- privatelink
Connection StringId - The ID of the Private Link connection.
- project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name String - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state String
- The state of the Private Link connection.
- endpoint
Ip stringAddress - IP address of Azure private endpoint.
- privatelink
Connection stringId - The ID of the Private Link connection.
- project string
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name string - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state string
- The state of the Private Link connection.
- endpoint_
ip_ straddress - IP address of Azure private endpoint.
- privatelink_
connection_ strid - The ID of the Private Link connection.
- project str
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service_
name str - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state str
- The state of the Private Link connection.
- endpoint
Ip StringAddress - IP address of Azure private endpoint.
- privatelink
Connection StringId - The ID of the Private Link connection.
- project String
- The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- service
Name String - The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- state String
- The state of the Private Link connection.
Import
$ pulumi import aiven:index/azurePrivatelinkConnectionApproval:AzurePrivatelinkConnectionApproval approval PROJECT/SERVICE_NAME
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.