1. Registry
  2. Packages
  3. Cloudfoundry Provider
  4. API Docs
  5. getRemoteMtarHash
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.18.0
published on Monday, Nov 2, 2026 by cloudfoundry

    Gets the SHA-256 sum of a MTAR file hosted on a remote URL.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudfoundry from "@pulumi/cloudfoundry";
    
    const hash = cloudfoundry.getRemoteMtarHash({
        url: "https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar",
    });
    export const shaSum = hash.then(hash => hash.id);
    
    import pulumi
    import pulumi_cloudfoundry as cloudfoundry
    
    hash = cloudfoundry.get_remote_mtar_hash(url="https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar")
    pulumi.export("shaSum", hash.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		hash, err := cloudfoundry.GetRemoteMtarHash(ctx, &cloudfoundry.GetRemoteMtarHashArgs{
    			Url: "https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("shaSum", hash.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudfoundry = Pulumi.Cloudfoundry;
    
    return await Deployment.RunAsync(() => 
    {
        var hash = Cloudfoundry.GetRemoteMtarHash.Invoke(new()
        {
            Url = "https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar",
        });
    
        return new Dictionary<string, object?>
        {
            ["shaSum"] = hash.Apply(getRemoteMtarHashResult => getRemoteMtarHashResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudfoundry.CloudfoundryFunctions;
    import com.pulumi.cloudfoundry.inputs.GetRemoteMtarHashArgs;
    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 hash = CloudfoundryFunctions.getRemoteMtarHash(GetRemoteMtarHashArgs.builder()
                .url("https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar")
                .build());
    
            ctx.export("shaSum", hash.id());
        }
    }
    
    variables:
      hash:
        fn::invoke:
          function: cloudfoundry:getRemoteMtarHash
          arguments:
            url: https://github.com/Dray56/mtar-archive/releases/download/v1.0.0/a.cf.app.mtar
    outputs:
      shaSum: ${hash.id}
    
    Example coming soon!
    

    Using getRemoteMtarHash

    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 getRemoteMtarHash(args: GetRemoteMtarHashArgs, opts?: InvokeOptions): Promise<GetRemoteMtarHashResult>
    function getRemoteMtarHashOutput(args: GetRemoteMtarHashOutputArgs, opts?: InvokeOutputOptions): Output<GetRemoteMtarHashResult>
    def get_remote_mtar_hash(url: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetRemoteMtarHashResult
    def get_remote_mtar_hash_output(url: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOutputOptions] = None) -> Output[GetRemoteMtarHashResult]
    func GetRemoteMtarHash(ctx *Context, args *GetRemoteMtarHashArgs, opts ...InvokeOption) (*GetRemoteMtarHashResult, error)
    func GetRemoteMtarHashOutput(ctx *Context, args *GetRemoteMtarHashOutputArgs, opts ...InvokeOption) GetRemoteMtarHashResultOutput

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

    public static class GetRemoteMtarHash 
    {
        public static Task<GetRemoteMtarHashResult> InvokeAsync(GetRemoteMtarHashArgs args, InvokeOptions? opts = null)
        public static Output<GetRemoteMtarHashResult> Invoke(GetRemoteMtarHashInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetRemoteMtarHashResult> Invoke(GetRemoteMtarHashInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetRemoteMtarHashResult> getRemoteMtarHash(GetRemoteMtarHashArgs args, InvokeOptions options)
    public static Output<GetRemoteMtarHashResult> getRemoteMtarHash(GetRemoteMtarHashArgs args, InvokeOptions options)
    public static Output<GetRemoteMtarHashResult> getRemoteMtarHash(GetRemoteMtarHashArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudfoundry:index/getRemoteMtarHash:getRemoteMtarHash
      arguments:
        # arguments dictionary
    data "cloudfoundry_get_remote_mtar_hash" "name" {
        # arguments
    }

    The following arguments are supported:

    Url string
    The URL where the file is hosted
    Url string
    The URL where the file is hosted
    url string
    The URL where the file is hosted
    url String
    The URL where the file is hosted
    url string
    The URL where the file is hosted
    url str
    The URL where the file is hosted
    url String
    The URL where the file is hosted

    getRemoteMtarHash Result

    The following output properties are available:

    Id string
    The SHA sum of the file
    Url string
    The URL where the file is hosted
    Id string
    The SHA sum of the file
    Url string
    The URL where the file is hosted
    id string
    The SHA sum of the file
    url string
    The URL where the file is hosted
    id String
    The SHA sum of the file
    url String
    The URL where the file is hosted
    id string
    The SHA sum of the file
    url string
    The URL where the file is hosted
    id str
    The SHA sum of the file
    url str
    The URL where the file is hosted
    id String
    The SHA sum of the file
    url String
    The URL where the file is hosted

    Package Details

    Repository
    cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
    License
    Notes
    This Pulumi package is based on the cloudfoundry Terraform Provider.
    cloudfoundry
    Viewing docs for cloudfoundry 1.18.0
    published on Monday, Nov 2, 2026 by cloudfoundry

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial