All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.appservice.StaticWebAppFunctionAppRegistration Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.appservice;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.appservice.StaticWebAppFunctionAppRegistrationArgs;
import com.pulumi.azure.appservice.inputs.StaticWebAppFunctionAppRegistrationState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * Manages an App Service Static Web App Function App Registration.
 * 
 * > **NOTE:** This resource registers the specified Function App to the `Production` build of the Static Web App.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.appservice.StaticWebApp;
 * import com.pulumi.azure.appservice.StaticWebAppArgs;
 * 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.LinuxFunctionApp;
 * import com.pulumi.azure.appservice.LinuxFunctionAppArgs;
 * import com.pulumi.azure.appservice.inputs.LinuxFunctionAppSiteConfigArgs;
 * import com.pulumi.azure.appservice.StaticWebAppFunctionAppRegistration;
 * import com.pulumi.azure.appservice.StaticWebAppFunctionAppRegistrationArgs;
 * 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 exampleStaticWebApp = new StaticWebApp("exampleStaticWebApp", StaticWebAppArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("examplesstorageacc")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 * 
 *         var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
 *             .name("example-service-plan")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .osType("Linux")
 *             .skuName("S1")
 *             .build());
 * 
 *         var exampleLinuxFunctionApp = new LinuxFunctionApp("exampleLinuxFunctionApp", LinuxFunctionAppArgs.builder()
 *             .name("example-function-app")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .storageAccountName(exampleAccount.name())
 *             .storageAccountAccessKey(exampleAccount.primaryAccessKey())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleStaticWebAppFunctionAppRegistration = new StaticWebAppFunctionAppRegistration("exampleStaticWebAppFunctionAppRegistration", StaticWebAppFunctionAppRegistrationArgs.builder()
 *             .staticWebAppId(exampleStaticWebApp.id())
 *             .functionAppId(exampleLinuxFunctionApp.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Static Web App Function App Registration can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appservice/staticWebAppFunctionAppRegistration:StaticWebAppFunctionAppRegistration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Web/staticSites/my-static-site1/userProvidedFunctionApps/myFunctionApp * ``` * */ @ResourceType(type="azure:appservice/staticWebAppFunctionAppRegistration:StaticWebAppFunctionAppRegistration") public class StaticWebAppFunctionAppRegistration extends com.pulumi.resources.CustomResource { /** * The ID of a Linux or Windows Function App to connect to the Static Web App as a Backend. Changing this forces a new resource to be created. * * > **NOTE:** Only one Function App can be connected to a Static Web App. Multiple Function Apps are not currently supported. * * > **NOTE:** Connecting a Function App resource to a Static Web App resource updates the Function App to use AuthV2 and configures the `azure_static_web_app_v2` which may need to be accounted for by the use of `ignore_changes` depending on the existing `auth_settings_v2` configuration of the target Function App. * */ @Export(name="functionAppId", refs={String.class}, tree="[0]") private Output functionAppId; /** * @return The ID of a Linux or Windows Function App to connect to the Static Web App as a Backend. Changing this forces a new resource to be created. * * > **NOTE:** Only one Function App can be connected to a Static Web App. Multiple Function Apps are not currently supported. * * > **NOTE:** Connecting a Function App resource to a Static Web App resource updates the Function App to use AuthV2 and configures the `azure_static_web_app_v2` which may need to be accounted for by the use of `ignore_changes` depending on the existing `auth_settings_v2` configuration of the target Function App. * */ public Output functionAppId() { return this.functionAppId; } /** * The ID of the Static Web App to register the Function App to as a backend. Changing this forces a new resource to be created. * */ @Export(name="staticWebAppId", refs={String.class}, tree="[0]") private Output staticWebAppId; /** * @return The ID of the Static Web App to register the Function App to as a backend. Changing this forces a new resource to be created. * */ public Output staticWebAppId() { return this.staticWebAppId; } /** * * @param name The _unique_ name of the resulting resource. */ public StaticWebAppFunctionAppRegistration(java.lang.String name) { this(name, StaticWebAppFunctionAppRegistrationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public StaticWebAppFunctionAppRegistration(java.lang.String name, StaticWebAppFunctionAppRegistrationArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public StaticWebAppFunctionAppRegistration(java.lang.String name, StaticWebAppFunctionAppRegistrationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/staticWebAppFunctionAppRegistration:StaticWebAppFunctionAppRegistration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private StaticWebAppFunctionAppRegistration(java.lang.String name, Output id, @Nullable StaticWebAppFunctionAppRegistrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/staticWebAppFunctionAppRegistration:StaticWebAppFunctionAppRegistration", name, state, makeResourceOptions(options, id), false); } private static StaticWebAppFunctionAppRegistrationArgs makeArgs(StaticWebAppFunctionAppRegistrationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? StaticWebAppFunctionAppRegistrationArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static StaticWebAppFunctionAppRegistration get(java.lang.String name, Output id, @Nullable StaticWebAppFunctionAppRegistrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new StaticWebAppFunctionAppRegistration(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy