hpegl.getVmaasMorpheusDetails
Explore with Pulumi AI
Compatible version >= 5.2.4
The hpegl.getVmaasMorpheusDetails data source can be used to get a details of the Morpheus instance used by VMaaS. The details that can be retrieved are the access_token, valid_till (time until the token expires, in seconds), and the URL of the Morpheus instance.
hpegl.getVmaasMorpheusDetails data-source supports fetching the details of the on-prem Morpheus instance.
Example Usage
With The Morpheus Provider - One Location And One Space-Name
import * as pulumi from "@pulumi/pulumi";
import * as hpegl from "@pulumi/hpegl";
const morpheusDetails = hpegl.getVmaasMorpheusDetails({});
import pulumi
import pulumi_hpegl as hpegl
morpheus_details = hpegl.get_vmaas_morpheus_details()
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hpegl/hpegl"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hpegl.GetVmaasMorpheusDetails(ctx, &hpegl.GetVmaasMorpheusDetailsArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hpegl = Pulumi.Hpegl;
return await Deployment.RunAsync(() => 
{
    var morpheusDetails = Hpegl.GetVmaasMorpheusDetails.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hpegl.HpeglFunctions;
import com.pulumi.hpegl.inputs.GetVmaasMorpheusDetailsArgs;
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 morpheusDetails = HpeglFunctions.getVmaasMorpheusDetails();
    }
}
variables:
  morpheusDetails:
    fn::invoke:
      function: hpegl:getVmaasMorpheusDetails
      arguments: {}
