We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.nginx.getConfiguration
Explore with Pulumi AI
Use this data source to access information about an existing Nginx Configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.nginx.getConfiguration({
    nginxDeploymentId: exampleAzurermNginxDeployment.id,
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.nginx.get_configuration(nginx_deployment_id=example_azurerm_nginx_deployment["id"])
pulumi.export("id", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := nginx.LookupConfiguration(ctx, &nginx.LookupConfigurationArgs{
			NginxDeploymentId: exampleAzurermNginxDeployment.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Nginx.GetConfiguration.Invoke(new()
    {
        NginxDeploymentId = exampleAzurermNginxDeployment.Id,
    });
    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getConfigurationResult => getConfigurationResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.nginx.NginxFunctions;
import com.pulumi.azure.nginx.inputs.GetConfigurationArgs;
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) {
        final var example = NginxFunctions.getConfiguration(GetConfigurationArgs.builder()
            .nginxDeploymentId(exampleAzurermNginxDeployment.id())
            .build());
        ctx.export("id", example.applyValue(getConfigurationResult -> getConfigurationResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:nginx:getConfiguration
      arguments:
        nginxDeploymentId: ${exampleAzurermNginxDeployment.id}
outputs:
  id: ${example.id}
Using getConfiguration
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConfiguration(args: GetConfigurationArgs, opts?: InvokeOptions): Promise<GetConfigurationResult>
function getConfigurationOutput(args: GetConfigurationOutputArgs, opts?: InvokeOptions): Output<GetConfigurationResult>def get_configuration(nginx_deployment_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetConfigurationResult
def get_configuration_output(nginx_deployment_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetConfigurationResult]func LookupConfiguration(ctx *Context, args *LookupConfigurationArgs, opts ...InvokeOption) (*LookupConfigurationResult, error)
func LookupConfigurationOutput(ctx *Context, args *LookupConfigurationOutputArgs, opts ...InvokeOption) LookupConfigurationResultOutput> Note: This function is named LookupConfiguration in the Go SDK.
public static class GetConfiguration 
{
    public static Task<GetConfigurationResult> InvokeAsync(GetConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetConfigurationResult> Invoke(GetConfigurationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
public static Output<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
fn::invoke:
  function: azure:nginx/getConfiguration:getConfiguration
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NginxDeployment stringId 
- The ID of the Nginx Deployment.
- NginxDeployment stringId 
- The ID of the Nginx Deployment.
- nginxDeployment StringId 
- The ID of the Nginx Deployment.
- nginxDeployment stringId 
- The ID of the Nginx Deployment.
- nginx_deployment_ strid 
- The ID of the Nginx Deployment.
- nginxDeployment StringId 
- The ID of the Nginx Deployment.
getConfiguration Result
The following output properties are available:
- ConfigFiles List<GetConfiguration Config File> 
- A config_fileblock as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- NginxDeployment stringId 
- PackageData string
- The package data for this configuration.
- ProtectedFiles List<GetConfiguration Protected File> 
- A protected_fileblock as defined below.
- RootFile string
- The root file path of this Nginx Configuration.
- ConfigFiles []GetConfiguration Config File 
- A config_fileblock as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- NginxDeployment stringId 
- PackageData string
- The package data for this configuration.
- ProtectedFiles []GetConfiguration Protected File 
- A protected_fileblock as defined below.
- RootFile string
- The root file path of this Nginx Configuration.
- configFiles List<GetConfiguration Config File> 
- A config_fileblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- nginxDeployment StringId 
- packageData String
- The package data for this configuration.
- protectedFiles List<GetConfiguration Protected File> 
- A protected_fileblock as defined below.
- rootFile String
- The root file path of this Nginx Configuration.
- configFiles GetConfiguration Config File[] 
- A config_fileblock as defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- nginxDeployment stringId 
- packageData string
- The package data for this configuration.
- protectedFiles GetConfiguration Protected File[] 
- A protected_fileblock as defined below.
- rootFile string
- The root file path of this Nginx Configuration.
- config_files Sequence[GetConfiguration Config File] 
- A config_fileblock as defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- nginx_deployment_ strid 
- package_data str
- The package data for this configuration.
- protected_files Sequence[GetConfiguration Protected File] 
- A protected_fileblock as defined below.
- root_file str
- The root file path of this Nginx Configuration.
- configFiles List<Property Map>
- A config_fileblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- nginxDeployment StringId 
- packageData String
- The package data for this configuration.
- protectedFiles List<Property Map>
- A protected_fileblock as defined below.
- rootFile String
- The root file path of this Nginx Configuration.
Supporting Types
GetConfigurationConfigFile   
- Content string
- The base-64 encoded contents of this configuration file.
- VirtualPath string
- The path of this configuration file.
- Content string
- The base-64 encoded contents of this configuration file.
- VirtualPath string
- The path of this configuration file.
- content String
- The base-64 encoded contents of this configuration file.
- virtualPath String
- The path of this configuration file.
- content string
- The base-64 encoded contents of this configuration file.
- virtualPath string
- The path of this configuration file.
- content str
- The base-64 encoded contents of this configuration file.
- virtual_path str
- The path of this configuration file.
- content String
- The base-64 encoded contents of this configuration file.
- virtualPath String
- The path of this configuration file.
GetConfigurationProtectedFile   
- Content string
- The base-64 encoded contents of this configuration file.
- ContentHash string
- The hash of the contents of this configuration file prefixed by the algorithm used.
- VirtualPath string
- The path of this configuration file.
- Content string
- The base-64 encoded contents of this configuration file.
- ContentHash string
- The hash of the contents of this configuration file prefixed by the algorithm used.
- VirtualPath string
- The path of this configuration file.
- content String
- The base-64 encoded contents of this configuration file.
- contentHash String
- The hash of the contents of this configuration file prefixed by the algorithm used.
- virtualPath String
- The path of this configuration file.
- content string
- The base-64 encoded contents of this configuration file.
- contentHash string
- The hash of the contents of this configuration file prefixed by the algorithm used.
- virtualPath string
- The path of this configuration file.
- content str
- The base-64 encoded contents of this configuration file.
- content_hash str
- The hash of the contents of this configuration file prefixed by the algorithm used.
- virtual_path str
- The path of this configuration file.
- content String
- The base-64 encoded contents of this configuration file.
- contentHash String
- The hash of the contents of this configuration file prefixed by the algorithm used.
- virtualPath String
- The path of this configuration file.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.