1. Packages
  2. Azure Classic
  3. API Docs
  4. nginx
  5. Configuration

We recommend using Azure Native.

Azure v6.23.0 published on Thursday, May 22, 2025 by Pulumi

azure.nginx.Configuration

Explore with Pulumi AI

Manages the configuration for a Nginx Deployment.

Example Usage

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 exampleDeployment = new azure.nginx.Deployment("example", {
    name: "example-nginx",
    resourceGroupName: example.name,
    sku: "publicpreview_Monthly_gmz7xq9ge3py",
    location: example.location,
    diagnoseSupportEnabled: true,
    frontendPublic: {
        ipAddresses: [examplePublicIp.id],
    },
    networkInterfaces: [{
        subnetId: exampleSubnet.id,
    }],
});
const exampleConfiguration = new azure.nginx.Configuration("example", {
    nginxDeploymentId: exampleDeployment.id,
    rootFile: "/etc/nginx/nginx.conf",
    configFiles: [
        {
            content: std.base64encode({
                input: `http {
    server {
        listen 80;
        location / {
            default_type text/html;
            return 200 '<!doctype html><html lang="en"><head></head><body>
                <div>this one will be updated</div>
                <div>at 10:38 am</div>
            </body></html>';
        }
        include site/*.conf;
    }
}
`,
            }).then(invoke => invoke.result),
            virtualPath: "/etc/nginx/nginx.conf",
        },
        {
            content: std.base64encode({
                input: `location /bbb {
 default_type text/html;
 return 200 '<!doctype html><html lang="en"><head></head><body>
  <div>this one will be updated</div>
  <div>at 10:38 am</div>
 </body></html>';
}
`,
            }).then(invoke => invoke.result),
            virtualPath: "/etc/nginx/site/b.conf",
        },
    ],
});
Copy
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=[{
        "name": "delegation",
        "service_delegation": {
            "name": "NGINX.NGINXPLUS/nginxDeployments",
            "actions": ["Microsoft.Network/virtualNetworks/subnets/join/action"],
        },
    }])
example_deployment = azure.nginx.Deployment("example",
    name="example-nginx",
    resource_group_name=example.name,
    sku="publicpreview_Monthly_gmz7xq9ge3py",
    location=example.location,
    diagnose_support_enabled=True,
    frontend_public={
        "ip_addresses": [example_public_ip.id],
    },
    network_interfaces=[{
        "subnet_id": example_subnet.id,
    }])
