import * as pulumi from "@pulumi/pulumi"; /** * Manages an association between Private Endpoint and Application Security Group. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const current = azure.core.getSubscription({}); * const example = new azure.core.ResourceGroup("example", { * name: "example-PEASGAsso", * location: "West Europe", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "examplevnet", * resourceGroupName: example.name, * location: example.location, * addressSpaces: ["10.5.0.0/16"], * }); * const service = new azure.network.Subnet("service", { * name: "examplenetservice", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.5.1.0/24"], * enforcePrivateLinkServiceNetworkPolicies: true, * }); * const endpoint = new azure.network.Subnet("endpoint", { * name: "examplenetendpoint", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.5.2.0/24"], * enforcePrivateLinkEndpointNetworkPolicies: true, * }); * const examplePublicIp = new azure.network.PublicIp("example", { * name: "examplepip", * sku: "Standard", * location: example.location, * resourceGroupName: example.name, * allocationMethod: "Static", * }); * const exampleLoadBalancer = new azure.lb.LoadBalancer("example", { * name: "examplelb", * sku: "Standard", * location: example.location, * resourceGroupName: example.name, * frontendIpConfigurations: [{ * name: examplePublicIp.name, * publicIpAddressId: examplePublicIp.id, * }], * }); * const exampleLinkService = new azure.privatedns.LinkService("example", { * name: "examplePLS", * location: example.location, * resourceGroupName: example.name, * autoApprovalSubscriptionIds: [current.then(current => current.subscriptionId)], * visibilitySubscriptionIds: [current.then(current => current.subscriptionId)], * natIpConfigurations: [{ * name: "primaryIpConfiguration", * primary: true, * subnetId: service.id, * }], * loadBalancerFrontendIpConfigurationIds: [exampleLoadBalancer.frontendIpConfigurations.apply(frontendIpConfigurations => frontendIpConfigurations?.[0]?.id)], * }); * const exampleEndpoint = new azure.privatelink.Endpoint("example", { * name: "example-privatelink", * resourceGroupName: example.name, * location: example.location, * subnetId: endpoint.id, * privateServiceConnection: { * name: exampleLinkService.name, * isManualConnection: false, * privateConnectionResourceId: exampleLinkService.id, * }, * }); * const exampleApplicationSecurityGroup = new azure.network.ApplicationSecurityGroup("example", { * name: "example", * location: example.location, * resourceGroupName: example.name, * }); * const exampleApplicationSecurityGroupAssociation = new azure.privatelink.ApplicationSecurityGroupAssociation("example", { * privateEndpointId: exampleEndpoint.id, * applicationSecurityGroupId: exampleApplicationSecurityGroup.id, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Associations between Private Endpoint and Application Security Group can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:privatelink/applicationSecurityGroupAssociation:ApplicationSecurityGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateEndpoints/endpoints1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/applicationSecurityGroups/securityGroup1", * ``` * * > **Note:** This ID is specific to Terraform - and is of the format `{privateEndpointId}|{applicationSecurityGroupId}`. */ export declare class ApplicationSecurityGroupAssociation extends pulumi.CustomResource { /** * Get an existing ApplicationSecurityGroupAssociation resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ApplicationSecurityGroupAssociationState, opts?: pulumi.CustomResourceOptions): ApplicationSecurityGroupAssociation; /** * Returns true if the given object is an instance of ApplicationSecurityGroupAssociation. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ApplicationSecurityGroupAssociation; /** * The id of application security group to associate. Changing this forces a new resource to be created. */ readonly applicationSecurityGroupId: pulumi.Output; /** * The id of private endpoint to associate. Changing this forces a new resource to be created. */ readonly privateEndpointId: pulumi.Output; /** * Create a ApplicationSecurityGroupAssociation resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ApplicationSecurityGroupAssociationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApplicationSecurityGroupAssociation resources. */ export interface ApplicationSecurityGroupAssociationState { /** * The id of application security group to associate. Changing this forces a new resource to be created. */ applicationSecurityGroupId?: pulumi.Input; /** * The id of private endpoint to associate. Changing this forces a new resource to be created. */ privateEndpointId?: pulumi.Input; } /** * The set of arguments for constructing a ApplicationSecurityGroupAssociation resource. */ export interface ApplicationSecurityGroupAssociationArgs { /** * The id of application security group to associate. Changing this forces a new resource to be created. */ applicationSecurityGroupId: pulumi.Input; /** * The id of private endpoint to associate. Changing this forces a new resource to be created. */ privateEndpointId: pulumi.Input; }