AppConnection

class AppConnection : KotlinCustomResource

Manages a service connector for function app.

Example Usage

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 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 exampleStorage_accountAccount = new Account("exampleStorage/accountAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("P1v2")
.osType("Linux")
.build());
var test = new FunctionApp("test", FunctionAppArgs.builder()
.location(azurerm_resource_group.test().location())
.resourceGroupName(azurerm_resource_group.test().name())
.appServicePlanId(azurerm_app_service_plan.test().id())
.storageAccountName(azurerm_storage_account.test().name())
.storageAccountAccessKey(azurerm_storage_account.test().primary_access_key())
.build());
var exampleAppConnection = new AppConnection("exampleAppConnection", AppConnectionArgs.builder()
.functionAppId(azurerm_function_app.example().id())
.targetResourceId(azurerm_cosmosdb_account.test().id())
.authentication(AppConnectionAuthenticationArgs.builder()
.type("systemAssignedIdentity")
.build())
.build());
}
}

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

Properties

Link copied to clipboard

The authentication info. An authentication block as defined below.

Link copied to clipboard
val clientType: Output<String>?

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

Link copied to clipboard
val functionAppId: Output<String>

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the service connection. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

An option to store secret value in secure place. An secret_store block as defined below.

Link copied to clipboard

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.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vnetSolution: Output<String>?

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