1. Packages
  2. Azure Classic
  3. API Docs
  4. appservice
  5. AppConnection

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.appservice.AppConnection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a service connector for function app.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleAccount = new azure.cosmosdb.Account("example", {
        name: "example-cosmosdb-account",
        location: example.location,
        resourceGroupName: example.name,
        offerType: "Standard",
        kind: "GlobalDocumentDB",
        consistencyPolicy: {
            consistencyLevel: "BoundedStaleness",
            maxIntervalInSeconds: 10,
            maxStalenessPrefix: 200,
        },
        geoLocations: [{
            location: example.location,
            failoverPriority: 0,
        }],
    });
    const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("example", {
        name: "cosmos-sql-db",
        resourceGroupName: exampleAccount.resourceGroupName,
        accountName: exampleAccount.name,
        throughput: 400,
    });
    const exampleSqlContainer = new azure.cosmosdb.SqlContainer("example", {
        name: "example-container",
        resourceGroupName: exampleAccount.resourceGroupName,
        accountName: exampleAccount.name,
        databaseName: exampleSqlDatabase.name,
        partitionKeyPath: "/definition",
    });
    const exampleAccount2 = new azure.storage.Account("example", {
        name: "examplestorageaccount",
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountReplicationType: "LRS",
    });
    const exampleServicePlan = new azure.appservice.ServicePlan("example", {
        location: example.location,
        name: "example-serviceplan",
        resourceGroupName: example.name,
        skuName: "P1v2",
        osType: "Linux",
    });
    const test = new azure.appservice.FunctionApp("test", {
        name: "example-function-app",
        location: testAzurermResourceGroup.location,
        resourceGroupName: testAzurermResourceGroup.name,
        appServicePlanId: testAzurermAppServicePlan.id,
        storageAccountName: testAzurermStorageAccount.name,
        storageAccountAccessKey: testAzurermStorageAccount.primaryAccessKey,
    });
    const exampleAppConnection = new azure.appservice.AppConnection("example", {
        name: "example-serviceconnector",
        functionAppId: exampleAzurermFunctionApp.id,
        targetResourceId: testAzurermCosmosdbAccount.id,
        authentication: {
            type: "systemAssignedIdentity",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_account = azure.cosmosdb.Account("example",
        name="example-cosmosdb-account",
        location=example.location,
        resource_group_name=example.name,
        offer_type="Standard",
        kind="GlobalDocumentDB",
        consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
            consistency_level="BoundedStaleness",
            max_interval_in_seconds=10,
            max_staleness_prefix=200,
        ),
        geo_locations=[azure.cosmosdb.AccountGeoLocationArgs(
            location=example.location,
            failover_priority=0,
        )])
    example_sql_database = azure.cosmosdb.SqlDatabase("example",
        name="cosmos-sql-db",
        resource_group_name=example_account.resource_group_name,
        account_name=example_account.name,
        throughput=400)
    example_sql_container = azure.cosmosdb.SqlContainer("example",
        name="example-container",
        resource_group_name=example_account.resource_group_name,
        account_name=example_account.name,
        database_name=example_sql_database.name,
        partition_key_path="/definition")
    example_account2 = azure.storage.Account("example",
        name="examplestorageaccount",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_replication_type="LRS")
    example_service_plan = azure.appservice.ServicePlan("example",
        location=example.location,
        name="example-serviceplan",
        resource_group_name=example.name,
        sku_name="P1v2",
        os_type="Linux")
    test = azure.appservice.FunctionApp("test",
        name="example-function-app",
        location=test_azurerm_resource_group["location"],
        resource_group_name=test_azurerm_resource_group["name"],
        app_service_plan_id=test_azurerm_app_service_plan["id"],
        storage_account_name=test_azurerm_storage_account["name"],
        storage_account_access_key=test_azurerm_storage_account["primaryAccessKey"])
    example_app_connection = azure.appservice.AppConnection("example",
        name="example-serviceconnector",
        function_app_id=example_azurerm_function_app["id"],
        target_resource_id=test_azurerm_cosmosdb_account["id"],
        authentication=azure.appservice.AppConnectionAuthenticationArgs(
            type="systemAssignedIdentity",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
    			Name:              pulumi.String("example-cosmosdb-account"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			OfferType:         pulumi.String("Standard"),
    			Kind:              pulumi.String("GlobalDocumentDB"),
    			ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
    				ConsistencyLevel:     pulumi.String("BoundedStaleness"),
    				MaxIntervalInSeconds: pulumi.Int(10),
    				MaxStalenessPrefix:   pulumi.Int(200),
    			},
    			GeoLocations: cosmosdb.AccountGeoLocationArray{
    				&cosmosdb.AccountGeoLocationArgs{
    					Location:         example.Location,
    					FailoverPriority: pulumi.Int(0),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{
    			Name:              pulumi.String("cosmos-sql-db"),
    			ResourceGroupName: exampleAccount.ResourceGroupName,
    			AccountName:       exampleAccount.Name,
    			Throughput:        pulumi.Int(400),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{
    			Name:              pulumi.String("example-container"),
    			ResourceGroupName: exampleAccount.ResourceGroupName,
    			AccountName:       exampleAccount.Name,
    			DatabaseName:      exampleSqlDatabase.Name,
    			PartitionKeyPath:  pulumi.String("/definition"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewAccount(ctx, "example", &storage.AccountArgs{
    			Name:                   pulumi.String("examplestorageaccount"),
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("LRS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{
    			Location:          example.Location,
    			Name:              pulumi.String("example-serviceplan"),
    			ResourceGroupName: example.Name,
    			SkuName:           pulumi.String("P1v2"),
    			OsType:            pulumi.String("Linux"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appservice.NewFunctionApp(ctx, "test", &appservice.FunctionAppArgs{
    			Name:                    pulumi.String("example-function-app"),
    			Location:                pulumi.Any(testAzurermResourceGroup.Location),
    			ResourceGroupName:       pulumi.Any(testAzurermResourceGroup.Name),
    			AppServicePlanId:        pulumi.Any(testAzurermAppServicePlan.Id),
    			StorageAccountName:      pulumi.Any(testAzurermStorageAccount.Name),
    			StorageAccountAccessKey: pulumi.Any(testAzurermStorageAccount.PrimaryAccessKey),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = appservice.NewAppConnection(ctx, "example", &appservice.AppConnectionArgs{
    			Name:             pulumi.String("example-serviceconnector"),
    			FunctionAppId:    pulumi.Any(exampleAzurermFunctionApp.Id),
    			TargetResourceId: pulumi.Any(testAzurermCosmosdbAccount.Id),
    			Authentication: &appservice.AppConnectionAuthenticationArgs{
    				Type: pulumi.String("systemAssignedIdentity"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.CosmosDB.Account("example", new()
        {
            Name = "example-cosmosdb-account",
            Location = example.Location,
            ResourceGroupName = example.Name,
            OfferType = "Standard",
            Kind = "GlobalDocumentDB",
            ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
            {
                ConsistencyLevel = "BoundedStaleness",
                MaxIntervalInSeconds = 10,
                MaxStalenessPrefix = 200,
            },
            GeoLocations = new[]
            {
                new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
                {
                    Location = example.Location,
                    FailoverPriority = 0,
                },
            },
        });
    
        var exampleSqlDatabase = new Azure.CosmosDB.SqlDatabase("example", new()
        {
            Name = "cosmos-sql-db",
            ResourceGroupName = exampleAccount.ResourceGroupName,
            AccountName = exampleAccount.Name,
            Throughput = 400,
        });
    
        var exampleSqlContainer = new Azure.CosmosDB.SqlContainer("example", new()
        {
            Name = "example-container",
            ResourceGroupName = exampleAccount.ResourceGroupName,
            AccountName = exampleAccount.Name,
            DatabaseName = exampleSqlDatabase.Name,
            PartitionKeyPath = "/definition",
        });
    
        var exampleAccount2 = new Azure.Storage.Account("example", new()
        {
            Name = "examplestorageaccount",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
        });
    
        var exampleServicePlan = new Azure.AppService.ServicePlan("example", new()
        {
            Location = example.Location,
            Name = "example-serviceplan",
            ResourceGroupName = example.Name,
            SkuName = "P1v2",
            OsType = "Linux",
        });
    
        var test = new Azure.AppService.FunctionApp("test", new()
        {
            Name = "example-function-app",
            Location = testAzurermResourceGroup.Location,
            ResourceGroupName = testAzurermResourceGroup.Name,
            AppServicePlanId = testAzurermAppServicePlan.Id,
            StorageAccountName = testAzurermStorageAccount.Name,
            StorageAccountAccessKey = testAzurermStorageAccount.PrimaryAccessKey,
        });
    
        var exampleAppConnection = new Azure.AppService.AppConnection("example", new()
        {
            Name = "example-serviceconnector",
            FunctionAppId = exampleAzurermFunctionApp.Id,
            TargetResourceId = testAzurermCosmosdbAccount.Id,
            Authentication = new Azure.AppService.Inputs.AppConnectionAuthenticationArgs
            {
                Type = "systemAssignedIdentity",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.cosmosdb.Account;
    import com.pulumi.azure.cosmosdb.AccountArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
    import com.pulumi.azure.cosmosdb.SqlDatabase;
    import com.pulumi.azure.cosmosdb.SqlDatabaseArgs;
    import com.pulumi.azure.cosmosdb.SqlContainer;
    import com.pulumi.azure.cosmosdb.SqlContainerArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.appservice.ServicePlan;
    import com.pulumi.azure.appservice.ServicePlanArgs;
    import com.pulumi.azure.appservice.FunctionApp;
    import com.pulumi.azure.appservice.FunctionAppArgs;
    import com.pulumi.azure.appservice.AppConnection;
    import com.pulumi.azure.appservice.AppConnectionArgs;
    import com.pulumi.azure.appservice.inputs.AppConnectionAuthenticationArgs;
    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 ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("example-cosmosdb-account")
                .location(example.location())
                .resourceGroupName(example.name())
                .offerType("Standard")
                .kind("GlobalDocumentDB")
                .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
                    .consistencyLevel("BoundedStaleness")
                    .maxIntervalInSeconds(10)
                    .maxStalenessPrefix(200)
                    .build())
                .geoLocations(AccountGeoLocationArgs.builder()
                    .location(example.location())
                    .failoverPriority(0)
                    .build())
                .build());
    
            var exampleSqlDatabase = new SqlDatabase("exampleSqlDatabase", SqlDatabaseArgs.builder()
                .name("cosmos-sql-db")
                .resourceGroupName(exampleAccount.resourceGroupName())
                .accountName(exampleAccount.name())
                .throughput(400)
                .build());
    
            var exampleSqlContainer = new SqlContainer("exampleSqlContainer", SqlContainerArgs.builder()
                .name("example-container")
                .resourceGroupName(exampleAccount.resourceGroupName())
                .accountName(exampleAccount.name())
                .databaseName(exampleSqlDatabase.name())
                .partitionKeyPath("/definition")
                .build());
    
            var exampleAccount2 = new Account("exampleAccount2", AccountArgs.builder()
                .name("examplestorageaccount")
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountReplicationType("LRS")
                .build());
    
            var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
                .location(example.location())
                .name("example-serviceplan")
                .resourceGroupName(example.name())
                .skuName("P1v2")
                .osType("Linux")
                .build());
    
            var test = new FunctionApp("test", FunctionAppArgs.builder()
                .name("example-function-app")
                .location(testAzurermResourceGroup.location())
                .resourceGroupName(testAzurermResourceGroup.name())
                .appServicePlanId(testAzurermAppServicePlan.id())
                .storageAccountName(testAzurermStorageAccount.name())
                .storageAccountAccessKey(testAzurermStorageAccount.primaryAccessKey())
                .build());
    
            var exampleAppConnection = new AppConnection("exampleAppConnection", AppConnectionArgs.builder()
                .name("example-serviceconnector")
                .functionAppId(exampleAzurermFunctionApp.id())
                .targetResourceId(testAzurermCosmosdbAccount.id())
                .authentication(AppConnectionAuthenticationArgs.builder()
                    .type("systemAssignedIdentity")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleAccount:
        type: azure:cosmosdb:Account
        name: example
        properties:
          name: example-cosmosdb-account
          location: ${example.location}
          resourceGroupName: ${example.name}
          offerType: Standard
          kind: GlobalDocumentDB
          consistencyPolicy:
            consistencyLevel: BoundedStaleness
            maxIntervalInSeconds: 10
            maxStalenessPrefix: 200
          geoLocations:
            - location: ${example.location}
              failoverPriority: 0
      exampleSqlDatabase:
        type: azure:cosmosdb:SqlDatabase
        name: example
        properties:
          name: cosmos-sql-db
          resourceGroupName: ${exampleAccount.resourceGroupName}
          accountName: ${exampleAccount.name}
          throughput: 400
      exampleSqlContainer:
        type: azure:cosmosdb:SqlContainer
        name: example
        properties:
          name: example-container
          resourceGroupName: ${exampleAccount.resourceGroupName}
          accountName: ${exampleAccount.name}
          databaseName: ${exampleSqlDatabase.name}
          partitionKeyPath: /definition
      exampleAccount2:
        type: azure:storage:Account
        name: example
        properties:
          name: examplestorageaccount
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountReplicationType: LRS
      exampleServicePlan:
        type: azure:appservice:ServicePlan
        name: example
        properties:
          location: ${example.location}
          name: example-serviceplan
          resourceGroupName: ${example.name}
          skuName: P1v2
          osType: Linux
      test:
        type: azure:appservice:FunctionApp
        properties:
          name: example-function-app
          location: ${testAzurermResourceGroup.location}
          resourceGroupName: ${testAzurermResourceGroup.name}
          appServicePlanId: ${testAzurermAppServicePlan.id}
          storageAccountName: ${testAzurermStorageAccount.name}
          storageAccountAccessKey: ${testAzurermStorageAccount.primaryAccessKey}
      exampleAppConnection:
        type: azure:appservice:AppConnection
        name: example
        properties:
          name: example-serviceconnector
          functionAppId: ${exampleAzurermFunctionApp.id}
          targetResourceId: ${testAzurermCosmosdbAccount.id}
          authentication:
            type: systemAssignedIdentity
    

    Create AppConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AppConnection(name: string, args: AppConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def AppConnection(resource_name: str,
                      args: AppConnectionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def AppConnection(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      authentication: Optional[AppConnectionAuthenticationArgs] = None,
                      function_app_id: Optional[str] = None,
                      target_resource_id: Optional[str] = None,
                      client_type: Optional[str] = None,
                      name: Optional[str] = None,
                      secret_store: Optional[AppConnectionSecretStoreArgs] = None,
                      vnet_solution: Optional[str] = None)
    func NewAppConnection(ctx *Context, name string, args AppConnectionArgs, opts ...ResourceOption) (*AppConnection, error)
    public AppConnection(string name, AppConnectionArgs args, CustomResourceOptions? opts = null)
    public AppConnection(String name, AppConnectionArgs args)
    public AppConnection(String name, AppConnectionArgs args, CustomResourceOptions options)
    
    type: azure:appservice:AppConnection
    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 AppConnectionArgs
    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 AppConnectionArgs
    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 AppConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AppConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AppConnectionArgs
    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 appConnectionResource = new Azure.AppService.AppConnection("appConnectionResource", new()
    {
        Authentication = new Azure.AppService.Inputs.AppConnectionAuthenticationArgs
        {
            Type = "string",
            Certificate = "string",
            ClientId = "string",
            Name = "string",
            PrincipalId = "string",
            Secret = "string",
            SubscriptionId = "string",
        },
        FunctionAppId = "string",
        TargetResourceId = "string",
        ClientType = "string",
        Name = "string",
        SecretStore = new Azure.AppService.Inputs.AppConnectionSecretStoreArgs
        {
            KeyVaultId = "string",
        },
        VnetSolution = "string",
    });
    
    example, err := appservice.NewAppConnection(ctx, "appConnectionResource", &appservice.AppConnectionArgs{
    	Authentication: &appservice.AppConnectionAuthenticationArgs{
    		Type:           pulumi.String("string"),
    		Certificate:    pulumi.String("string"),
    		ClientId:       pulumi.String("string"),
    		Name:           pulumi.String("string"),
    		PrincipalId:    pulumi.String("string"),
    		Secret:         pulumi.String("string"),
    		SubscriptionId: pulumi.String("string"),
    	},
    	FunctionAppId:    pulumi.String("string"),
    	TargetResourceId: pulumi.String("string"),
    	ClientType:       pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	SecretStore: &appservice.AppConnectionSecretStoreArgs{
    		KeyVaultId: pulumi.String("string"),
    	},
    	VnetSolution: pulumi.String("string"),
    })
    
    var appConnectionResource = new AppConnection("appConnectionResource", AppConnectionArgs.builder()
        .authentication(AppConnectionAuthenticationArgs.builder()
            .type("string")
            .certificate("string")
            .clientId("string")
            .name("string")
            .principalId("string")
            .secret("string")
            .subscriptionId("string")
            .build())
        .functionAppId("string")
        .targetResourceId("string")
        .clientType("string")
        .name("string")
        .secretStore(AppConnectionSecretStoreArgs.builder()
            .keyVaultId("string")
            .build())
        .vnetSolution("string")
        .build());
    
    app_connection_resource = azure.appservice.AppConnection("appConnectionResource",
        authentication=azure.appservice.AppConnectionAuthenticationArgs(
            type="string",
            certificate="string",
            client_id="string",
            name="string",
            principal_id="string",
            secret="string",
            subscription_id="string",
        ),
        function_app_id="string",
        target_resource_id="string",
        client_type="string",
        name="string",
        secret_store=azure.appservice.AppConnectionSecretStoreArgs(
            key_vault_id="string",
        ),
        vnet_solution="string")
    
    const appConnectionResource = new azure.appservice.AppConnection("appConnectionResource", {
        authentication: {
            type: "string",
            certificate: "string",
            clientId: "string",
            name: "string",
            principalId: "string",
            secret: "string",
            subscriptionId: "string",
        },
        functionAppId: "string",
        targetResourceId: "string",
        clientType: "string",
        name: "string",
        secretStore: {
            keyVaultId: "string",
        },
        vnetSolution: "string",
    });
    
    type: azure:appservice:AppConnection
    properties:
        authentication:
            certificate: string
            clientId: string
            name: string
            principalId: string
            secret: string
            subscriptionId: string
            type: string
        clientType: string
        functionAppId: string
        name: string
        secretStore:
            keyVaultId: string
        targetResourceId: string
        vnetSolution: string
    

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

    Authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    FunctionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    ClientType string
    Name string
    The name of the service connection. Changing this forces a new resource to be created.
    SecretStore AppConnectionSecretStore
    VnetSolution string
    Authentication AppConnectionAuthenticationArgs

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    FunctionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    TargetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    ClientType string
    Name string
    The name of the service connection. Changing this forces a new resource to be created.
    SecretStore AppConnectionSecretStoreArgs
    VnetSolution string
    authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    functionAppId String
    The ID of the data source function app. Changing this forces a new resource to be created.
    targetResourceId String
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    clientType String
    name String
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore AppConnectionSecretStore
    vnetSolution String
    authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    functionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    targetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    clientType string
    name string
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore AppConnectionSecretStore
    vnetSolution string
    authentication AppConnectionAuthenticationArgs

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    function_app_id str
    The ID of the data source function app. Changing this forces a new resource to be created.
    target_resource_id str
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    client_type str
    name str
    The name of the service connection. Changing this forces a new resource to be created.
    secret_store AppConnectionSecretStoreArgs
    vnet_solution str
    authentication Property Map

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    functionAppId String
    The ID of the data source function app. Changing this forces a new resource to be created.
    targetResourceId String
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    clientType String
    name String
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore Property Map
    vnetSolution String

    Outputs

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

    Get an existing AppConnection 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?: AppConnectionState, opts?: CustomResourceOptions): AppConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authentication: Optional[AppConnectionAuthenticationArgs] = None,
            client_type: Optional[str] = None,
            function_app_id: Optional[str] = None,
            name: Optional[str] = None,
            secret_store: Optional[AppConnectionSecretStoreArgs] = None,
            target_resource_id: Optional[str] = None,
            vnet_solution: Optional[str] = None) -> AppConnection
    func GetAppConnection(ctx *Context, name string, id IDInput, state *AppConnectionState, opts ...ResourceOption) (*AppConnection, error)
    public static AppConnection Get(string name, Input<string> id, AppConnectionState? state, CustomResourceOptions? opts = null)
    public static AppConnection get(String name, Output<String> id, AppConnectionState 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:
    Authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    ClientType string
    FunctionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    Name string
    The name of the service connection. Changing this forces a new resource to be created.
    SecretStore AppConnectionSecretStore
    TargetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    VnetSolution string
    Authentication AppConnectionAuthenticationArgs

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    ClientType string
    FunctionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    Name string
    The name of the service connection. Changing this forces a new resource to be created.
    SecretStore AppConnectionSecretStoreArgs
    TargetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    VnetSolution string
    authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    clientType String
    functionAppId String
    The ID of the data source function app. Changing this forces a new resource to be created.
    name String
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore AppConnectionSecretStore
    targetResourceId String
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    vnetSolution String
    authentication AppConnectionAuthentication

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    clientType string
    functionAppId string
    The ID of the data source function app. Changing this forces a new resource to be created.
    name string
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore AppConnectionSecretStore
    targetResourceId string
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    vnetSolution string
    authentication AppConnectionAuthenticationArgs

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    client_type str
    function_app_id str
    The ID of the data source function app. Changing this forces a new resource to be created.
    name str
    The name of the service connection. Changing this forces a new resource to be created.
    secret_store AppConnectionSecretStoreArgs
    target_resource_id str
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    vnet_solution str
    authentication Property Map

    The authentication info. An authentication block as defined below.

    Note: If a Managed Identity is used, this will need to be configured on the App Service.

    clientType String
    functionAppId String
    The ID of the data source function app. Changing this forces a new resource to be created.
    name String
    The name of the service connection. Changing this forces a new resource to be created.
    secretStore Property Map
    targetResourceId String
    The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka. The integration guide can be found here.
    vnetSolution String

    Supporting Types

    AppConnectionAuthentication, AppConnectionAuthenticationArgs

    Type string
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    Certificate string
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    ClientId string
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    Name string
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    PrincipalId string
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    Secret string
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    SubscriptionId string
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.
    Type string
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    Certificate string
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    ClientId string
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    Name string
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    PrincipalId string
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    Secret string
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    SubscriptionId string
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.
    type String
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    certificate String
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    clientId String
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    name String
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    principalId String
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    secret String
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    subscriptionId String
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.
    type string
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    certificate string
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    clientId string
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    name string
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    principalId string
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    secret string
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    subscriptionId string
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.
    type str
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    certificate str
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    client_id str
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    name str
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    principal_id str
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    secret str
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    subscription_id str
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.
    type String
    The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret. Changing this forces a new resource to be created.
    certificate String
    Service principal certificate for servicePrincipal auth. Should be specified when type is set to servicePrincipalCertificate.
    clientId String
    Client ID for userAssignedIdentity or servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate. When type is set to userAssignedIdentity, client_id and subscription_id should be either both specified or both not specified.
    name String
    Username or account name for secret auth. name and secret should be either both specified or both not specified when type is set to secret.
    principalId String
    Principal ID for servicePrincipal auth. Should be specified when type is set to servicePrincipalSecret or servicePrincipalCertificate.
    secret String
    Password or account key for secret auth. secret and name should be either both specified or both not specified when type is set to secret.
    subscriptionId String
    Subscription ID for userAssignedIdentity. subscription_id and client_id should be either both specified or both not specified.

    AppConnectionSecretStore, AppConnectionSecretStoreArgs

    KeyVaultId string
    The key vault id to store secret.
    KeyVaultId string
    The key vault id to store secret.
    keyVaultId String
    The key vault id to store secret.
    keyVaultId string
    The key vault id to store secret.
    key_vault_id str
    The key vault id to store secret.
    keyVaultId String
    The key vault id to store secret.

    Import

    Service Connector for app service can be imported using the resource id, e.g.

    $ pulumi import azure:appservice/appConnection:AppConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Web/sites/webapp/providers/Microsoft.ServiceLinker/linkers/serviceconnector1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi