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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.nginx.getConfiguration

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:nginx/getConfiguration:getConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NginxDeploymentId string
    The ID of the Nginx Deployment.
    NginxDeploymentId string
    The ID of the Nginx Deployment.
    nginxDeploymentId String
    The ID of the Nginx Deployment.
    nginxDeploymentId string
    The ID of the Nginx Deployment.
    nginx_deployment_id str
    The ID of the Nginx Deployment.
    nginxDeploymentId String
    The ID of the Nginx Deployment.

    getConfiguration Result

    The following output properties are available:

    ConfigFiles List<GetConfigurationConfigFile>
    A config_file block as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    NginxDeploymentId string
    PackageData string
    The package data for this configuration.
    ProtectedFiles List<GetConfigurationProtectedFile>
    RootFile string
    The root file path of this Nginx Configuration.
    ConfigFiles []GetConfigurationConfigFile
    A config_file block as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    NginxDeploymentId string
    PackageData string
    The package data for this configuration.
    ProtectedFiles []GetConfigurationProtectedFile
    RootFile string
    The root file path of this Nginx Configuration.
    configFiles List<GetConfigurationConfigFile>
    A config_file block as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    nginxDeploymentId String
    packageData String
    The package data for this configuration.
    protectedFiles List<GetConfigurationProtectedFile>
    rootFile String
    The root file path of this Nginx Configuration.
    configFiles GetConfigurationConfigFile[]
    A config_file block as defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    nginxDeploymentId string
    packageData string
    The package data for this configuration.
    protectedFiles GetConfigurationProtectedFile[]
    rootFile string
    The root file path of this Nginx Configuration.
    config_files Sequence[GetConfigurationConfigFile]
    A config_file block as defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    nginx_deployment_id str
    package_data str
    The package data for this configuration.
    protected_files Sequence[GetConfigurationProtectedFile]
    root_file str
    The root file path of this Nginx Configuration.
    configFiles List<Property Map>
    A config_file block as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    nginxDeploymentId String
    packageData String
    The package data for this configuration.
    protectedFiles List<Property Map>
    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.
    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.

    Package Details

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

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi