1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudKeyManagerSecret
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Use this data source to get information about a single secret in the Barbican Key Manager service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const secret = ovh.getCloudKeyManagerSecret({
        serviceName: "Public cloud project ID",
        secretId: "00000000-0000-0000-0000-000000000000",
    });
    export const secretName = secret.then(secret => secret.name);
    
    import pulumi
    import pulumi_ovh as ovh
    
    secret = ovh.get_cloud_key_manager_secret(service_name="Public cloud project ID",
        secret_id="00000000-0000-0000-0000-000000000000")
    pulumi.export("secretName", secret.name)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		secret, err := ovh.LookupCloudKeyManagerSecret(ctx, &ovh.LookupCloudKeyManagerSecretArgs{
    			ServiceName: "Public cloud project ID",
    			SecretId:    "00000000-0000-0000-0000-000000000000",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("secretName", secret.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var secret = Ovh.GetCloudKeyManagerSecret.Invoke(new()
        {
            ServiceName = "Public cloud project ID",
            SecretId = "00000000-0000-0000-0000-000000000000",
        });
    
        return new Dictionary<string, object?>
        {
            ["secretName"] = secret.Apply(getCloudKeyManagerSecretResult => getCloudKeyManagerSecretResult.Name),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudKeyManagerSecretArgs;
    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 secret = OvhFunctions.getCloudKeyManagerSecret(GetCloudKeyManagerSecretArgs.builder()
                .serviceName("Public cloud project ID")
                .secretId("00000000-0000-0000-0000-000000000000")
                .build());
    
            ctx.export("secretName", secret.name());
        }
    }
    
    variables:
      secret:
        fn::invoke:
          function: ovh:getCloudKeyManagerSecret
          arguments:
            serviceName: Public cloud project ID
            secretId: 00000000-0000-0000-0000-000000000000
    outputs:
      secretName: ${secret.name}
    
    Example coming soon!
    

    Using getCloudKeyManagerSecret

    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 getCloudKeyManagerSecret(args: GetCloudKeyManagerSecretArgs, opts?: InvokeOptions): Promise<GetCloudKeyManagerSecretResult>
    function getCloudKeyManagerSecretOutput(args: GetCloudKeyManagerSecretOutputArgs, opts?: InvokeOptions): Output<GetCloudKeyManagerSecretResult>
    def get_cloud_key_manager_secret(secret_id: Optional[str] = None,
                                     service_name: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetCloudKeyManagerSecretResult
    def get_cloud_key_manager_secret_output(secret_id: pulumi.Input[Optional[str]] = None,
                                     service_name: pulumi.Input[Optional[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetCloudKeyManagerSecretResult]
    func LookupCloudKeyManagerSecret(ctx *Context, args *LookupCloudKeyManagerSecretArgs, opts ...InvokeOption) (*LookupCloudKeyManagerSecretResult, error)
    func LookupCloudKeyManagerSecretOutput(ctx *Context, args *LookupCloudKeyManagerSecretOutputArgs, opts ...InvokeOption) LookupCloudKeyManagerSecretResultOutput

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

    public static class GetCloudKeyManagerSecret 
    {
        public static Task<GetCloudKeyManagerSecretResult> InvokeAsync(GetCloudKeyManagerSecretArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudKeyManagerSecretResult> Invoke(GetCloudKeyManagerSecretInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudKeyManagerSecretResult> getCloudKeyManagerSecret(GetCloudKeyManagerSecretArgs args, InvokeOptions options)
    public static Output<GetCloudKeyManagerSecretResult> getCloudKeyManagerSecret(GetCloudKeyManagerSecretArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudKeyManagerSecret:getCloudKeyManagerSecret
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_key_manager_secret" "name" {
        # arguments
    }

    The following arguments are supported:

    SecretId string
    ID of the secret.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    SecretId string
    ID of the secret.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    secret_id string
    ID of the secret.
    service_name string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    secretId String
    ID of the secret.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    secretId string
    ID of the secret.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    secret_id str
    ID of the secret.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    secretId String
    ID of the secret.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getCloudKeyManagerSecret Result

    The following output properties are available:

    Checksum string
    Computed hash representing the current resource state.
    CreatedAt string
    Creation date of the secret.
    CurrentState GetCloudKeyManagerSecretCurrentState
    Current state of the secret as reported by OpenStack Barbican:
    Id string
    ID of the secret.
    Location GetCloudKeyManagerSecretLocation
    Location of the secret:
    Metadata Dictionary<string, string>
    Key-value metadata.
    Name string
    Name of the secret.
    ResourceStatus string
    Secret readiness status.
    SecretId string
    SecretType string
    Type of the secret.
    ServiceName string
    UpdatedAt string
    Last update date of the secret.
    Checksum string
    Computed hash representing the current resource state.
    CreatedAt string
    Creation date of the secret.
    CurrentState GetCloudKeyManagerSecretCurrentState
    Current state of the secret as reported by OpenStack Barbican:
    Id string
    ID of the secret.
    Location GetCloudKeyManagerSecretLocation
    Location of the secret:
    Metadata map[string]string
    Key-value metadata.
    Name string
    Name of the secret.
    ResourceStatus string
    Secret readiness status.
    SecretId string
    SecretType string
    Type of the secret.
    ServiceName string
    UpdatedAt string
    Last update date of the secret.
    checksum string
    Computed hash representing the current resource state.
    created_at string
    Creation date of the secret.
    current_state object
    Current state of the secret as reported by OpenStack Barbican:
    id string
    ID of the secret.
    location object
    Location of the secret:
    metadata map(string)
    Key-value metadata.
    name string
    Name of the secret.
    resource_status string
    Secret readiness status.
    secret_id string
    secret_type string
    Type of the secret.
    service_name string
    updated_at string
    Last update date of the secret.
    checksum String
    Computed hash representing the current resource state.
    createdAt String
    Creation date of the secret.
    currentState GetCloudKeyManagerSecretCurrentState
    Current state of the secret as reported by OpenStack Barbican:
    id String
    ID of the secret.
    location GetCloudKeyManagerSecretLocation
    Location of the secret:
    metadata Map<String,String>
    Key-value metadata.
    name String
    Name of the secret.
    resourceStatus String
    Secret readiness status.
    secretId String
    secretType String
    Type of the secret.
    serviceName String
    updatedAt String
    Last update date of the secret.
    checksum string
    Computed hash representing the current resource state.
    createdAt string
    Creation date of the secret.
    currentState GetCloudKeyManagerSecretCurrentState
    Current state of the secret as reported by OpenStack Barbican:
    id string
    ID of the secret.
    location GetCloudKeyManagerSecretLocation
    Location of the secret:
    metadata {[key: string]: string}
    Key-value metadata.
    name string
    Name of the secret.
    resourceStatus string
    Secret readiness status.
    secretId string
    secretType string
    Type of the secret.
    serviceName string
    updatedAt string
    Last update date of the secret.
    checksum str
    Computed hash representing the current resource state.
    created_at str
    Creation date of the secret.
    current_state GetCloudKeyManagerSecretCurrentState
    Current state of the secret as reported by OpenStack Barbican:
    id str
    ID of the secret.
    location GetCloudKeyManagerSecretLocation
    Location of the secret:
    metadata Mapping[str, str]
    Key-value metadata.
    name str
    Name of the secret.
    resource_status str
    Secret readiness status.
    secret_id str
    secret_type str
    Type of the secret.
    service_name str
    updated_at str
    Last update date of the secret.
    checksum String
    Computed hash representing the current resource state.
    createdAt String
    Creation date of the secret.
    currentState Property Map
    Current state of the secret as reported by OpenStack Barbican:
    id String
    ID of the secret.
    location Property Map
    Location of the secret:
    metadata Map<String>
    Key-value metadata.
    name String
    Name of the secret.
    resourceStatus String
    Secret readiness status.
    secretId String
    secretType String
    Type of the secret.
    serviceName String
    updatedAt String
    Last update date of the secret.

    Supporting Types

    GetCloudKeyManagerSecretCurrentState

    Algorithm string
    Algorithm of the secret.
    BitLength int
    Bit length of the secret.
    Expiration string
    Expiration date.
    Location GetCloudKeyManagerSecretCurrentStateLocation
    Location of the secret:
    Metadata Dictionary<string, string>
    Key-value metadata.
    Mode string
    Mode of the secret algorithm.
    Name string
    Name of the secret.
    PayloadContentType string
    Content type of the payload.
    SecretRef string
    OpenStack reference URL.
    SecretType string
    Type of the secret.
    Status string
    Status of the secret.
    Algorithm string
    Algorithm of the secret.
    BitLength int
    Bit length of the secret.
    Expiration string
    Expiration date.
    Location GetCloudKeyManagerSecretCurrentStateLocation
    Location of the secret:
    Metadata map[string]string
    Key-value metadata.
    Mode string
    Mode of the secret algorithm.
    Name string
    Name of the secret.
    PayloadContentType string
    Content type of the payload.
    SecretRef string
    OpenStack reference URL.
    SecretType string
    Type of the secret.
    Status string
    Status of the secret.
    algorithm string
    Algorithm of the secret.
    bit_length number
    Bit length of the secret.
    expiration string
    Expiration date.
    location object
    Location of the secret:
    metadata map(string)
    Key-value metadata.
    mode string
    Mode of the secret algorithm.
    name string
    Name of the secret.
    payload_content_type string
    Content type of the payload.
    secret_ref string
    OpenStack reference URL.
    secret_type string
    Type of the secret.
    status string
    Status of the secret.
    algorithm String
    Algorithm of the secret.
    bitLength Integer
    Bit length of the secret.
    expiration String
    Expiration date.
    location GetCloudKeyManagerSecretCurrentStateLocation
    Location of the secret:
    metadata Map<String,String>
    Key-value metadata.
    mode String
    Mode of the secret algorithm.
    name String
    Name of the secret.
    payloadContentType String
    Content type of the payload.
    secretRef String
    OpenStack reference URL.
    secretType String
    Type of the secret.
    status String
    Status of the secret.
    algorithm string
    Algorithm of the secret.
    bitLength number
    Bit length of the secret.
    expiration string
    Expiration date.
    location GetCloudKeyManagerSecretCurrentStateLocation
    Location of the secret:
    metadata {[key: string]: string}
    Key-value metadata.
    mode string
    Mode of the secret algorithm.
    name string
    Name of the secret.
    payloadContentType string
    Content type of the payload.
    secretRef string
    OpenStack reference URL.
    secretType string
    Type of the secret.
    status string
    Status of the secret.
    algorithm str
    Algorithm of the secret.
    bit_length int
    Bit length of the secret.
    expiration str
    Expiration date.
    location GetCloudKeyManagerSecretCurrentStateLocation
    Location of the secret:
    metadata Mapping[str, str]
    Key-value metadata.
    mode str
    Mode of the secret algorithm.
    name str
    Name of the secret.
    payload_content_type str
    Content type of the payload.
    secret_ref str
    OpenStack reference URL.
    secret_type str
    Type of the secret.
    status str
    Status of the secret.
    algorithm String
    Algorithm of the secret.
    bitLength Number
    Bit length of the secret.
    expiration String
    Expiration date.
    location Property Map
    Location of the secret:
    metadata Map<String>
    Key-value metadata.
    mode String
    Mode of the secret algorithm.
    name String
    Name of the secret.
    payloadContentType String
    Content type of the payload.
    secretRef String
    OpenStack reference URL.
    secretType String
    Type of the secret.
    status String
    Status of the secret.

    GetCloudKeyManagerSecretCurrentStateLocation

    AvailabilityZone string
    Availability zone of the secret.
    Region string
    Region of the secret.
    AvailabilityZone string
    Availability zone of the secret.
    Region string
    Region of the secret.
    availability_zone string
    Availability zone of the secret.
    region string
    Region of the secret.
    availabilityZone String
    Availability zone of the secret.
    region String
    Region of the secret.
    availabilityZone string
    Availability zone of the secret.
    region string
    Region of the secret.
    availability_zone str
    Availability zone of the secret.
    region str
    Region of the secret.
    availabilityZone String
    Availability zone of the secret.
    region String
    Region of the secret.

    GetCloudKeyManagerSecretLocation

    AvailabilityZone string
    Availability zone of the secret.
    Region string
    Region of the secret.
    AvailabilityZone string
    Availability zone of the secret.
    Region string
    Region of the secret.
    availability_zone string
    Availability zone of the secret.
    region string
    Region of the secret.
    availabilityZone String
    Availability zone of the secret.
    region String
    Region of the secret.
    availabilityZone string
    Availability zone of the secret.
    region string
    Region of the secret.
    availability_zone str
    Availability zone of the secret.
    region str
    Region of the secret.
    availabilityZone String
    Availability zone of the secret.
    region String
    Region of the secret.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial