Azure Classic

v5.19.0 published on Friday, Sep 16, 2022 by Pulumi

Connection

Manages a service connector for app service.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleAccount = new Azure.CosmosDB.Account("exampleAccount", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.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 = exampleResourceGroup.Location,
                FailoverPriority = 0,
            },
        },
    });

    var exampleSqlDatabase = new Azure.CosmosDB.SqlDatabase("exampleSqlDatabase", new()
    {
        ResourceGroupName = exampleAccount.ResourceGroupName,
        AccountName = exampleAccount.Name,
        Throughput = 400,
    });

    var exampleSqlContainer = new Azure.CosmosDB.SqlContainer("exampleSqlContainer", new()
    {
        ResourceGroupName = exampleAccount.ResourceGroupName,
        AccountName = exampleAccount.Name,
        DatabaseName = exampleSqlDatabase.Name,
        PartitionKeyPath = "/definition",
    });

    var exampleServicePlan = new Azure.AppService.ServicePlan("exampleServicePlan", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        SkuName = "P1v2",
        OsType = "Linux",
    });

    var exampleLinuxWebApp = new Azure.AppService.LinuxWebApp("exampleLinuxWebApp", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        ServicePlanId = exampleServicePlan.Id,
        SiteConfig = ,
    });

    var exampleConnection = new Azure.AppService.Connection("exampleConnection", new()
    {
        AppServiceId = exampleLinuxWebApp.Id,
        TargetResourceId = exampleSqlDatabase.Id,
        Authentication = new Azure.AppService.Inputs.ConnectionAuthenticationArgs
        {
            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/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := cosmosdb.NewAccount(ctx, "exampleAccount", &cosmosdb.AccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.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:         exampleResourceGroup.Location,
					FailoverPriority: pulumi.Int(0),
				},
			},
		})
		if err != nil {
			return err
		}
		exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "exampleSqlDatabase", &cosmosdb.SqlDatabaseArgs{
			ResourceGroupName: exampleAccount.ResourceGroupName,
			AccountName:       exampleAccount.Name,
			Throughput:        pulumi.Int(400),
		})
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewSqlContainer(ctx, "exampleSqlContainer", &cosmosdb.SqlContainerArgs{
			ResourceGroupName: exampleAccount.ResourceGroupName,
			AccountName:       exampleAccount.Name,
			DatabaseName:      exampleSqlDatabase.Name,
			PartitionKeyPath:  pulumi.String("/definition"),
		})
		if err != nil {
			return err
		}
		exampleServicePlan, err := appservice.NewServicePlan(ctx, "exampleServicePlan", &appservice.ServicePlanArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("P1v2"),
			OsType:            pulumi.String("Linux"),
		})
		if err != nil {
			return err
		}
		exampleLinuxWebApp, err := appservice.NewLinuxWebApp(ctx, "exampleLinuxWebApp", &appservice.LinuxWebAppArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			ServicePlanId:     exampleServicePlan.ID(),
			SiteConfig:        nil,
		})
		if err != nil {
			return err
		}
		_, err = appservice.NewConnection(ctx, "exampleConnection", &appservice.ConnectionArgs{
			AppServiceId:     exampleLinuxWebApp.ID(),
			TargetResourceId: exampleSqlDatabase.ID(),
			Authentication: &appservice.ConnectionAuthenticationArgs{
				Type: pulumi.String("systemAssignedIdentity"),
			},
		})
		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.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.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