With The Morpheus Provider - Multiple Locations And/Or Space-Names
import * as pulumi from "@pulumi/pulumi";
import * as hpegl from "@pulumi/hpegl";
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
// Location 1
const location1 = new hpegl.Provider("location1", {vmaas: {
    location: _var.location_1,
    spaceName: _var.space_1,
}});
const location1VmaasMorpheusDetails = hpegl.getVmaasMorpheusDetails({});
// Location 2
const location2 = new hpegl.Provider("location2", {vmaas: {
    location: _var.location_2,
    spaceName: _var.space_2,
}});
const location2VmaasMorpheusDetails = hpegl.getVmaasMorpheusDetails({});
import pulumi
import pulumi_hpegl as hpegl
# (C) Copyright 2024 Hewlett Packard Enterprise Development LP
# Location 1
location1 = hpegl.Provider("location1", vmaas={
    "location": var["location_1"],
    "space_name": var["space_1"],
})
location1_vmaas_morpheus_details = hpegl.get_vmaas_morpheus_details()
# Location 2
location2 = hpegl.Provider("location2", vmaas={
    "location": var["location_2"],
    "space_name": var["space_2"],
})
location2_vmaas_morpheus_details = hpegl.get_vmaas_morpheus_details()
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hpegl/hpegl"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
		// Location 1
		_, err := hpegl.NewProvider(ctx, "location1", &hpegl.ProviderArgs{
			Vmaas: &hpegl.ProviderVmaasArgs{
				Location:  pulumi.Any(_var.Location_1),
				SpaceName: pulumi.Any(_var.Space_1),
			},
		})
		if err != nil {
			return err
		}
		_, err = hpegl.GetVmaasMorpheusDetails(ctx, &hpegl.GetVmaasMorpheusDetailsArgs{}, nil)
		if err != nil {
			return err
		}
		// Location 2
		_, err = hpegl.NewProvider(ctx, "location2", &hpegl.ProviderArgs{
			Vmaas: &hpegl.ProviderVmaasArgs{
				Location:  pulumi.Any(_var.Location_2),
				SpaceName: pulumi.Any(_var.Space_2),
			},
		})
		if err != nil {
			return err
		}
		_, err = hpegl.GetVmaasMorpheusDetails(ctx, &hpegl.GetVmaasMorpheusDetailsArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hpegl = Pulumi.Hpegl;
return await Deployment.RunAsync(() => 
{
    // (C) Copyright 2024 Hewlett Packard Enterprise Development LP
    // Location 1
    var location1 = new Hpegl.Provider("location1", new()
    {
        Vmaas = new Hpegl.Inputs.ProviderVmaasArgs
        {
            Location = @var.Location_1,
            SpaceName = @var.Space_1,
        },
    });
    var location1VmaasMorpheusDetails = Hpegl.GetVmaasMorpheusDetails.Invoke();
    // Location 2
    var location2 = new Hpegl.Provider("location2", new()
    {
        Vmaas = new Hpegl.Inputs.ProviderVmaasArgs
        {
            Location = @var.Location_2,
            SpaceName = @var.Space_2,
        },
    });
    var location2VmaasMorpheusDetails = Hpegl.GetVmaasMorpheusDetails.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hpegl.Provider;
import com.pulumi.hpegl.ProviderArgs;
import com.pulumi.hpegl.inputs.ProviderVmaasArgs;
import com.pulumi.hpegl.HpeglFunctions;
import com.pulumi.hpegl.inputs.GetVmaasMorpheusDetailsArgs;
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) {
        // (C) Copyright 2024 Hewlett Packard Enterprise Development LP
        // Location 1
        var location1 = new Provider("location1", ProviderArgs.builder()
            .vmaas(ProviderVmaasArgs.builder()
                .location(var_.location_1())
                .spaceName(var_.space_1())
                .build())
            .build());
        final var location1VmaasMorpheusDetails = HpeglFunctions.getVmaasMorpheusDetails();
        // Location 2
        var location2 = new Provider("location2", ProviderArgs.builder()
            .vmaas(ProviderVmaasArgs.builder()
                .location(var_.location_2())
                .spaceName(var_.space_2())
                .build())
            .build());
        final var location2VmaasMorpheusDetails = HpeglFunctions.getVmaasMorpheusDetails();
    }
}
resources:
  # (C) Copyright 2024 Hewlett Packard Enterprise Development LP
  # Location 1
  location1:
    type: pulumi:providers:hpegl
    properties:
      vmaas:
        location: ${var.location_1}
        spaceName: ${var.space_1}
  # Location 2
  location2:
    type: pulumi:providers:hpegl
    properties:
      vmaas:
        location: ${var.location_2}
        spaceName: ${var.space_2}
variables:
  location1VmaasMorpheusDetails:
    fn::invoke:
      function: hpegl:getVmaasMorpheusDetails
      arguments: {}
  location2VmaasMorpheusDetails:
    fn::invoke:
      function: hpegl:getVmaasMorpheusDetails
      arguments: {}
Note that multiple hpegl provider stanzas along with provider aliasing should be used in the case where there are multiple VMaaS locations and/or space-names
Using getVmaasMorpheusDetails
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 getVmaasMorpheusDetails(args: GetVmaasMorpheusDetailsArgs, opts?: InvokeOptions): Promise<GetVmaasMorpheusDetailsResult>
function getVmaasMorpheusDetailsOutput(args: GetVmaasMorpheusDetailsOutputArgs, opts?: InvokeOptions): Output<GetVmaasMorpheusDetailsResult>def get_vmaas_morpheus_details(id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetVmaasMorpheusDetailsResult
def get_vmaas_morpheus_details_output(id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetVmaasMorpheusDetailsResult]func GetVmaasMorpheusDetails(ctx *Context, args *GetVmaasMorpheusDetailsArgs, opts ...InvokeOption) (*GetVmaasMorpheusDetailsResult, error)
func GetVmaasMorpheusDetailsOutput(ctx *Context, args *GetVmaasMorpheusDetailsOutputArgs, opts ...InvokeOption) GetVmaasMorpheusDetailsResultOutput> Note: This function is named GetVmaasMorpheusDetails in the Go SDK.
public static class GetVmaasMorpheusDetails 
{
    public static Task<GetVmaasMorpheusDetailsResult> InvokeAsync(GetVmaasMorpheusDetailsArgs args, InvokeOptions? opts = null)
    public static Output<GetVmaasMorpheusDetailsResult> Invoke(GetVmaasMorpheusDetailsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVmaasMorpheusDetailsResult> getVmaasMorpheusDetails(GetVmaasMorpheusDetailsArgs args, InvokeOptions options)
public static Output<GetVmaasMorpheusDetailsResult> getVmaasMorpheusDetails(GetVmaasMorpheusDetailsArgs args, InvokeOptions options)
fn::invoke:
  function: hpegl:index/getVmaasMorpheusDetails:getVmaasMorpheusDetails
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- The ID of this resource.
- Id string
- The ID of this resource.
- id String
- The ID of this resource.
- id string
- The ID of this resource.
- id str
- The ID of this resource.
- id String
- The ID of this resource.
getVmaasMorpheusDetails Result
The following output properties are available:
- AccessToken string
- Morpheus access_token
- Id string
- The ID of this resource.
- Url string
- Morpheus URL
- ValidTill string
- time until the token expires, in seconds
- AccessToken string
- Morpheus access_token
- Id string
- The ID of this resource.
- Url string
- Morpheus URL
- ValidTill string
- time until the token expires, in seconds
- accessToken String
- Morpheus access_token
- id String
- The ID of this resource.
- url String
- Morpheus URL
- validTill String
- time until the token expires, in seconds
- accessToken string
- Morpheus access_token
- id string
- The ID of this resource.
- url string
- Morpheus URL
- validTill string
- time until the token expires, in seconds
- access_token str
- Morpheus access_token
- id str
- The ID of this resource.
- url str
- Morpheus URL
- valid_till str
- time until the token expires, in seconds
- accessToken String
- Morpheus access_token
- id String
- The ID of this resource.
- url String
- Morpheus URL
- validTill String
- time until the token expires, in seconds
Package Details
- Repository
- hpegl hpe/terraform-provider-hpegl
- License
- Notes
- This Pulumi package is based on the hpeglTerraform Provider.