1. Packages
  2. ACME
  3. API Docs
  4. getServerUrl
ACME v0.6.0 published on Wednesday, Nov 13, 2024 by Pulumiverse

acme.getServerUrl

Explore with Pulumi AI

acme logo
ACME v0.6.0 published on Wednesday, Nov 13, 2024 by Pulumiverse

    # acme.getServerUrl

    The acme.getServerUrl data source can be used to retrieve the CA server URL that the provider is currently configured for.

    Example

    The following example populates the server_url output with the currently configured CA server URL.

    import * as pulumi from "@pulumi/pulumi";
    import * as acme from "@pulumi/acme";
    
    const url = acme.getServerUrl({});
    export const serverUrl = url.then(url => url.serverUrl);
    
    import pulumi
    import pulumi_acme as acme
    
    url = acme.get_server_url()
    pulumi.export("serverUrl", url.server_url)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-acme/sdk/go/acme"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		url, err := acme.GetServerUrl(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("serverUrl", url.ServerUrl)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Acme = Pulumi.Acme;
    
    return await Deployment.RunAsync(() => 
    {
        var url = Acme.GetServerUrl.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["serverUrl"] = url.Apply(getServerUrlResult => getServerUrlResult.ServerUrl),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.acme.AcmeFunctions;
    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 url = AcmeFunctions.getServerUrl();
    
            ctx.export("serverUrl", url.applyValue(getServerUrlResult -> getServerUrlResult.serverUrl()));
        }
    }
    
    variables:
      url:
        fn::invoke:
          Function: acme:getServerUrl
          Arguments: {}
    outputs:
      serverUrl: ${url.serverUrl}
    

    Argument Reference

    This data source takes no arguments.

    Attribute Reference

    The following attributes are exported:

    • id: the CA server URL that the provider is currently configured for.
    • server_url: the CA server URL that the provider is currently configured for. Same as id.

    Using getServerUrl

    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 getServerUrl(opts?: InvokeOptions): Promise<GetServerUrlResult>
    function getServerUrlOutput(opts?: InvokeOptions): Output<GetServerUrlResult>
    def get_server_url(opts: Optional[InvokeOptions] = None) -> GetServerUrlResult
    def get_server_url_output(opts: Optional[InvokeOptions] = None) -> Output[GetServerUrlResult]
    func GetServerUrl(ctx *Context, opts ...InvokeOption) (*GetServerUrlResult, error)
    func GetServerUrlOutput(ctx *Context, opts ...InvokeOption) GetServerUrlResultOutput

    > Note: This function is named GetServerUrl in the Go SDK.

    public static class GetServerUrl 
    {
        public static Task<GetServerUrlResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetServerUrlResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerUrlResult> getServerUrl(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: acme:index/getServerUrl:getServerUrl
      arguments:
        # arguments dictionary

    getServerUrl Result

    The following output properties are available:

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

    Package Details

    Repository
    acme pulumiverse/pulumi-acme
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the acme Terraform Provider.
    acme logo
    ACME v0.6.0 published on Wednesday, Nov 13, 2024 by Pulumiverse