import com.pulumi.azure.appservice.LinuxWebApp;
import com.pulumi.azure.appservice.LinuxWebAppArgs;
import com.pulumi.azure.appservice.inputs.LinuxWebAppSiteConfigArgs;
import com.pulumi.azure.appservice.Connection;
import com.pulumi.azure.appservice.ConnectionArgs;
import com.pulumi.azure.appservice.inputs.ConnectionAuthenticationArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .offerType("Standard")
            .kind("GlobalDocumentDB")
            .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
                .consistencyLevel("BoundedStaleness")
                .maxIntervalInSeconds(10)
                .maxStalenessPrefix(200)
                .build())
            .geoLocations(AccountGeoLocationArgs.builder()
                .location(exampleResourceGroup.location())
                .failoverPriority(0)
                .build())
            .build());

        var exampleSqlDatabase = new SqlDatabase("exampleSqlDatabase", SqlDatabaseArgs.builder()        
            .resourceGroupName(exampleAccount.resourceGroupName())
            .accountName(exampleAccount.name())
            .throughput(400)
            .build());

        var exampleSqlContainer = new SqlContainer("exampleSqlContainer", SqlContainerArgs.builder()        
            .resourceGroupName(exampleAccount.resourceGroupName())
            .accountName(exampleAccount.name())
            .databaseName(exampleSqlDatabase.name())
            .partitionKeyPath("/definition")
            .build());

        var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .skuName("P1v2")
            .osType("Linux")
            .build());

        var exampleLinuxWebApp = new LinuxWebApp("exampleLinuxWebApp", LinuxWebAppArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .servicePlanId(exampleServicePlan.id())
            .siteConfig()
            .build());

        var exampleConnection = new Connection("exampleConnection", ConnectionArgs.builder()        
            .appServiceId(exampleLinuxWebApp.id())
            .targetResourceId(exampleSqlDatabase.id())
            .authentication(ConnectionAuthenticationArgs.builder()
                .type("systemAssignedIdentity")
                .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.cosmosdb.Account("exampleAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.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_resource_group.location,
        failover_priority=0,
    )])
example_sql_database = azure.cosmosdb.SqlDatabase("exampleSqlDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
example_sql_container = azure.cosmosdb.SqlContainer("exampleSqlContainer",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    database_name=example_sql_database.name,
    partition_key_path="/definition")
example_service_plan = azure.appservice.ServicePlan("exampleServicePlan",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="P1v2",
    os_type="Linux")
example_linux_web_app = azure.appservice.LinuxWebApp("exampleLinuxWebApp",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    service_plan_id=example_service_plan.id,
    site_config=azure.appservice.LinuxWebAppSiteConfigArgs())
example_connection = azure.appservice.Connection("exampleConnection",
    app_service_id=example_linux_web_app.id,
    target_resource_id=example_sql_database.id,
    authentication=azure.appservice.ConnectionAuthenticationArgs(
        type="systemAssignedIdentity",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.cosmosdb.Account("exampleAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    offerType: "Standard",
    kind: "GlobalDocumentDB",
    consistencyPolicy: {
        consistencyLevel: "BoundedStaleness",
        maxIntervalInSeconds: 10,
        maxStalenessPrefix: 200,
    },
    geoLocations: [{
        location: exampleResourceGroup.location,
        failoverPriority: 0,
    }],
});
const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("exampleSqlDatabase", {
    resourceGroupName: exampleAccount.resourceGroupName,
    accountName: exampleAccount.name,
    throughput: 400,
});
const exampleSqlContainer = new azure.cosmosdb.SqlContainer("exampleSqlContainer", {
    resourceGroupName: exampleAccount.resourceGroupName,
    accountName: exampleAccount.name,
    databaseName: exampleSqlDatabase.name,
    partitionKeyPath: "/definition",
});
const exampleServicePlan = new azure.appservice.ServicePlan("exampleServicePlan", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "P1v2",
    osType: "Linux",
});
const exampleLinuxWebApp = new azure.appservice.LinuxWebApp("exampleLinuxWebApp", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    servicePlanId: exampleServicePlan.id,
    siteConfig: {},
});
const exampleConnection = new azure.appservice.Connection("exampleConnection", {
    appServiceId: exampleLinuxWebApp.id,
    targetResourceId: exampleSqlDatabase.id,
    authentication: {
        type: "systemAssignedIdentity",
    },
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:cosmosdb:Account
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      offerType: Standard
      kind: GlobalDocumentDB
      consistencyPolicy:
        consistencyLevel: BoundedStaleness
        maxIntervalInSeconds: 10
        maxStalenessPrefix: 200
      geoLocations:
        - location: ${exampleResourceGroup.location}
          failoverPriority: 0
  exampleSqlDatabase:
    type: azure:cosmosdb:SqlDatabase
    properties:
      resourceGroupName: ${exampleAccount.resourceGroupName}
      accountName: ${exampleAccount.name}
      throughput: 400
  exampleSqlContainer:
    type: azure:cosmosdb:SqlContainer
    properties:
      resourceGroupName: ${exampleAccount.resourceGroupName}
      accountName: ${exampleAccount.name}
      databaseName: ${exampleSqlDatabase.name}
      partitionKeyPath: /definition
  exampleServicePlan:
    type: azure:appservice:ServicePlan
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: P1v2
      osType: Linux
  exampleLinuxWebApp:
    type: azure:appservice:LinuxWebApp
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      servicePlanId: ${exampleServicePlan.id}
      siteConfig: {}
  exampleConnection:
    type: azure:appservice:Connection
    properties:
      appServiceId: ${exampleLinuxWebApp.id}
      targetResourceId: ${exampleSqlDatabase.id}
      authentication:
        type: systemAssignedIdentity

Create a Connection Resource

new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               app_service_id: Optional[str] = None,
               authentication: Optional[ConnectionAuthenticationArgs] = None,
               client_type: Optional[str] = None,
               name: Optional[str] = None,
               target_resource_id: Optional[str] = None,
               vnet_solution: Optional[str] = None)
@overload
def Connection(resource_name: str,
               args: ConnectionArgs,
               opts: Optional[ResourceOptions] = None)
func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
public Connection(String name, ConnectionArgs args)
public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
type: azure:appservice:Connection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ConnectionArgs
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 ConnectionArgs
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 ConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AppServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

Authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

TargetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

ClientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

VnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

AppServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

Authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

TargetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

ClientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

VnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId String

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

targetResourceId String

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

clientType String

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

vnetSolution String

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

targetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

clientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

vnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

app_service_id str

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

target_resource_id str

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

client_type str

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

vnet_solution str

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId String

The ID of the data source web app. Changing this forces a new resource to be created.

authentication Property Map

The authentication info. An authentication block as defined below.

targetResourceId String

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

clientType String

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

vnetSolution String

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

Outputs

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

Get an existing Connection 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?: ConnectionState, opts?: CustomResourceOptions): Connection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_service_id: Optional[str] = None,
        authentication: Optional[ConnectionAuthenticationArgs] = None,
        client_type: Optional[str] = None,
        name: Optional[str] = None,
        target_resource_id: Optional[str] = None,
        vnet_solution: Optional[str] = None) -> Connection
