Php Workload Args
data class PhpWorkloadArgs(val adminUserProfile: Output<UserProfileArgs>? = null, val appLocation: Output<String>? = null, val backupProfile: Output<BackupProfileArgs>? = null, val cacheProfile: Output<CacheProfileArgs>? = null, val controllerProfile: Output<NodeProfileArgs>? = null, val databaseProfile: Output<DatabaseProfileArgs>? = null, val fileshareProfile: Output<FileshareProfileArgs>? = null, val identity: Output<PhpWorkloadResourceIdentityArgs>? = null, val kind: Output<Either<String, WorkloadKind>>? = null, val location: Output<String>? = null, val managedResourceGroupConfiguration: Output<ManagedRGConfigurationArgs>? = null, val networkProfile: Output<NetworkProfileArgs>? = null, val phpProfile: Output<PhpProfileArgs>? = null, val phpWorkloadName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val searchProfile: Output<SearchProfileArgs>? = null, val siteProfile: Output<SiteProfileArgs>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val webNodesProfile: Output<VmssNodesProfileArgs>? = null) : ConvertibleToJava<PhpWorkloadArgs>
Php workload resource API Version: 2021-12-01-preview.
Example Usage
Workloads
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var phpWorkload = new AzureNative.Workloads.PhpWorkload("phpWorkload", new()
{
AdminUserProfile = new AzureNative.Workloads.Inputs.UserProfileArgs
{
SshPublicKey = "===SSH=PUBLIC=KEY===",
UserName = "wpadmin",
},
AppLocation = "eastus",
BackupProfile = new AzureNative.Workloads.Inputs.BackupProfileArgs
{
BackupEnabled = "Disabled",
},
CacheProfile = new AzureNative.Workloads.Inputs.CacheProfileArgs
{
Capacity = 0,
Family = "C",
Name = "wp-cache",
SkuName = "Basic",
},
ControllerProfile = new AzureNative.Workloads.Inputs.NodeProfileArgs
{
DataDisks = new[]
{
new AzureNative.Workloads.Inputs.DiskInfoArgs
{
SizeInGB = 100,
StorageType = AzureNative.Workloads.DiskStorageType.Premium_LRS,
},
},
Name = "contoller-vm",
NodeSku = "Standard_DS2_v2",
OsDisk = new AzureNative.Workloads.Inputs.DiskInfoArgs
{
StorageType = AzureNative.Workloads.DiskStorageType.Premium_LRS,
},
OsImage = new AzureNative.Workloads.Inputs.OsImageProfileArgs
{
Offer = "UbuntuServer",
Publisher = "Canonical",
Sku = "18.0-LTS",
Version = "latest",
},
},
DatabaseProfile = new AzureNative.Workloads.Inputs.DatabaseProfileArgs
{
BackupRetentionDays = 7,
HaEnabled = "Disabled",
ServerName = "wp-db-server",
Sku = "Standard_D32s_v4",
SslEnforcementEnabled = "Enabled",
StorageInGB = 128,
StorageIops = 200,
StorageSku = "Premium_LRS",
Tier = AzureNative.Workloads.DatabaseTier.GeneralPurpose,
Type = "MySql",
Version = "5.7",
},
FileshareProfile = new AzureNative.Workloads.Inputs.FileshareProfileArgs
{
ShareSizeInGB = 100,
ShareType = "AzureFiles",
StorageType = "Premium_LRS",
},
Kind = "WordPress",
Location = "eastus2",
ManagedResourceGroupConfiguration = new AzureNative.Workloads.Inputs.ManagedRGConfigurationArgs
{
Name = "php-mrg-wp39",
},
NetworkProfile = new AzureNative.Workloads.Inputs.NetworkProfileArgs
{
AzureFrontDoorEnabled = "Enabled",
LoadBalancerSku = "Standard",
LoadBalancerType = "LoadBalancer",
},
PhpProfile = new AzureNative.Workloads.Inputs.PhpProfileArgs
{
Version = "7.3",
},
PhpWorkloadName = "wp39",
ResourceGroupName = "test-rg",
SearchProfile = new AzureNative.Workloads.Inputs.SearchProfileArgs
{
NodeSku = "Standard_DS2_v2",
OsDisk = new AzureNative.Workloads.Inputs.DiskInfoArgs
{
StorageType = AzureNative.Workloads.DiskStorageType.Premium_LRS,
},
OsImage = new AzureNative.Workloads.Inputs.OsImageProfileArgs
{
Offer = "UbuntuServer",
Publisher = "Canonical",
Sku = "18.0-LTS",
Version = "latest",
},
SearchType = "Elastic",
},
SiteProfile = new AzureNative.Workloads.Inputs.SiteProfileArgs
{
DomainName = "www.example.com",
},
Sku = new AzureNative.Workloads.Inputs.SkuArgs
{
Name = "Large",
},
Tags = null,
WebNodesProfile = new AzureNative.Workloads.Inputs.VmssNodesProfileArgs
{
AutoScaleMaxCount = 1,
AutoScaleMinCount = 1,
Name = "web-server",
NodeSku = "Standard_DS2_v2",
OsDisk = new AzureNative.Workloads.Inputs.DiskInfoArgs
{
StorageType = AzureNative.Workloads.DiskStorageType.Premium_LRS,
},
OsImage = new AzureNative.Workloads.Inputs.OsImageProfileArgs
{
Offer = "UbuntuServer",
Publisher = "Canonical",
Sku = "18.0-LTS",
Version = "latest",
},
},
});
});
Content copied to clipboard
package main
import (
workloads "github.com/pulumi/pulumi-azure-native-sdk/workloads"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := workloads.NewPhpWorkload(ctx, "phpWorkload", &workloads.PhpWorkloadArgs{
AdminUserProfile: &workloads.UserProfileArgs{
SshPublicKey: pulumi.String("===SSH=PUBLIC=KEY==="),
UserName: pulumi.String("wpadmin"),
},
AppLocation: pulumi.String("eastus"),
BackupProfile: &workloads.BackupProfileArgs{
BackupEnabled: pulumi.String("Disabled"),
},
CacheProfile: &workloads.CacheProfileArgs{
Capacity: pulumi.Float64(0),
Family: pulumi.String("C"),
Name: pulumi.String("wp-cache"),
SkuName: pulumi.String("Basic"),
},
ControllerProfile: workloads.NodeProfileResponse{
DataDisks: workloads.DiskInfoArray{
&workloads.DiskInfoArgs{
SizeInGB: pulumi.Float64(100),
StorageType: workloads.DiskStorageType_Premium_LRS,
},
},
Name: pulumi.String("contoller-vm"),
NodeSku: pulumi.String("Standard_DS2_v2"),
OsDisk: &workloads.DiskInfoArgs{
StorageType: workloads.DiskStorageType_Premium_LRS,
},
OsImage: &workloads.OsImageProfileArgs{
Offer: pulumi.String("UbuntuServer"),
Publisher: pulumi.String("Canonical"),
Sku: pulumi.String("18.0-LTS"),
Version: pulumi.String("latest"),
},
},
DatabaseProfile: &workloads.DatabaseProfileArgs{
BackupRetentionDays: pulumi.Int(7),
HaEnabled: pulumi.String("Disabled"),
ServerName: pulumi.String("wp-db-server"),
Sku: pulumi.String("Standard_D32s_v4"),
SslEnforcementEnabled: pulumi.String("Enabled"),
StorageInGB: pulumi.Float64(128),
StorageIops: pulumi.Float64(200),
StorageSku: pulumi.String("Premium_LRS"),
Tier: workloads.DatabaseTierGeneralPurpose,
Type: pulumi.String("MySql"),
Version: pulumi.String("5.7"),
},
FileshareProfile: &workloads.FileshareProfileArgs{
ShareSizeInGB: pulumi.Float64(100),
ShareType: pulumi.String("AzureFiles"),
StorageType: pulumi.String("Premium_LRS"),
},
Kind: pulumi.String("WordPress"),
Location: pulumi.String("eastus2"),
ManagedResourceGroupConfiguration: &workloads.ManagedRGConfigurationArgs{
Name: pulumi.String("php-mrg-wp39"),
},
NetworkProfile: &workloads.NetworkProfileArgs{
AzureFrontDoorEnabled: pulumi.String("Enabled"),
LoadBalancerSku: pulumi.String("Standard"),
LoadBalancerType: pulumi.String("LoadBalancer"),
},
PhpProfile: &workloads.PhpProfileArgs{
Version: pulumi.String("7.3"),
},
PhpWorkloadName: pulumi.String("wp39"),
ResourceGroupName: pulumi.String("test-rg"),
SearchProfile: workloads.SearchProfileResponse{
NodeSku: pulumi.String("Standard_DS2_v2"),
OsDisk: &workloads.DiskInfoArgs{
StorageType: workloads.DiskStorageType_Premium_LRS,
},
OsImage: &workloads.OsImageProfileArgs{
Offer: pulumi.String("UbuntuServer"),
Publisher: pulumi.String("Canonical"),
Sku: pulumi.String("18.0-LTS"),
Version: pulumi.String("latest"),
},
SearchType: pulumi.String("Elastic"),
},
SiteProfile: &workloads.SiteProfileArgs{
DomainName: pulumi.String("www.example.com"),
},
Sku: &workloads.SkuArgs{
Name: pulumi.String("Large"),
},
Tags: nil,
WebNodesProfile: workloads.VmssNodesProfileResponse{
AutoScaleMaxCount: pulumi.Int(1),
AutoScaleMinCount: pulumi.Int(1),
Name: pulumi.String("web-server"),
NodeSku: pulumi.String("Standard_DS2_v2"),
OsDisk: &workloads.DiskInfoArgs{
StorageType: workloads.DiskStorageType_Premium_LRS,
},
OsImage: &workloads.OsImageProfileArgs{
Offer: pulumi.String("UbuntuServer"),
Publisher: pulumi.String("Canonical"),
Sku: pulumi.String("18.0-LTS"),
Version: pulumi.String("latest"),
},
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.workloads.PhpWorkload;
import com.pulumi.azurenative.workloads.PhpWorkloadArgs;
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 phpWorkload = new PhpWorkload("phpWorkload", PhpWorkloadArgs.builder()
.adminUserProfile(Map.ofEntries(
Map.entry("sshPublicKey", "===SSH=PUBLIC=KEY==="),
Map.entry("userName", "wpadmin")
))
.appLocation("eastus")
.backupProfile(Map.of("backupEnabled", "Disabled"))
.cacheProfile(Map.ofEntries(
Map.entry("capacity", 0),
Map.entry("family", "C"),
Map.entry("name", "wp-cache"),
Map.entry("skuName", "Basic")
))
.controllerProfile(Map.ofEntries(
Map.entry("dataDisks", Map.ofEntries(
Map.entry("sizeInGB", 100),
Map.entry("storageType", "Premium_LRS")
)),
Map.entry("name", "contoller-vm"),
Map.entry("nodeSku", "Standard_DS2_v2"),
Map.entry("osDisk", Map.of("storageType", "Premium_LRS")),
Map.entry("osImage", Map.ofEntries(
Map.entry("offer", "UbuntuServer"),
Map.entry("publisher", "Canonical"),
Map.entry("sku", "18.0-LTS"),
Map.entry("version", "latest")
))
))
.databaseProfile(Map.ofEntries(
Map.entry("backupRetentionDays", 7),
Map.entry("haEnabled", "Disabled"),
Map.entry("serverName", "wp-db-server"),
Map.entry("sku", "Standard_D32s_v4"),
Map.entry("sslEnforcementEnabled", "Enabled"),
Map.entry("storageInGB", 128),
Map.entry("storageIops", 200),
Map.entry("storageSku", "Premium_LRS"),
Map.entry("tier", "GeneralPurpose"),
Map.entry("type", "MySql"),
Map.entry("version", "5.7")
))
.fileshareProfile(Map.ofEntries(
Map.entry("shareSizeInGB", 100),
Map.entry("shareType", "AzureFiles"),
Map.entry("storageType", "Premium_LRS")
))
.kind("WordPress")
.location("eastus2")
.managedResourceGroupConfiguration(Map.of("name", "php-mrg-wp39"))
.networkProfile(Map.ofEntries(
Map.entry("azureFrontDoorEnabled", "Enabled"),
Map.entry("loadBalancerSku", "Standard"),
Map.entry("loadBalancerType", "LoadBalancer")
))
.phpProfile(Map.of("version", "7.3"))
.phpWorkloadName("wp39")
.resourceGroupName("test-rg")
.searchProfile(Map.ofEntries(
Map.entry("nodeSku", "Standard_DS2_v2"),
Map.entry("osDisk", Map.of("storageType", "Premium_LRS")),
Map.entry("osImage", Map.ofEntries(
Map.entry("offer", "UbuntuServer"),
Map.entry("publisher", "Canonical"),
Map.entry("sku", "18.0-LTS"),
Map.entry("version", "latest")
)),
Map.entry("searchType", "Elastic")
))
.siteProfile(Map.of("domainName", "www.example.com"))
.sku(Map.of("name", "Large"))
.tags()
.webNodesProfile(Map.ofEntries(
Map.entry("autoScaleMaxCount", 1),
Map.entry("autoScaleMinCount", 1),
Map.entry("name", "web-server"),
Map.entry("nodeSku", "Standard_DS2_v2"),
Map.entry("osDisk", Map.of("storageType", "Premium_LRS")),
Map.entry("osImage", Map.ofEntries(
Map.entry("offer", "UbuntuServer"),
Map.entry("publisher", "Canonical"),
Map.entry("sku", "18.0-LTS"),
Map.entry("version", "latest")
))
))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:workloads:PhpWorkload wp39 /subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsot.Workloads/phpWorkloads/wp39
Content copied to clipboard
Constructors
Link copied to clipboard
fun PhpWorkloadArgs(adminUserProfile: Output<UserProfileArgs>? = null, appLocation: Output<String>? = null, backupProfile: Output<BackupProfileArgs>? = null, cacheProfile: Output<CacheProfileArgs>? = null, controllerProfile: Output<NodeProfileArgs>? = null, databaseProfile: Output<DatabaseProfileArgs>? = null, fileshareProfile: Output<FileshareProfileArgs>? = null, identity: Output<PhpWorkloadResourceIdentityArgs>? = null, kind: Output<Either<String, WorkloadKind>>? = null, location: Output<String>? = null, managedResourceGroupConfiguration: Output<ManagedRGConfigurationArgs>? = null, networkProfile: Output<NetworkProfileArgs>? = null, phpProfile: Output<PhpProfileArgs>? = null, phpWorkloadName: Output<String>? = null, resourceGroupName: Output<String>? = null, searchProfile: Output<SearchProfileArgs>? = null, siteProfile: Output<SiteProfileArgs>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null, webNodesProfile: Output<VmssNodesProfileArgs>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard