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

com.pulumi.azure.nginx.kotlin.Deployment.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.nginx.kotlin

import com.pulumi.azure.nginx.kotlin.outputs.DeploymentAutoScaleProfile
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentConfiguration
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentFrontendPrivate
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentFrontendPublic
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentIdentity
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentLoggingStorageAccount
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentNetworkInterface
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentAutoScaleProfile.Companion.toKotlin as deploymentAutoScaleProfileToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentConfiguration.Companion.toKotlin as deploymentConfigurationToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentFrontendPrivate.Companion.toKotlin as deploymentFrontendPrivateToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentFrontendPublic.Companion.toKotlin as deploymentFrontendPublicToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentIdentity.Companion.toKotlin as deploymentIdentityToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentLoggingStorageAccount.Companion.toKotlin as deploymentLoggingStorageAccountToKotlin
import com.pulumi.azure.nginx.kotlin.outputs.DeploymentNetworkInterface.Companion.toKotlin as deploymentNetworkInterfaceToKotlin

/**
 * Builder for [Deployment].
 */
@PulumiTagMarker
public class DeploymentResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: DeploymentArgs = DeploymentArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend DeploymentArgsBuilder.() -> Unit) {
        val builder = DeploymentArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Deployment {
        val builtJavaResource = com.pulumi.azure.nginx.Deployment(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Deployment(builtJavaResource)
    }
}

/**
 * Manages an NGINX Deployment.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as std from "@pulumi/std";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "West Europe",
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     allocationMethod: "Static",
 *     sku: "Standard",
 *     tags: {
 *         environment: "Production",
 *     },
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-vnet",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "example-subnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 *     delegations: [{
 *         name: "delegation",
 *         serviceDelegation: {
 *             name: "NGINX.NGINXPLUS/nginxDeployments",
 *             actions: ["Microsoft.Network/virtualNetworks/subnets/join/action"],
 *         },
 *     }],
 * });
 * const configContent = std.base64encode({
 *     input: `http {
 *     server {
 *         listen 80;
 *         location / {
 *             auth_basic "Protected Area";
 *             auth_basic_user_file /opt/.htpasswd;
 *             default_type text/html;
 *         }
 *         include site/*.conf;
 *     }
 * }
 * `,
 * }).then(invoke => invoke.result);
 * const protectedContent = std.base64encode({
 *     input: "user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1\n",
 * }).then(invoke => invoke.result);
 * const subConfigContent = std.base64encode({
 *     input: `location /bbb {
 * \x09default_type text/html;
 * \x09return 200 '
 * \x09\x09
this one will be updated
* \x09\x09
at 10:38 am
* \x09'; * } * `, * }).then(invoke => invoke.result); * const exampleDeployment = new azure.nginx.Deployment("example", { * name: "example-nginx", * resourceGroupName: example.name, * sku: "publicpreview_Monthly_gmz7xq9ge3py", * location: example.location, * managedResourceGroup: "example", * diagnoseSupportEnabled: true, * automaticUpgradeChannel: "stable", * frontendPublic: { * ipAddresses: [examplePublicIp.id], * }, * networkInterfaces: [{ * subnetId: exampleSubnet.id, * }], * capacity: 20, * email: "[email protected]", * configuration: { * rootFile: "/etc/nginx/nginx.conf", * configFiles: [ * { * content: configContent, * virtualPath: "/etc/nginx/nginx.conf", * }, * { * content: subConfigContent, * virtualPath: "/etc/nginx/site/b.conf", * }, * ], * protectedFiles: [{ * content: protectedContent, * virtualPath: "/opt/.htpasswd", * }], * }, * }); * ``` * ```python * import pulumi * import pulumi_azure as azure * import pulumi_std as std * example = azure.core.ResourceGroup("example", * name="example-rg", * location="West Europe") * example_public_ip = azure.network.PublicIp("example", * name="example", * resource_group_name=example.name, * location=example.location, * allocation_method="Static", * sku="Standard", * tags={ * "environment": "Production", * }) * example_virtual_network = azure.network.VirtualNetwork("example", * name="example-vnet", * address_spaces=["10.0.0.0/16"], * location=example.location, * resource_group_name=example.name) * example_subnet = azure.network.Subnet("example", * name="example-subnet", * resource_group_name=example.name, * virtual_network_name=example_virtual_network.name, * address_prefixes=["10.0.2.0/24"], * delegations=[azure.network.SubnetDelegationArgs( * name="delegation", * service_delegation=azure.network.SubnetDelegationServiceDelegationArgs( * name="NGINX.NGINXPLUS/nginxDeployments", * actions=["Microsoft.Network/virtualNetworks/subnets/join/action"], * ), * )]) * config_content = std.base64encode(input="""http { * server { * listen 80; * location / { * auth_basic "Protected Area"; * auth_basic_user_file /opt/.htpasswd; * default_type text/html; * } * include site/*.conf; * } * } * """).result * protected_content = std.base64encode(input="user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1\n").result * sub_config_content = std.base64encode(input="""location /bbb { * \x09default_type text/html; * \x09return 200 ' * \x09\x09
this one will be updated
* \x09\x09
at 10:38 am
* \x09'; * } * """).result * example_deployment = azure.nginx.Deployment("example", * name="example-nginx", * resource_group_name=example.name, * sku="publicpreview_Monthly_gmz7xq9ge3py", * location=example.location, * managed_resource_group="example", * diagnose_support_enabled=True, * automatic_upgrade_channel="stable", * frontend_public=azure.nginx.DeploymentFrontendPublicArgs( * ip_addresses=[example_public_ip.id], * ), * network_interfaces=[azure.nginx.DeploymentNetworkInterfaceArgs( * subnet_id=example_subnet.id, * )], * capacity=20, * email="[email protected]", * configuration=azure.nginx.DeploymentConfigurationArgs( * root_file="/etc/nginx/nginx.conf", * config_files=[ * azure.nginx.DeploymentConfigurationConfigFileArgs( * content=config_content, * virtual_path="/etc/nginx/nginx.conf", * ), * azure.nginx.DeploymentConfigurationConfigFileArgs( * content=sub_config_content, * virtual_path="/etc/nginx/site/b.conf", * ), * ], * protected_files=[azure.nginx.DeploymentConfigurationProtectedFileArgs( * content=protected_content, * virtual_path="/opt/.htpasswd", * )], * )) * ``` * ```csharp * using System.Collections.Generic; * using System.Linq; * using Pulumi; * using Azure = Pulumi.Azure; * using Std = Pulumi.Std; * return await Deployment.RunAsync(() => * { * var example = new Azure.Core.ResourceGroup("example", new() * { * Name = "example-rg", * Location = "West Europe", * }); * var examplePublicIp = new Azure.Network.PublicIp("example", new() * { * Name = "example", * ResourceGroupName = example.Name, * Location = example.Location, * AllocationMethod = "Static", * Sku = "Standard", * Tags = * { * { "environment", "Production" }, * }, * }); * var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new() * { * Name = "example-vnet", * AddressSpaces = new[] * { * "10.0.0.0/16", * }, * Location = example.Location, * ResourceGroupName = example.Name, * }); * var exampleSubnet = new Azure.Network.Subnet("example", new() * { * Name = "example-subnet", * ResourceGroupName = example.Name, * VirtualNetworkName = exampleVirtualNetwork.Name, * AddressPrefixes = new[] * { * "10.0.2.0/24", * }, * Delegations = new[] * { * new Azure.Network.Inputs.SubnetDelegationArgs * { * Name = "delegation", * ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs * { * Name = "NGINX.NGINXPLUS/nginxDeployments", * Actions = new[] * { * "Microsoft.Network/virtualNetworks/subnets/join/action", * }, * }, * }, * }, * }); * var configContent = Std.Base64encode.Invoke(new() * { * Input = @"http { * server { * listen 80; * location / { * auth_basic ""Protected Area""; * auth_basic_user_file /opt/.htpasswd; * default_type text/html; * } * include site/*.conf; * } * } * ", * }).Apply(invoke => invoke.Result); * var protectedContent = Std.Base64encode.Invoke(new() * { * Input = @"user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1 * ", * }).Apply(invoke => invoke.Result); * var subConfigContent = Std.Base64encode.Invoke(new() * { * Input = @"location /bbb { * default_type text/html; * return 200 ' *
this one will be updated
*
at 10:38 am
* '; * } * ", * }).Apply(invoke => invoke.Result); * var exampleDeployment = new Azure.Nginx.Deployment("example", new() * { * Name = "example-nginx", * ResourceGroupName = example.Name, * Sku = "publicpreview_Monthly_gmz7xq9ge3py", * Location = example.Location, * ManagedResourceGroup = "example", * DiagnoseSupportEnabled = true, * AutomaticUpgradeChannel = "stable", * FrontendPublic = new Azure.Nginx.Inputs.DeploymentFrontendPublicArgs * { * IpAddresses = new[] * { * examplePublicIp.Id, * }, * }, * NetworkInterfaces = new[] * { * new Azure.Nginx.Inputs.DeploymentNetworkInterfaceArgs * { * SubnetId = exampleSubnet.Id, * }, * }, * Capacity = 20, * Email = "[email protected]", * Configuration = new Azure.Nginx.Inputs.DeploymentConfigurationArgs * { * RootFile = "/etc/nginx/nginx.conf", * ConfigFiles = new[] * { * new Azure.Nginx.Inputs.DeploymentConfigurationConfigFileArgs * { * Content = configContent, * VirtualPath = "/etc/nginx/nginx.conf", * }, * new Azure.Nginx.Inputs.DeploymentConfigurationConfigFileArgs * { * Content = subConfigContent, * VirtualPath = "/etc/nginx/site/b.conf", * }, * }, * ProtectedFiles = new[] * { * new Azure.Nginx.Inputs.DeploymentConfigurationProtectedFileArgs * { * Content = protectedContent, * VirtualPath = "/opt/.htpasswd", * }, * }, * }, * }); * }); * ``` * ```go * package main * import ( * "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core" * "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network" * "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/nginx" * "github.com/pulumi/pulumi-std/sdk/go/std" * "github.com/pulumi/pulumi/sdk/v3/go/pulumi" * ) * func main() { * pulumi.Run(func(ctx *pulumi.Context) error { * example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ * Name: pulumi.String("example-rg"), * Location: pulumi.String("West Europe"), * }) * if err != nil { * return err * } * examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ * Name: pulumi.String("example"), * ResourceGroupName: example.Name, * Location: example.Location, * AllocationMethod: pulumi.String("Static"), * Sku: pulumi.String("Standard"), * Tags: pulumi.StringMap{ * "environment": pulumi.String("Production"), * }, * }) * if err != nil { * return err * } * exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ * Name: pulumi.String("example-vnet"), * AddressSpaces: pulumi.StringArray{ * pulumi.String("10.0.0.0/16"), * }, * Location: example.Location, * ResourceGroupName: example.Name, * }) * if err != nil { * return err * } * exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ * Name: pulumi.String("example-subnet"), * ResourceGroupName: example.Name, * VirtualNetworkName: exampleVirtualNetwork.Name, * AddressPrefixes: pulumi.StringArray{ * pulumi.String("10.0.2.0/24"), * }, * Delegations: network.SubnetDelegationArray{ * &network.SubnetDelegationArgs{ * Name: pulumi.String("delegation"), * ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ * Name: pulumi.String("NGINX.NGINXPLUS/nginxDeployments"), * Actions: pulumi.StringArray{ * pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), * }, * }, * }, * }, * }) * if err != nil { * return err * } * configContent := std.Base64encode(ctx, &std.Base64encodeArgs{ * Input: `http { * server { * listen 80; * location / { * auth_basic "Protected Area"; * auth_basic_user_file /opt/.htpasswd; * default_type text/html; * } * include site/*.conf; * } * } * `, * }, nil).Result * protectedContent := std.Base64encode(ctx, &std.Base64encodeArgs{ * Input: "user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1\n", * }, nil).Result * subConfigContent := std.Base64encode(ctx, &std.Base64encodeArgs{ * Input: `location /bbb { * default_type text/html; * return 200 ' *
this one will be updated
*
at 10:38 am
* '; * } * `, * }, nil).Result * _, err = nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{ * Name: pulumi.String("example-nginx"), * ResourceGroupName: example.Name, * Sku: pulumi.String("publicpreview_Monthly_gmz7xq9ge3py"), * Location: example.Location, * ManagedResourceGroup: pulumi.String("example"), * DiagnoseSupportEnabled: pulumi.Bool(true), * AutomaticUpgradeChannel: pulumi.String("stable"), * FrontendPublic: &nginx.DeploymentFrontendPublicArgs{ * IpAddresses: pulumi.StringArray{ * examplePublicIp.ID(), * }, * }, * NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{ * &nginx.DeploymentNetworkInterfaceArgs{ * SubnetId: exampleSubnet.ID(), * }, * }, * Capacity: pulumi.Int(20), * Email: pulumi.String("[email protected]"), * Configuration: &nginx.DeploymentConfigurationArgs{ * RootFile: pulumi.String("/etc/nginx/nginx.conf"), * ConfigFiles: nginx.DeploymentConfigurationConfigFileArray{ * &nginx.DeploymentConfigurationConfigFileArgs{ * Content: pulumi.String(configContent), * VirtualPath: pulumi.String("/etc/nginx/nginx.conf"), * }, * &nginx.DeploymentConfigurationConfigFileArgs{ * Content: pulumi.String(subConfigContent), * VirtualPath: pulumi.String("/etc/nginx/site/b.conf"), * }, * }, * ProtectedFiles: nginx.DeploymentConfigurationProtectedFileArray{ * &nginx.DeploymentConfigurationProtectedFileArgs{ * Content: pulumi.String(protectedContent), * VirtualPath: pulumi.String("/opt/.htpasswd"), * }, * }, * }, * }) * if err != nil { * return err * } * return nil * }) * } * ``` * ```java * 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.network.PublicIp; * import com.pulumi.azure.network.PublicIpArgs; * import com.pulumi.azure.network.VirtualNetwork; * import com.pulumi.azure.network.VirtualNetworkArgs; * import com.pulumi.azure.network.Subnet; * import com.pulumi.azure.network.SubnetArgs; * import com.pulumi.azure.network.inputs.SubnetDelegationArgs; * import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs; * import com.pulumi.azure.nginx.Deployment; * import com.pulumi.azure.nginx.DeploymentArgs; * import com.pulumi.azure.nginx.inputs.DeploymentFrontendPublicArgs; * import com.pulumi.azure.nginx.inputs.DeploymentNetworkInterfaceArgs; * import com.pulumi.azure.nginx.inputs.DeploymentConfigurationArgs; * 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-rg") * .location("West Europe") * .build()); * var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder() * .name("example") * .resourceGroupName(example.name()) * .location(example.location()) * .allocationMethod("Static") * .sku("Standard") * .tags(Map.of("environment", "Production")) * .build()); * var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder() * .name("example-vnet") * .addressSpaces("10.0.0.0/16") * .location(example.location()) * .resourceGroupName(example.name()) * .build()); * var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder() * .name("example-subnet") * .resourceGroupName(example.name()) * .virtualNetworkName(exampleVirtualNetwork.name()) * .addressPrefixes("10.0.2.0/24") * .delegations(SubnetDelegationArgs.builder() * .name("delegation") * .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder() * .name("NGINX.NGINXPLUS/nginxDeployments") * .actions("Microsoft.Network/virtualNetworks/subnets/join/action") * .build()) * .build()) * .build()); * final var configContent = StdFunctions.base64encode(Base64encodeArgs.builder() * .input(""" * http { * server { * listen 80; * location / { * auth_basic "Protected Area"; * auth_basic_user_file /opt/.htpasswd; * default_type text/html; * } * include site/*.conf; * } * } * """) * .build()).result(); * final var protectedContent = StdFunctions.base64encode(Base64encodeArgs.builder() * .input(""" * user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1 * """) * .build()).result(); * final var subConfigContent = StdFunctions.base64encode(Base64encodeArgs.builder() * .input(""" * location /bbb { * default_type text/html; * return 200 ' *
this one will be updated
*
at 10:38 am
* '; * } * """) * .build()).result(); * var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder() * .name("example-nginx") * .resourceGroupName(example.name()) * .sku("publicpreview_Monthly_gmz7xq9ge3py") * .location(example.location()) * .managedResourceGroup("example") * .diagnoseSupportEnabled(true) * .automaticUpgradeChannel("stable") * .frontendPublic(DeploymentFrontendPublicArgs.builder() * .ipAddresses(examplePublicIp.id()) * .build()) * .networkInterfaces(DeploymentNetworkInterfaceArgs.builder() * .subnetId(exampleSubnet.id()) * .build()) * .capacity(20) * .email("[email protected]") * .configuration(DeploymentConfigurationArgs.builder() * .rootFile("/etc/nginx/nginx.conf") * .configFiles( * DeploymentConfigurationConfigFileArgs.builder() * .content(configContent) * .virtualPath("/etc/nginx/nginx.conf") * .build(), * DeploymentConfigurationConfigFileArgs.builder() * .content(subConfigContent) * .virtualPath("/etc/nginx/site/b.conf") * .build()) * .protectedFiles(DeploymentConfigurationProtectedFileArgs.builder() * .content(protectedContent) * .virtualPath("/opt/.htpasswd") * .build()) * .build()) * .build()); * } * } * ``` * ```yaml * resources: * example: * type: azure:core:ResourceGroup * properties: * name: example-rg * location: West Europe * examplePublicIp: * type: azure:network:PublicIp * name: example * properties: * name: example * resourceGroupName: ${example.name} * location: ${example.location} * allocationMethod: Static * sku: Standard * tags: * environment: Production * exampleVirtualNetwork: * type: azure:network:VirtualNetwork * name: example * properties: * name: example-vnet * addressSpaces: * - 10.0.0.0/16 * location: ${example.location} * resourceGroupName: ${example.name} * exampleSubnet: * type: azure:network:Subnet * name: example * properties: * name: example-subnet * resourceGroupName: ${example.name} * virtualNetworkName: ${exampleVirtualNetwork.name} * addressPrefixes: * - 10.0.2.0/24 * delegations: * - name: delegation * serviceDelegation: * name: NGINX.NGINXPLUS/nginxDeployments * actions: * - Microsoft.Network/virtualNetworks/subnets/join/action * exampleDeployment: * type: azure:nginx:Deployment * name: example * properties: * name: example-nginx * resourceGroupName: ${example.name} * sku: publicpreview_Monthly_gmz7xq9ge3py * location: ${example.location} * managedResourceGroup: example * diagnoseSupportEnabled: true * automaticUpgradeChannel: stable * frontendPublic: * ipAddresses: * - ${examplePublicIp.id} * networkInterfaces: * - subnetId: ${exampleSubnet.id} * capacity: 20 * email: [email protected] * configuration: * rootFile: /etc/nginx/nginx.conf * configFiles: * - content: ${configContent} * virtualPath: /etc/nginx/nginx.conf * - content: ${subConfigContent} * virtualPath: /etc/nginx/site/b.conf * protectedFiles: * - content: ${protectedContent} * virtualPath: /opt/.htpasswd * variables: * configContent: * fn::invoke: * Function: std:base64encode * Arguments: * input: | * http { * server { * listen 80; * location / { * auth_basic "Protected Area"; * auth_basic_user_file /opt/.htpasswd; * default_type text/html; * } * include site/*.conf; * } * } * Return: result * protectedContent: * fn::invoke: * Function: std:base64encode * Arguments: * input: | * user:$apr1$VeUA5kt.$IjjRk//8miRxDsZvD4daF1 * Return: result * subConfigContent: * fn::invoke: * Function: std:base64encode * Arguments: * input: | * location /bbb { * default_type text/html; * return 200 ' *
this one will be updated
*
at 10:38 am
* '; * } * Return: result * ``` * * ## Import * NGINX Deployments can be imported using the `resource id`, e.g. * ```sh * $ pulumi import azure:nginx/deployment:Deployment example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/dep1 * ``` * */*/*/*/*/*/ */ public class Deployment internal constructor( override val javaResource: com.pulumi.azure.nginx.Deployment, ) : KotlinCustomResource(javaResource, DeploymentMapper) { /** * An `auto_scale_profile` block as defined below. */ public val autoScaleProfiles: Output>? get() = javaResource.autoScaleProfiles().applyValue({ args0 -> args0.map({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentAutoScaleProfileToKotlin(args0) }) }) }).orElse(null) }) /** * Specify the automatic upgrade channel for the NGINX deployment. Defaults to `stable`. The possible values are `stable` and `preview`. */ public val automaticUpgradeChannel: Output? get() = javaResource.automaticUpgradeChannel().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) }) /** * Specify the number of NGINX capacity units for this NGINX deployment. Defaults to `20`. * > **Note** For more information on NGINX capacity units, please refer to the [NGINX scaling guidance documentation](https://docs.nginx.com/nginxaas/azure/quickstart/scaling/) */ public val capacity: Output? get() = javaResource.capacity().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) }) /** * Specify a custom `configuration` block as defined below. */ public val configuration: Output get() = javaResource.configuration().applyValue({ args0 -> args0.let({ args0 -> deploymentConfigurationToKotlin(args0) }) }) /** * Should the diagnosis support be enabled? */ public val diagnoseSupportEnabled: Output? get() = javaResource.diagnoseSupportEnabled().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) }) /** * Specify the preferred support contact email address for receiving alerts and notifications. */ public val email: Output? get() = javaResource.email().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) }) /** * One or more `frontend_private` blocks as defined below. Changing this forces a new NGINX Deployment to be created. */ public val frontendPrivates: Output>? get() = javaResource.frontendPrivates().applyValue({ args0 -> args0.map({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentFrontendPrivateToKotlin(args0) }) }) }).orElse(null) }) /** * A `frontend_public` block as defined below. Changing this forces a new NGINX Deployment to be created. */ public val frontendPublic: Output? get() = javaResource.frontendPublic().applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentFrontendPublicToKotlin(args0) }) }).orElse(null) }) /** * An `identity` block as defined below. */ public val identity: Output? get() = javaResource.identity().applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentIdentityToKotlin(args0) }) }).orElse(null) }) /** * The IP address of the deployment. */ public val ipAddress: Output get() = javaResource.ipAddress().applyValue({ args0 -> args0 }) /** * The Azure Region where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created. */ public val location: Output get() = javaResource.location().applyValue({ args0 -> args0 }) /** * One or more `logging_storage_account` blocks as defined below. */ public val loggingStorageAccounts: Output>? get() = javaResource.loggingStorageAccounts().applyValue({ args0 -> args0.map({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentLoggingStorageAccountToKotlin(args0) }) }) }).orElse(null) }) /** * Specify the managed resource group to deploy VNet injection related network resources. Changing this forces a new NGINX Deployment to be created. */ public val managedResourceGroup: Output get() = javaResource.managedResourceGroup().applyValue({ args0 -> args0 }) /** * The name which should be used for this NGINX Deployment. Changing this forces a new NGINX Deployment to be created. */ public val name: Output get() = javaResource.name().applyValue({ args0 -> args0 }) /** * One or more `network_interface` blocks as defined below. Changing this forces a new NGINX Deployment to be created. */ public val networkInterfaces: Output>? get() = javaResource.networkInterfaces().applyValue({ args0 -> args0.map({ args0 -> args0.map({ args0 -> args0.let({ args0 -> deploymentNetworkInterfaceToKotlin(args0) }) }) }).orElse(null) }) /** * The version of deployed NGINX. */ public val nginxVersion: Output get() = javaResource.nginxVersion().applyValue({ args0 -> args0 }) /** * The name of the Resource Group where the NGINX Deployment should exist. Changing this forces a new NGINX Deployment to be created. */ public val resourceGroupName: Output get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 }) /** * Specifies the NGINX Deployment SKU. Possible values include `standard_Monthly`. Changing this forces a new resource to be created. */ public val sku: Output get() = javaResource.sku().applyValue({ args0 -> args0 }) /** * A mapping of tags which should be assigned to the NGINX Deployment. */ public val tags: Output>? get() = javaResource.tags().applyValue({ args0 -> args0.map({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }).orElse(null) }) } public object DeploymentMapper : ResourceMapper { override fun supportsMappingOfType(javaResource: Resource): Boolean = com.pulumi.azure.nginx.Deployment::class == javaResource::class override fun map(javaResource: Resource): Deployment = Deployment( javaResource as com.pulumi.azure.nginx.Deployment, ) } /** * @see [Deployment]. * @param name The _unique_ name of the resulting resource. * @param block Builder for [Deployment]. */ public suspend fun deployment(name: String, block: suspend DeploymentResourceBuilder.() -> Unit): Deployment { val builder = DeploymentResourceBuilder() builder.name(name) block(builder) return builder.build() } /** * @see [Deployment]. * @param name The _unique_ name of the resulting resource. */ public fun deployment(name: String): Deployment { val builder = DeploymentResourceBuilder() builder.name(name) return builder.build() }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy