Example Usage
Get the latest secret version (metadata only):
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const latest = ovh.getOkmsSecret({
okmsId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
path: "app/api_credentials",
});
import pulumi
import pulumi_ovh as ovh
latest = ovh.get_okms_secret(okms_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
path="app/api_credentials")
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 {
_, err := ovh.GetOkmsSecret(ctx, &ovh.GetOkmsSecretArgs{
OkmsId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Path: "app/api_credentials",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var latest = Ovh.GetOkmsSecret.Invoke(new()
{
OkmsId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Path = "app/api_credentials",
});
});
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.GetOkmsSecretArgs;
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 latest = OvhFunctions.getOkmsSecret(GetOkmsSecretArgs.builder()
.okmsId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.path("app/api_credentials")
.build());
}
}
variables:
latest:
fn::invoke:
function: ovh:getOkmsSecret
arguments:
okmsId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
path: app/api_credentials
Get the latest secret version including its data:
Using getOkmsSecret
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 getOkmsSecret(args: GetOkmsSecretArgs, opts?: InvokeOptions): Promise<GetOkmsSecretResult>
function getOkmsSecretOutput(args: GetOkmsSecretOutputArgs, opts?: InvokeOptions): Output<GetOkmsSecretResult>def get_okms_secret(include_data: Optional[bool] = None,
okms_id: Optional[str] = None,
path: Optional[str] = None,
version: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetOkmsSecretResult
def get_okms_secret_output(include_data: Optional[pulumi.Input[bool]] = None,
okms_id: Optional[pulumi.Input[str]] = None,
path: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOkmsSecretResult]func GetOkmsSecret(ctx *Context, args *GetOkmsSecretArgs, opts ...InvokeOption) (*GetOkmsSecretResult, error)
func GetOkmsSecretOutput(ctx *Context, args *GetOkmsSecretOutputArgs, opts ...InvokeOption) GetOkmsSecretResultOutput> Note: This function is named GetOkmsSecret in the Go SDK.
public static class GetOkmsSecret
{
public static Task<GetOkmsSecretResult> InvokeAsync(GetOkmsSecretArgs args, InvokeOptions? opts = null)
public static Output<GetOkmsSecretResult> Invoke(GetOkmsSecretInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetOkmsSecretResult> getOkmsSecret(GetOkmsSecretArgs args, InvokeOptions options)
public static Output<GetOkmsSecretResult> getOkmsSecret(GetOkmsSecretArgs args, InvokeOptions options)
fn::invoke:
function: ovh:index/getOkmsSecret:getOkmsSecret
arguments:
# arguments dictionaryThe following arguments are supported:
- Okms
Id string - Path string
- Include
Data bool - Version double
- Okms
Id string - Path string
- Include
Data bool - Version float64
- okms
Id String - path String
- include
Data Boolean - version Double
- okms
Id string - path string
- include
Data boolean - version number
- okms_
id str - path str
- include_
data bool - version float
- okms
Id String - path String
- include
Data Boolean - version Number
getOkmsSecret Result
The following output properties are available:
- Data string
- Iam
Get
Okms Secret Iam - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata
Get
Okms Secret Metadata - Okms
Id string - Path string
- Version double
- Include
Data bool
- Data string
- Iam
Get
Okms Secret Iam - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata
Get
Okms Secret Metadata - Okms
Id string - Path string
- Version float64
- Include
Data bool
- data String
- iam
Get
Okms Secret Iam - id String
- The provider-assigned unique ID for this managed resource.
- metadata
Get
Okms Secret Metadata - okms
Id String - path String
- version Double
- include
Data Boolean
- data string
- iam
Get
Okms Secret Iam - id string
- The provider-assigned unique ID for this managed resource.
- metadata
Get
Okms Secret Metadata - okms
Id string - path string
- version number
- include
Data boolean
- data str
- iam
Get
Okms Secret Iam - id str
- The provider-assigned unique ID for this managed resource.
- metadata
Get
Okms Secret Metadata - okms_
id str - path str
- version float
- include_
data bool
- data String
- iam Property Map
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Property Map
- okms
Id String - path String
- version Number
- include
Data Boolean
Supporting Types
GetOkmsSecretIam
- Display
Name string - Resource display name
- Id string
- Unique identifier of the resource
- Dictionary<string, string>
- Resource tags. Tags that were internally computed are prefixed with ovh:
- Urn string
- Unique resource name used in policies
- Display
Name string - Resource display name
- Id string
- Unique identifier of the resource
- map[string]string
- Resource tags. Tags that were internally computed are prefixed with ovh:
- Urn string
- Unique resource name used in policies
- display
Name String - Resource display name
- id String
- Unique identifier of the resource
- Map<String,String>
- Resource tags. Tags that were internally computed are prefixed with ovh:
- urn String
- Unique resource name used in policies
- display
Name string - Resource display name
- id string
- Unique identifier of the resource
- {[key: string]: string}
- Resource tags. Tags that were internally computed are prefixed with ovh:
- urn string
- Unique resource name used in policies
- display_
name str - Resource display name
- id str
- Unique identifier of the resource
- Mapping[str, str]
- Resource tags. Tags that were internally computed are prefixed with ovh:
- urn str
- Unique resource name used in policies
- display
Name String - Resource display name
- id String
- Unique identifier of the resource
- Map<String>
- Resource tags. Tags that were internally computed are prefixed with ovh:
- urn String
- Unique resource name used in policies
GetOkmsSecretMetadata
- Cas
Required bool - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- Created
At string - Time of creation of the secret
- Current
Version double - The secret version
- Custom
Metadata Dictionary<string, string> - Custom metadata
- Deactivate
Version stringAfter - Time duration before a version is deactivated
- Max
Versions double - The number of versions to keep (10 default)
- Oldest
Version double - The secret oldest version
- Updated
At string - Time of the last update of the secret
- Cas
Required bool - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- Created
At string - Time of creation of the secret
- Current
Version float64 - The secret version
- Custom
Metadata map[string]string - Custom metadata
- Deactivate
Version stringAfter - Time duration before a version is deactivated
- Max
Versions float64 - The number of versions to keep (10 default)
- Oldest
Version float64 - The secret oldest version
- Updated
At string - Time of the last update of the secret
- cas
Required Boolean - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- created
At String - Time of creation of the secret
- current
Version Double - The secret version
- custom
Metadata Map<String,String> - Custom metadata
- deactivate
Version StringAfter - Time duration before a version is deactivated
- max
Versions Double - The number of versions to keep (10 default)
- oldest
Version Double - The secret oldest version
- updated
At String - Time of the last update of the secret
- cas
Required boolean - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- created
At string - Time of creation of the secret
- current
Version number - The secret version
- custom
Metadata {[key: string]: string} - Custom metadata
- deactivate
Version stringAfter - Time duration before a version is deactivated
- max
Versions number - The number of versions to keep (10 default)
- oldest
Version number - The secret oldest version
- updated
At string - Time of the last update of the secret
- cas_
required bool - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- created_
at str - Time of creation of the secret
- current_
version float - The secret version
- custom_
metadata Mapping[str, str] - Custom metadata
- deactivate_
version_ strafter - Time duration before a version is deactivated
- max_
versions float - The number of versions to keep (10 default)
- oldest_
version float - The secret oldest version
- updated_
at str - Time of the last update of the secret
- cas
Required Boolean - The “Cas” parameter will be required for each write request if set to true. When the “cas” (Check and set) is specified, the current version of the secret is verified before updating it.
- created
At String - Time of creation of the secret
- current
Version Number - The secret version
- custom
Metadata Map<String> - Custom metadata
- deactivate
Version StringAfter - Time duration before a version is deactivated
- max
Versions Number - The number of versions to keep (10 default)
- oldest
Version Number - The secret oldest version
- updated
At String - Time of the last update of the secret
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