example_configuration = azure.nginx.Configuration("example",
    nginx_deployment_id=example_deployment.id,
    root_file="/etc/nginx/nginx.conf",
    config_files=[
        {
            "content": std.base64encode(input="""http {
    server {
        listen 80;
        location / {
            default_type text/html;
            return 200 '<!doctype html><html lang="en"><head></head><body>
                <div>this one will be updated</div>
                <div>at 10:38 am</div>
            </body></html>';
        }
        include site/*.conf;
    }
}
""").result,
            "virtual_path": "/etc/nginx/nginx.conf",
        },
        {
            "content": std.base64encode(input="""location /bbb {
 default_type text/html;
 return 200 '<!doctype html><html lang="en"><head></head><body>
  <div>this one will be updated</div>
  <div>at 10:38 am</div>
 </body></html>';
}
""").result,
            "virtual_path": "/etc/nginx/site/b.conf",
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
	"github.com/pulumi/pulumi-azure/sdk/v6/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
		}
		exampleDeployment, err := nginx.NewDeployment(ctx, "example", &nginx.DeploymentArgs{
			Name:                   pulumi.String("example-nginx"),
			ResourceGroupName:      example.Name,
			Sku:                    pulumi.String("publicpreview_Monthly_gmz7xq9ge3py"),
			Location:               example.Location,
			DiagnoseSupportEnabled: pulumi.Bool(true),
			FrontendPublic: &nginx.DeploymentFrontendPublicArgs{
				IpAddresses: pulumi.StringArray{
					examplePublicIp.ID(),
				},
			},
			NetworkInterfaces: nginx.DeploymentNetworkInterfaceArray{
				&nginx.DeploymentNetworkInterfaceArgs{
					SubnetId: exampleSubnet.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
			Input: `http {
    server {
        listen 80;
        location / {
            default_type text/html;
            return 200 '<!doctype html><html lang="en"><head></head><body>
                <div>this one will be updated</div>
                <div>at 10:38 am</div>
            </body></html>';
        }
        include site/*.conf;
    }
}
`,
		}, nil)
		if err != nil {
			return err
		}
		invokeBase64encode1, err := std.Base64encode(ctx, &std.Base64encodeArgs{
			Input: `location /bbb {
 default_type text/html;
 return 200 '<!doctype html><html lang="en"><head></head><body>
  <div>this one will be updated</div>
  <div>at 10:38 am</div>
 </body></html>';
}
`,
		}, nil)
		if err != nil {
			return err
		}
		_, err = nginx.NewConfiguration(ctx, "example", &nginx.ConfigurationArgs{
			NginxDeploymentId: exampleDeployment.ID(),
			RootFile:          pulumi.String("/etc/nginx/nginx.conf"),
			ConfigFiles: nginx.ConfigurationConfigFileArray{
				&nginx.ConfigurationConfigFileArgs{
					Content:     pulumi.String(invokeBase64encode.Result),
					VirtualPath: pulumi.String("/etc/nginx/nginx.conf"),
				},
				&nginx.ConfigurationConfigFileArgs{
					Content:     pulumi.String(invokeBase64encode1.Result),
					VirtualPath: pulumi.String("/etc/nginx/site/b.conf"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 exampleDeployment = new Azure.Nginx.Deployment("example", new()
    {
        Name = "example-nginx",
        ResourceGroupName = example.Name,
        Sku = "publicpreview_Monthly_gmz7xq9ge3py",
        Location = example.Location,
        DiagnoseSupportEnabled = true,
        FrontendPublic = new Azure.Nginx.Inputs.DeploymentFrontendPublicArgs
        {
            IpAddresses = new[]
            {
                examplePublicIp.Id,
            },
        },
        NetworkInterfaces = new[]
        {
            new Azure.Nginx.Inputs.DeploymentNetworkInterfaceArgs
            {
                SubnetId = exampleSubnet.Id,
            },
        },
    });

    var exampleConfiguration = new Azure.Nginx.Configuration("example", new()
    {
        NginxDeploymentId = exampleDeployment.Id,
        RootFile = "/etc/nginx/nginx.conf",
        ConfigFiles = new[]
        {
            new Azure.Nginx.Inputs.ConfigurationConfigFileArgs
            {
                Content = Std.Base64encode.Invoke(new()
                {
                    Input = @"http {
    server {
        listen 80;
        location / {
            default_type text/html;
            return 200 '<!doctype html><html lang=""en""><head></head><body>
                <div>this one will be updated</div>
                <div>at 10:38 am</div>
            </body></html>';
        }
        include site/*.conf;
    }
}
",
                }).Apply(invoke => invoke.Result),
                VirtualPath = "/etc/nginx/nginx.conf",
            },
            new Azure.Nginx.Inputs.ConfigurationConfigFileArgs
            {
                Content = Std.Base64encode.Invoke(new()
                {
                    Input = @"location /bbb {
 default_type text/html;
 return 200 '<!doctype html><html lang=""en""><head></head><body>
  <div>this one will be updated</div>
  <div>at 10:38 am</div>
 </body></html>';
}
",
                }).Apply(invoke => invoke.Result),
                VirtualPath = "/etc/nginx/site/b.conf",
            },
        },
    });

});
Copy
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.Configuration;
import com.pulumi.azure.nginx.ConfigurationArgs;
import com.pulumi.azure.nginx.inputs.ConfigurationConfigFileArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Base64encodeArgs;
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());

        var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()
            .name("example-nginx")
            .resourceGroupName(example.name())
            .sku("publicpreview_Monthly_gmz7xq9ge3py")
            .location(example.location())
            .diagnoseSupportEnabled(true)
            .frontendPublic(DeploymentFrontendPublicArgs.builder()
                .ipAddresses(examplePublicIp.id())
                .build())
            .networkInterfaces(DeploymentNetworkInterfaceArgs.builder()
                .subnetId(exampleSubnet.id())
                .build())
            .build());

        var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
            .nginxDeploymentId(exampleDeployment.id())
            .rootFile("/etc/nginx/nginx.conf")
            .configFiles(            
                ConfigurationConfigFileArgs.builder()
                    .content(StdFunctions.base64encode(Base64encodeArgs.builder()
                        .input("""
http {
    server {
        listen 80;
        location / {
            default_type text/html;
            return 200 '<!doctype html><html lang="en"><head></head><body>
                <div>this one will be updated</div>
                <div>at 10:38 am</div>
            </body></html>';
        }
        include site/*.conf;
    }
}
                        """)
                        .build()).result())
                    .virtualPath("/etc/nginx/nginx.conf")
                    .build(),
                ConfigurationConfigFileArgs.builder()
                    .content(StdFunctions.base64encode(Base64encodeArgs.builder()
                        .input("""
location /bbb {
 default_type text/html;
 return 200 '<!doctype html><html lang="en"><head></head><body>
  <div>this one will be updated</div>
  <div>at 10:38 am</div>
 </body></html>';
}
                        """)
                        .build()).result())
                    .virtualPath("/etc/nginx/site/b.conf")
                    .build())
            .build());

    }
}
Copy
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}
      diagnoseSupportEnabled: true
      frontendPublic:
        ipAddresses:
          - ${examplePublicIp.id}
      networkInterfaces:
        - subnetId: ${exampleSubnet.id}
  exampleConfiguration:
    type: azure:nginx:Configuration
    name: example
    properties:
      nginxDeploymentId: ${exampleDeployment.id}
      rootFile: /etc/nginx/nginx.conf
      configFiles:
        - content:
            fn::invoke:
              function: std:base64encode
              arguments:
                input: |
                  http {
                      server {
                          listen 80;
                          location / {
                              default_type text/html;
                              return 200 '<!doctype html><html lang="en"><head></head><body>
                                  <div>this one will be updated</div>
                                  <div>at 10:38 am</div>
                              </body></html>';
                          }
                          include site/*.conf;
                      }
                  }                  
              return: result
          virtualPath: /etc/nginx/nginx.conf
        - content:
            fn::invoke:
              function: std:base64encode
              arguments:
                input: |
                  location /bbb {
                   default_type text/html;
                   return 200 '<!doctype html><html lang="en"><head></head><body>
                    <div>this one will be updated</div>
                    <div>at 10:38 am</div>
                   </body></html>';
                  }                  
              return: result
          virtualPath: /etc/nginx/site/b.conf
Copy

API Providers

This resource uses the following Azure API Providers:

  • Nginx.NginxPlus: 2024-11-01-preview

Create Configuration Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Configuration(name: string, args: ConfigurationArgs, opts?: CustomResourceOptions);
@overload
def Configuration(resource_name: str,
                  args: ConfigurationArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def Configuration(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  nginx_deployment_id: Optional[str] = None,
                  root_file: Optional[str] = None,
                  config_files: Optional[Sequence[ConfigurationConfigFileArgs]] = None,
                  package_data: Optional[str] = None,
                  protected_files: Optional[Sequence[ConfigurationProtectedFileArgs]] = None)
func NewConfiguration(ctx *Context, name string, args ConfigurationArgs, opts ...ResourceOption) (*Configuration, error)
public Configuration(string name, ConfigurationArgs args, CustomResourceOptions? opts = null)
public Configuration(String name, ConfigurationArgs args)
public Configuration(String name, ConfigurationArgs args, CustomResourceOptions options)
type: azure:nginx:Configuration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConfigurationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConfigurationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConfigurationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var exampleconfigurationResourceResourceFromNginxconfiguration = new Azure.Nginx.Configuration("exampleconfigurationResourceResourceFromNginxconfiguration", new()
{
    NginxDeploymentId = "string",
    RootFile = "string",
    ConfigFiles = new[]
    {
        new Azure.Nginx.Inputs.ConfigurationConfigFileArgs
        {
            Content = "string",
            VirtualPath = "string",
        },
    },
    PackageData = "string",
    ProtectedFiles = new[]
    {
        new Azure.Nginx.Inputs.ConfigurationProtectedFileArgs
        {
            Content = "string",
            VirtualPath = "string",
            ContentHash = "string",
        },
    },
});
Copy
example, err := nginx.NewConfiguration(ctx, "exampleconfigurationResourceResourceFromNginxconfiguration", &nginx.ConfigurationArgs{
	NginxDeploymentId: pulumi.String("string"),
	RootFile:          pulumi.String("string"),
	ConfigFiles: nginx.ConfigurationConfigFileArray{
		&nginx.ConfigurationConfigFileArgs{
			Content:     pulumi.String("string"),
			VirtualPath: pulumi.String("string"),
		},
	},
	PackageData: pulumi.String("string"),
	ProtectedFiles: nginx.ConfigurationProtectedFileArray{
		&nginx.ConfigurationProtectedFileArgs{
			Content:     pulumi.String("string"),
			VirtualPath: pulumi.String("string"),
			ContentHash: pulumi.String("string"),
		},
	},
})
Copy
var exampleconfigurationResourceResourceFromNginxconfiguration = new com.pulumi.azure.nginx.Configuration("exampleconfigurationResourceResourceFromNginxconfiguration", com.pulumi.azure.nginx.ConfigurationArgs.builder()
    .nginxDeploymentId("string")
    .rootFile("string")
    .configFiles(ConfigurationConfigFileArgs.builder()
        .content("string")
        .virtualPath("string")
        .build())
    .packageData("string")
    .protectedFiles(ConfigurationProtectedFileArgs.builder()
        .content("string")
        .virtualPath("string")
        .contentHash("string")
        .build())
    .build());
Copy
exampleconfiguration_resource_resource_from_nginxconfiguration = azure.nginx.Configuration("exampleconfigurationResourceResourceFromNginxconfiguration",
    nginx_deployment_id="string",
    root_file="string",
    config_files=[{
        "content": "string",
        "virtual_path": "string",
    }],
    package_data="string",
    protected_files=[{
        "content": "string",
        "virtual_path": "string",
        "content_hash": "string",
    }])
Copy
const exampleconfigurationResourceResourceFromNginxconfiguration = new azure.nginx.Configuration("exampleconfigurationResourceResourceFromNginxconfiguration", {
    nginxDeploymentId: "string",
    rootFile: "string",
    configFiles: [{
        content: "string",
        virtualPath: "string",
    }],
    packageData: "string",
    protectedFiles: [{
        content: "string",
        virtualPath: "string",
        contentHash: "string",
    }],
});
Copy
type: azure:nginx:Configuration
properties:
    configFiles:
        - content: string
          virtualPath: string
    nginxDeploymentId: string
    packageData: string
    protectedFiles:
        - content: string
          contentHash: string
          virtualPath: string
    rootFile: string
Copy

Configuration Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Configuration resource accepts the following input properties:

NginxDeploymentId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
RootFile This property is required. string
Specifies the root file path of this Nginx Configuration.
ConfigFiles List<ConfigurationConfigFile>
One or more config_file blocks as defined below.
PackageData string
Specifies the package data for this configuration.
ProtectedFiles List<ConfigurationProtectedFile>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
NginxDeploymentId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
RootFile This property is required. string
Specifies the root file path of this Nginx Configuration.
ConfigFiles []ConfigurationConfigFileArgs
One or more config_file blocks as defined below.
PackageData string
Specifies the package data for this configuration.
ProtectedFiles []ConfigurationProtectedFileArgs
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
nginxDeploymentId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
rootFile This property is required. String
Specifies the root file path of this Nginx Configuration.
configFiles List<ConfigurationConfigFile>
One or more config_file blocks as defined below.
packageData String
Specifies the package data for this configuration.
protectedFiles List<ConfigurationProtectedFile>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
nginxDeploymentId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
rootFile This property is required. string
Specifies the root file path of this Nginx Configuration.
configFiles ConfigurationConfigFile[]
One or more config_file blocks as defined below.
packageData string
Specifies the package data for this configuration.
protectedFiles ConfigurationProtectedFile[]
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
nginx_deployment_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
root_file This property is required. str
Specifies the root file path of this Nginx Configuration.
config_files Sequence[ConfigurationConfigFileArgs]
One or more config_file blocks as defined below.
package_data str
Specifies the package data for this configuration.
protected_files Sequence[ConfigurationProtectedFileArgs]
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
nginxDeploymentId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
rootFile This property is required. String
Specifies the root file path of this Nginx Configuration.
configFiles List<Property Map>
One or more config_file blocks as defined below.
packageData String
Specifies the package data for this configuration.
protectedFiles List<Property Map>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.

Outputs

All input properties are implicitly available as output properties. Additionally, the Configuration resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Configuration Resource

Get an existing Configuration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConfigurationState, opts?: CustomResourceOptions): Configuration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_files: Optional[Sequence[ConfigurationConfigFileArgs]] = None,
        nginx_deployment_id: Optional[str] = None,
        package_data: Optional[str] = None,
        protected_files: Optional[Sequence[ConfigurationProtectedFileArgs]] = None,
        root_file: Optional[str] = None) -> Configuration
func GetConfiguration(ctx *Context, name string, id IDInput, state *ConfigurationState, opts ...ResourceOption) (*Configuration, error)
public static Configuration Get(string name, Input<string> id, ConfigurationState? state, CustomResourceOptions? opts = null)
public static Configuration get(String name, Output<String> id, ConfigurationState state, CustomResourceOptions options)
resources:  _:    type: azure:nginx:Configuration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConfigFiles List<ConfigurationConfigFile>
One or more config_file blocks as defined below.
NginxDeploymentId Changes to this property will trigger replacement. string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
PackageData string
Specifies the package data for this configuration.
ProtectedFiles List<ConfigurationProtectedFile>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
RootFile string
Specifies the root file path of this Nginx Configuration.
ConfigFiles []ConfigurationConfigFileArgs
One or more config_file blocks as defined below.
NginxDeploymentId Changes to this property will trigger replacement. string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
PackageData string
Specifies the package data for this configuration.
ProtectedFiles []ConfigurationProtectedFileArgs
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
RootFile string
Specifies the root file path of this Nginx Configuration.
configFiles List<ConfigurationConfigFile>
One or more config_file blocks as defined below.
nginxDeploymentId Changes to this property will trigger replacement. String
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
packageData String
Specifies the package data for this configuration.
protectedFiles List<ConfigurationProtectedFile>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
rootFile String
Specifies the root file path of this Nginx Configuration.
configFiles ConfigurationConfigFile[]
One or more config_file blocks as defined below.
nginxDeploymentId Changes to this property will trigger replacement. string
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
packageData string
Specifies the package data for this configuration.
protectedFiles ConfigurationProtectedFile[]
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
rootFile string
Specifies the root file path of this Nginx Configuration.
config_files Sequence[ConfigurationConfigFileArgs]
One or more config_file blocks as defined below.
nginx_deployment_id Changes to this property will trigger replacement. str
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
package_data str
Specifies the package data for this configuration.
protected_files Sequence[ConfigurationProtectedFileArgs]
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
root_file str
Specifies the root file path of this Nginx Configuration.
configFiles List<Property Map>
One or more config_file blocks as defined below.
nginxDeploymentId Changes to this property will trigger replacement. String
The ID of the Nginx Deployment. Changing this forces a new Nginx Configuration to be created.
packageData String
Specifies the package data for this configuration.
protectedFiles List<Property Map>
One or more protected_file blocks with sensitive information as defined below. If specified config_file must also be specified.
rootFile String
Specifies the root file path of this Nginx Configuration.

Supporting Types

ConfigurationConfigFile
, ConfigurationConfigFileArgs

Content This property is required. string
Specifies the base-64 encoded contents of this config file.
VirtualPath This property is required. string
Specifies the path of this config file.
Content This property is required. string
Specifies the base-64 encoded contents of this config file.
VirtualPath This property is required. string
Specifies the path of this config file.
content This property is required. String
Specifies the base-64 encoded contents of this config file.
virtualPath This property is required. String
Specifies the path of this config file.
content This property is required. string
Specifies the base-64 encoded contents of this config file.
virtualPath This property is required. string
Specifies the path of this config file.
content This property is required. str
Specifies the base-64 encoded contents of this config file.
virtual_path This property is required. str
Specifies the path of this config file.
content This property is required. String
Specifies the base-64 encoded contents of this config file.
virtualPath This property is required. String
Specifies the path of this config file.

ConfigurationProtectedFile
, ConfigurationProtectedFileArgs

Content This property is required. string
Specifies the base-64 encoded contents of this config file (Sensitive).
VirtualPath This property is required. string
Specifies the path of this config file.
ContentHash string
The hash of the contents of this configuration file prefixed by the algorithm used.
Content This property is required. string
Specifies the base-64 encoded contents of this config file (Sensitive).
VirtualPath This property is required. string
Specifies the path of this config file.
ContentHash string
The hash of the contents of this configuration file prefixed by the algorithm used.
content This property is required. String
Specifies the base-64 encoded contents of this config file (Sensitive).
virtualPath This property is required. String
Specifies the path of this config file.
contentHash String
The hash of the contents of this configuration file prefixed by the algorithm used.
content This property is required. string
Specifies the base-64 encoded contents of this config file (Sensitive).
virtualPath This property is required. string
Specifies the path of this config file.
contentHash string
The hash of the contents of this configuration file prefixed by the algorithm used.
content This property is required. str
Specifies the base-64 encoded contents of this config file (Sensitive).
virtual_path This property is required. str
Specifies the path of this config file.
content_hash str
The hash of the contents of this configuration file prefixed by the algorithm used.
content This property is required. String
Specifies the base-64 encoded contents of this config file (Sensitive).
virtualPath This property is required. String
Specifies the path of this config file.
contentHash String
The hash of the contents of this configuration file prefixed by the algorithm used.

Import

An Nginx Configuration can be imported using the resource id, e.g.

$ pulumi import azure:nginx/configuration:Configuration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Nginx.NginxPlus/nginxDeployments/dep1/configurations/default
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.