public void Build(AppServicePlanResource appServicePlanResource, StorageAccountResource storageAccountResource) { if (appServicePlanResource.Id == null) { throw new InvalidOperationException("App service plan was not build."); } if (storageAccountResource.ConnectionString == null) { throw new InvalidOperationException("Storage account was not build."); } _functionApp = new FunctionApp(Name, new FunctionAppArgs { Name = Name, ResourceGroupName = ResourceGroupName, Location = Location, AppServicePlanId = appServicePlanResource.Id, HttpsOnly = true, Identity = new FunctionAppIdentityArgs { Type = "SystemAssigned" }, SiteConfig = new FunctionAppSiteConfigArgs { LinuxFxVersion = "DOTNETCORE|3.1" }, AppSettings = _appSettings, StorageConnectionString = storageAccountResource.ConnectionString }); }
public void Build(AppServicePlanResource appServicePlanResource) { if (appServicePlanResource.Id == null) { throw new InvalidOperationException("App service plan was not build"); } _appService = new AppService(Name, new AppServiceArgs { Name = Name, ResourceGroupName = ResourceGroupName, Location = Location, AppServicePlanId = appServicePlanResource.Id, HttpsOnly = true, Identity = new AppServiceIdentityArgs { Type = "SystemAssigned" }, SiteConfig = new AppServiceSiteConfigArgs { LinuxFxVersion = "DOTNETCORE|3.1" }, AppSettings = _appSettings }); }