func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
public static Connection get(String name, Output<String> id, ConnectionState 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:
AppServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

Authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

ClientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

TargetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

VnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

AppServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

Authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

ClientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

TargetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

VnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId String

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

clientType String

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

targetResourceId String

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

vnetSolution String

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId string

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

clientType string

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

targetResourceId string

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

vnetSolution string

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

app_service_id str

The ID of the data source web app. Changing this forces a new resource to be created.

authentication ConnectionAuthenticationArgs

The authentication info. An authentication block as defined below.

client_type str

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

target_resource_id str

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

vnet_solution str

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

appServiceId String

The ID of the data source web app. Changing this forces a new resource to be created.

authentication Property Map

The authentication info. An authentication block as defined below.

clientType String

The application client type. Possible values are dotnet, java, python, go, php, ruby, django, nodejs, springBoot.

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.

targetResourceId String

The ID of the target resource. Changing this forces a new resource to be created. Possible values are Postgres, PostgresFlexible, Mysql, Sql, Redis, RedisEnterprise, CosmosCassandra, CosmosGremlin, CosmosMongo, CosmosSql, CosmosTable, StorageBlob, StorageQueue, StorageFile, StorageTable, AppConfig, EventHub, ServiceBus, SignalR, WebPubSub, ConfluentKafka.

vnetSolution String

The type of the VNet solution. Possible values are serviceEndpoint, privateLink.

Supporting Types

ConnectionAuthentication

Type string

The authentication type. Possible values are systemAssignedIdentity, userAssignedIdentity, servicePrincipalSecret, servicePrincipalCertificate, secret.

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.

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.

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.

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.

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.

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.

Import

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

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

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.