diff --git a/sdk/dotnet/AD/GetAccessCredentials.cs b/sdk/dotnet/AD/GetAccessCredentials.cs index 10eec5218..f31775e33 100644 --- a/sdk/dotnet/AD/GetAccessCredentials.cs +++ b/sdk/dotnet/AD/GetAccessCredentials.cs @@ -22,6 +22,12 @@ public static Task InvokeAsync(GetAccessCredentialsA /// public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:ad/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:ad/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/AppRole/GetAuthBackendRoleId.cs b/sdk/dotnet/AppRole/GetAuthBackendRoleId.cs index 6d679e38b..261e5f601 100644 --- a/sdk/dotnet/AppRole/GetAuthBackendRoleId.cs +++ b/sdk/dotnet/AppRole/GetAuthBackendRoleId.cs @@ -68,6 +68,35 @@ public static Task InvokeAsync(GetAuthBackendRoleIdA /// public static Output Invoke(GetAuthBackendRoleIdInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", args ?? new GetAuthBackendRoleIdInvokeArgs(), options.WithDefaults()); + + /// + /// Reads the Role ID of an AppRole from a Vault server. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var role = Vault.AppRole.GetAuthBackendRoleId.Invoke(new() + /// { + /// Backend = "my-approle-backend", + /// RoleName = "my-role", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["role-id"] = role.Apply(getAuthBackendRoleIdResult => getAuthBackendRoleIdResult.RoleId), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(GetAuthBackendRoleIdInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", args ?? new GetAuthBackendRoleIdInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Aws/GetAccessCredentials.cs b/sdk/dotnet/Aws/GetAccessCredentials.cs index d23eccd1c..3fe727fe4 100644 --- a/sdk/dotnet/Aws/GetAccessCredentials.cs +++ b/sdk/dotnet/Aws/GetAccessCredentials.cs @@ -22,6 +22,12 @@ public static Task InvokeAsync(GetAccessCredentialsA /// public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:aws/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:aws/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Aws/GetStaticAccessCredentials.cs b/sdk/dotnet/Aws/GetStaticAccessCredentials.cs index c63973d96..fcf725274 100644 --- a/sdk/dotnet/Aws/GetStaticAccessCredentials.cs +++ b/sdk/dotnet/Aws/GetStaticAccessCredentials.cs @@ -16,6 +16,9 @@ public static Task InvokeAsync(GetStaticAccess public static Output Invoke(GetStaticAccessCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", args ?? new GetStaticAccessCredentialsInvokeArgs(), options.WithDefaults()); + + public static Output Invoke(GetStaticAccessCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", args ?? new GetStaticAccessCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Azure/GetAccessCredentials.cs b/sdk/dotnet/Azure/GetAccessCredentials.cs index f58bc4820..2d0f6dfbc 100644 --- a/sdk/dotnet/Azure/GetAccessCredentials.cs +++ b/sdk/dotnet/Azure/GetAccessCredentials.cs @@ -74,6 +74,38 @@ public static Task InvokeAsync(GetAccessCredentialsA /// public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:azure/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var creds = Vault.Azure.GetAccessCredentials.Invoke(new() + /// { + /// Role = "my-role", + /// ValidateCreds = true, + /// NumSequentialSuccesses = 8, + /// NumSecondsBetweenTests = 1, + /// MaxCredValidationSeconds = 300, + /// }); + /// + /// }); + /// ``` + /// + /// ## Caveats + /// + /// The `validate_creds` option requires read-access to the `backend` config endpoint. + /// If the effective Vault role does not have the required permissions then valid values + /// are required to be set for: `subscription_id`, `tenant_id`, `environment`. + /// + public static Output Invoke(GetAccessCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:azure/getAccessCredentials:getAccessCredentials", args ?? new GetAccessCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Gcp/GetAuthBackendRole.cs b/sdk/dotnet/Gcp/GetAuthBackendRole.cs index 01d276c78..3347de876 100644 --- a/sdk/dotnet/Gcp/GetAuthBackendRole.cs +++ b/sdk/dotnet/Gcp/GetAuthBackendRole.cs @@ -68,6 +68,35 @@ public static Task InvokeAsync(GetAuthBackendRoleArgs /// public static Output Invoke(GetAuthBackendRoleInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:gcp/getAuthBackendRole:getAuthBackendRole", args ?? new GetAuthBackendRoleInvokeArgs(), options.WithDefaults()); + + /// + /// Reads a GCP auth role from a Vault server. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var role = Vault.Gcp.GetAuthBackendRole.Invoke(new() + /// { + /// Backend = "my-gcp-backend", + /// RoleName = "my-role", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["role-id"] = role.Apply(getAuthBackendRoleResult => getAuthBackendRoleResult.RoleId), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(GetAuthBackendRoleInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:gcp/getAuthBackendRole:getAuthBackendRole", args ?? new GetAuthBackendRoleInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Generic/GetSecret.cs b/sdk/dotnet/Generic/GetSecret.cs index a6ee9b94c..50c86cc1f 100644 --- a/sdk/dotnet/Generic/GetSecret.cs +++ b/sdk/dotnet/Generic/GetSecret.cs @@ -122,6 +122,62 @@ public static Task InvokeAsync(GetSecretArgs args, InvokeOption /// public static Output Invoke(GetSecretInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:generic/getSecret:getSecret", args ?? new GetSecretInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ### Generic secret + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var rundeckAuth = Vault.Generic.GetSecret.Invoke(new() + /// { + /// Path = "secret/rundeck_auth", + /// }); + /// + /// }); + /// ``` + /// + /// ### KV + /// + /// For this example, consider `example` as a path for a KV engine. + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// + /// object NotImplemented(string errorMessage) + /// { + /// throw new System.NotImplementedException(errorMessage); + /// } + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleCreds = Vault.Generic.GetSecret.Invoke(new() + /// { + /// Path = "example/creds", + /// }); + /// + /// var exampleTemplate = NotImplemented("The template_file data resource is not yet supported."); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:generic/getSecret:getSecret", args ?? new GetSecretInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetAuthBackend.cs b/sdk/dotnet/GetAuthBackend.cs index 1acb9df3b..da401bfa9 100644 --- a/sdk/dotnet/GetAuthBackend.cs +++ b/sdk/dotnet/GetAuthBackend.cs @@ -54,6 +54,28 @@ public static Task InvokeAsync(GetAuthBackendArgs args, In /// public static Output Invoke(GetAuthBackendInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getAuthBackend:getAuthBackend", args ?? new GetAuthBackendInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Vault.GetAuthBackend.Invoke(new() + /// { + /// Path = "userpass", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetAuthBackendInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getAuthBackend:getAuthBackend", args ?? new GetAuthBackendInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetAuthBackends.cs b/sdk/dotnet/GetAuthBackends.cs index 21504a7d2..2958778d5 100644 --- a/sdk/dotnet/GetAuthBackends.cs +++ b/sdk/dotnet/GetAuthBackends.cs @@ -80,6 +80,41 @@ public static Task InvokeAsync(GetAuthBackendsArgs? args /// public static Output Invoke(GetAuthBackendsInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getAuthBackends:getAuthBackends", args ?? new GetAuthBackendsInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Vault.GetAuthBackends.Invoke(); + /// + /// }); + /// ``` + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example_filter = Vault.GetAuthBackends.Invoke(new() + /// { + /// Type = "kubernetes", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetAuthBackendsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getAuthBackends:getAuthBackends", args ?? new GetAuthBackendsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetNamespace.cs b/sdk/dotnet/GetNamespace.cs index 60f1ddce0..46a3b030a 100644 --- a/sdk/dotnet/GetNamespace.cs +++ b/sdk/dotnet/GetNamespace.cs @@ -136,6 +136,69 @@ public static Task InvokeAsync(GetNamespaceArgs? args = null /// public static Output Invoke(GetNamespaceInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNamespace:getNamespace", args ?? new GetNamespaceInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ### Current namespace + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var current = Vault.GetNamespace.Invoke(); + /// + /// }); + /// ``` + /// + /// ### Single namespace + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var ns1 = Vault.GetNamespace.Invoke(new() + /// { + /// Path = "ns1", + /// }); + /// + /// }); + /// ``` + /// + /// ### Nested namespace + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var child = Vault.GetNamespace.Invoke(new() + /// { + /// Namespace = "parent", + /// Path = "child", + /// }); + /// + /// var fullPath = child.Apply(getNamespaceResult => getNamespaceResult.Id); + /// + /// // -> foo/parent/child/ + /// var pathFq = child.Apply(getNamespaceResult => getNamespaceResult.PathFq); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetNamespaceInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNamespace:getNamespace", args ?? new GetNamespaceInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetNamespaces.cs b/sdk/dotnet/GetNamespaces.cs index 480ce75bd..e63806c8e 100644 --- a/sdk/dotnet/GetNamespaces.cs +++ b/sdk/dotnet/GetNamespaces.cs @@ -116,6 +116,59 @@ public static Task InvokeAsync(GetNamespacesArgs? args = nu /// public static Output Invoke(GetNamespacesInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNamespaces:getNamespaces", args ?? new GetNamespacesInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ### Child namespaces + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var children = Vault.GetNamespaces.Invoke(); + /// + /// }); + /// ``` + /// + /// ### Nested namespace + /// + /// To fetch the details of nested namespaces: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var children = Vault.GetNamespaces.Invoke(new() + /// { + /// Namespace = "parent", + /// }); + /// + /// var child = .ToDictionary(item => { + /// var __key = item.Key; + /// return __key; + /// }, item => { + /// var __key = item.Key; + /// return Vault.GetNamespace.Invoke(new() + /// { + /// Namespace = _arg0_.Namespace, + /// Path = __key, + /// }); + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetNamespacesInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNamespaces:getNamespaces", args ?? new GetNamespacesInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetNomadAccessToken.cs b/sdk/dotnet/GetNomadAccessToken.cs index a3bfc2fcb..97e90edfb 100644 --- a/sdk/dotnet/GetNomadAccessToken.cs +++ b/sdk/dotnet/GetNomadAccessToken.cs @@ -98,6 +98,50 @@ public static Task InvokeAsync(GetNomadAccessTokenArg /// public static Output Invoke(GetNomadAccessTokenInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNomadAccessToken:getNomadAccessToken", args ?? new GetNomadAccessTokenInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Vault.NomadSecretBackend("config", new() + /// { + /// Backend = "nomad", + /// Description = "test description", + /// DefaultLeaseTtlSeconds = 3600, + /// MaxLeaseTtlSeconds = 7200, + /// Address = "https://127.0.0.1:4646", + /// Token = "ae20ceaa-...", + /// }); + /// + /// var test = new Vault.NomadSecretRole("test", new() + /// { + /// Backend = config.Backend, + /// Role = "test", + /// Type = "client", + /// Policies = new[] + /// { + /// "readonly", + /// }, + /// }); + /// + /// var token = Vault.GetNomadAccessToken.Invoke(new() + /// { + /// Backend = config.Backend, + /// Role = test.Role, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetNomadAccessTokenInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getNomadAccessToken:getNomadAccessToken", args ?? new GetNomadAccessTokenInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetPolicyDocument.cs b/sdk/dotnet/GetPolicyDocument.cs index 438324a14..d123764e3 100644 --- a/sdk/dotnet/GetPolicyDocument.cs +++ b/sdk/dotnet/GetPolicyDocument.cs @@ -100,6 +100,51 @@ public static Task InvokeAsync(GetPolicyDocumentArgs? a /// public static Output Invoke(GetPolicyDocumentInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getPolicyDocument:getPolicyDocument", args ?? new GetPolicyDocumentInvokeArgs(), options.WithDefaults()); + + /// + /// This is a data source which can be used to construct a HCL representation of an Vault policy document, for use with resources which expect policy documents, such as the `vault.Policy` resource. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = Vault.GetPolicyDocument.Invoke(new() + /// { + /// Rules = new[] + /// { + /// new Vault.Inputs.GetPolicyDocumentRuleInputArgs + /// { + /// Path = "secret/*", + /// Capabilities = new[] + /// { + /// "create", + /// "read", + /// "update", + /// "delete", + /// "list", + /// }, + /// Description = "allow all on secrets", + /// }, + /// }, + /// }); + /// + /// var examplePolicy = new Vault.Policy("example", new() + /// { + /// Name = "example_policy", + /// PolicyContents = example.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Hcl), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetPolicyDocumentInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getPolicyDocument:getPolicyDocument", args ?? new GetPolicyDocumentInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetRaftAutopilotState.cs b/sdk/dotnet/GetRaftAutopilotState.cs index b8f184db0..236cc5416 100644 --- a/sdk/dotnet/GetRaftAutopilotState.cs +++ b/sdk/dotnet/GetRaftAutopilotState.cs @@ -56,6 +56,29 @@ public static Task InvokeAsync(GetRaftAutopilotStat /// public static Output Invoke(GetRaftAutopilotStateInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:index/getRaftAutopilotState:getRaftAutopilotState", args ?? new GetRaftAutopilotStateInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var main = Vault.GetRaftAutopilotState.Invoke(); + /// + /// return new Dictionary<string, object?> + /// { + /// ["failure-tolerance"] = main.Apply(getRaftAutopilotStateResult => getRaftAutopilotStateResult.FailureTolerance), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(GetRaftAutopilotStateInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:index/getRaftAutopilotState:getRaftAutopilotState", args ?? new GetRaftAutopilotStateInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Identity/GetEntity.cs b/sdk/dotnet/Identity/GetEntity.cs index 556415dd3..316111256 100644 --- a/sdk/dotnet/Identity/GetEntity.cs +++ b/sdk/dotnet/Identity/GetEntity.cs @@ -62,6 +62,32 @@ public static Task InvokeAsync(GetEntityArgs? args = null, Invo /// public static Output Invoke(GetEntityInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getEntity:getEntity", args ?? new GetEntityInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var entity = Vault.Identity.GetEntity.Invoke(new() + /// { + /// EntityName = "entity_12345", + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `update` capability on `/identity/lookup/entity`. + /// + public static Output Invoke(GetEntityInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getEntity:getEntity", args ?? new GetEntityInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Identity/GetGroup.cs b/sdk/dotnet/Identity/GetGroup.cs index 1f3fb9e4c..f59279174 100644 --- a/sdk/dotnet/Identity/GetGroup.cs +++ b/sdk/dotnet/Identity/GetGroup.cs @@ -62,6 +62,32 @@ public static Task InvokeAsync(GetGroupArgs? args = null, Invoke /// public static Output Invoke(GetGroupInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getGroup:getGroup", args ?? new GetGroupInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var @group = Vault.Identity.GetGroup.Invoke(new() + /// { + /// GroupName = "user", + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `create` capability on `/identity/lookup/group`. + /// + public static Output Invoke(GetGroupInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getGroup:getGroup", args ?? new GetGroupInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Identity/GetOidcClientCreds.cs b/sdk/dotnet/Identity/GetOidcClientCreds.cs index 71173a320..32ee17482 100644 --- a/sdk/dotnet/Identity/GetOidcClientCreds.cs +++ b/sdk/dotnet/Identity/GetOidcClientCreds.cs @@ -80,6 +80,41 @@ public static Task InvokeAsync(GetOidcClientCredsArgs /// public static Output Invoke(GetOidcClientCredsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcClientCreds:getOidcClientCreds", args ?? new GetOidcClientCredsInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var app = new Vault.Identity.OidcClient("app", new() + /// { + /// Name = "application", + /// RedirectUris = new[] + /// { + /// "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback", + /// "http://127.0.0.1:8251/callback", + /// "http://127.0.0.1:8080/callback", + /// }, + /// IdTokenTtl = 2400, + /// AccessTokenTtl = 7200, + /// }); + /// + /// var creds = Vault.Identity.GetOidcClientCreds.Invoke(new() + /// { + /// Name = app.Name, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetOidcClientCredsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcClientCreds:getOidcClientCreds", args ?? new GetOidcClientCredsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Identity/GetOidcOpenidConfig.cs b/sdk/dotnet/Identity/GetOidcOpenidConfig.cs index e4e6404a1..c30e10852 100644 --- a/sdk/dotnet/Identity/GetOidcOpenidConfig.cs +++ b/sdk/dotnet/Identity/GetOidcOpenidConfig.cs @@ -122,6 +122,62 @@ public static Task InvokeAsync(GetOidcOpenidConfigArg /// public static Output Invoke(GetOidcOpenidConfigInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", args ?? new GetOidcOpenidConfigInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var key = new Vault.Identity.OidcKey("key", new() + /// { + /// Name = "key", + /// AllowedClientIds = new[] + /// { + /// "*", + /// }, + /// RotationPeriod = 3600, + /// VerificationTtl = 3600, + /// }); + /// + /// var app = new Vault.Identity.OidcClient("app", new() + /// { + /// Name = "application", + /// Key = key.Name, + /// RedirectUris = new[] + /// { + /// "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback", + /// "http://127.0.0.1:8251/callback", + /// "http://127.0.0.1:8080/callback", + /// }, + /// IdTokenTtl = 2400, + /// AccessTokenTtl = 7200, + /// }); + /// + /// var provider = new Vault.Identity.OidcProvider("provider", new() + /// { + /// Name = "provider", + /// AllowedClientIds = new[] + /// { + /// test.ClientId, + /// }, + /// }); + /// + /// var config = Vault.Identity.GetOidcOpenidConfig.Invoke(new() + /// { + /// Name = provider.Name, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetOidcOpenidConfigInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", args ?? new GetOidcOpenidConfigInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Identity/GetOidcPublicKeys.cs b/sdk/dotnet/Identity/GetOidcPublicKeys.cs index 7d27b4df9..798974174 100644 --- a/sdk/dotnet/Identity/GetOidcPublicKeys.cs +++ b/sdk/dotnet/Identity/GetOidcPublicKeys.cs @@ -122,6 +122,62 @@ public static Task InvokeAsync(GetOidcPublicKeysArgs ar /// public static Output Invoke(GetOidcPublicKeysInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcPublicKeys:getOidcPublicKeys", args ?? new GetOidcPublicKeysInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var key = new Vault.Identity.OidcKey("key", new() + /// { + /// Name = "key", + /// AllowedClientIds = new[] + /// { + /// "*", + /// }, + /// RotationPeriod = 3600, + /// VerificationTtl = 3600, + /// }); + /// + /// var app = new Vault.Identity.OidcClient("app", new() + /// { + /// Name = "application", + /// Key = key.Name, + /// RedirectUris = new[] + /// { + /// "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback", + /// "http://127.0.0.1:8251/callback", + /// "http://127.0.0.1:8080/callback", + /// }, + /// IdTokenTtl = 2400, + /// AccessTokenTtl = 7200, + /// }); + /// + /// var provider = new Vault.Identity.OidcProvider("provider", new() + /// { + /// Name = "provider", + /// AllowedClientIds = new[] + /// { + /// test.ClientId, + /// }, + /// }); + /// + /// var publicKeys = Vault.Identity.GetOidcPublicKeys.Invoke(new() + /// { + /// Name = provider.Name, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetOidcPublicKeysInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:identity/getOidcPublicKeys:getOidcPublicKeys", args ?? new GetOidcPublicKeysInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Kubernetes/GetAuthBackendConfig.cs b/sdk/dotnet/Kubernetes/GetAuthBackendConfig.cs index c21acce16..f75dcbd72 100644 --- a/sdk/dotnet/Kubernetes/GetAuthBackendConfig.cs +++ b/sdk/dotnet/Kubernetes/GetAuthBackendConfig.cs @@ -26,6 +26,14 @@ public static Task InvokeAsync(GetAuthBackendConfigA /// public static Output Invoke(GetAuthBackendConfigInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", args ?? new GetAuthBackendConfigInvokeArgs(), options.WithDefaults()); + + /// + /// Reads the Role of an Kubernetes from a Vault server. See the [Vault + /// documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-config) for more + /// information. + /// + public static Output Invoke(GetAuthBackendConfigInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", args ?? new GetAuthBackendConfigInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Kubernetes/GetAuthBackendRole.cs b/sdk/dotnet/Kubernetes/GetAuthBackendRole.cs index 3f5352a71..234643d10 100644 --- a/sdk/dotnet/Kubernetes/GetAuthBackendRole.cs +++ b/sdk/dotnet/Kubernetes/GetAuthBackendRole.cs @@ -26,6 +26,14 @@ public static Task InvokeAsync(GetAuthBackendRoleArgs /// public static Output Invoke(GetAuthBackendRoleInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", args ?? new GetAuthBackendRoleInvokeArgs(), options.WithDefaults()); + + /// + /// Reads the Role of an Kubernetes from a Vault server. See the [Vault + /// documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-role) for more + /// information. + /// + public static Output Invoke(GetAuthBackendRoleInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", args ?? new GetAuthBackendRoleInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Kubernetes/GetServiceAccountToken.cs b/sdk/dotnet/Kubernetes/GetServiceAccountToken.cs index f71b4b230..3d4275d5b 100644 --- a/sdk/dotnet/Kubernetes/GetServiceAccountToken.cs +++ b/sdk/dotnet/Kubernetes/GetServiceAccountToken.cs @@ -142,6 +142,72 @@ public static Task InvokeAsync(GetServiceAccountTo /// public static Output Invoke(GetServiceAccountTokenInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", args ?? new GetServiceAccountTokenInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Std = Pulumi.Std; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Vault.Kubernetes.SecretBackend("config", new() + /// { + /// Path = "kubernetes", + /// Description = "kubernetes secrets engine description", + /// KubernetesHost = "https://127.0.0.1:61233", + /// KubernetesCaCert = Std.File.Invoke(new() + /// { + /// Input = "/path/to/cert", + /// }).Apply(invoke => invoke.Result), + /// ServiceAccountJwt = Std.File.Invoke(new() + /// { + /// Input = "/path/to/token", + /// }).Apply(invoke => invoke.Result), + /// DisableLocalCaJwt = false, + /// }); + /// + /// var role = new Vault.Kubernetes.SecretBackendRole("role", new() + /// { + /// Backend = config.Path, + /// Name = "service-account-name-role", + /// AllowedKubernetesNamespaces = new[] + /// { + /// "*", + /// }, + /// TokenMaxTtl = 43200, + /// TokenDefaultTtl = 21600, + /// ServiceAccountName = "test-service-account-with-generated-token", + /// ExtraLabels = + /// { + /// { "id", "abc123" }, + /// { "name", "some_name" }, + /// }, + /// ExtraAnnotations = + /// { + /// { "env", "development" }, + /// { "location", "earth" }, + /// }, + /// }); + /// + /// var token = Vault.Kubernetes.GetServiceAccountToken.Invoke(new() + /// { + /// Backend = config.Path, + /// Role = role.Name, + /// KubernetesNamespace = "test", + /// ClusterRoleBinding = false, + /// Ttl = "1h", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetServiceAccountTokenInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", args ?? new GetServiceAccountTokenInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Ldap/GetDynamicCredentials.cs b/sdk/dotnet/Ldap/GetDynamicCredentials.cs index 22565abca..2b88f55e4 100644 --- a/sdk/dotnet/Ldap/GetDynamicCredentials.cs +++ b/sdk/dotnet/Ldap/GetDynamicCredentials.cs @@ -16,6 +16,9 @@ public static Task InvokeAsync(GetDynamicCredential public static Output Invoke(GetDynamicCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:ldap/getDynamicCredentials:getDynamicCredentials", args ?? new GetDynamicCredentialsInvokeArgs(), options.WithDefaults()); + + public static Output Invoke(GetDynamicCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:ldap/getDynamicCredentials:getDynamicCredentials", args ?? new GetDynamicCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Ldap/GetStaticCredentials.cs b/sdk/dotnet/Ldap/GetStaticCredentials.cs index 26ac1c507..e1ff8c95c 100644 --- a/sdk/dotnet/Ldap/GetStaticCredentials.cs +++ b/sdk/dotnet/Ldap/GetStaticCredentials.cs @@ -16,6 +16,9 @@ public static Task InvokeAsync(GetStaticCredentialsA public static Output Invoke(GetStaticCredentialsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:ldap/getStaticCredentials:getStaticCredentials", args ?? new GetStaticCredentialsInvokeArgs(), options.WithDefaults()); + + public static Output Invoke(GetStaticCredentialsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:ldap/getStaticCredentials:getStaticCredentials", args ?? new GetStaticCredentialsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/PkiSecret/GetBackendConfigEst.cs b/sdk/dotnet/PkiSecret/GetBackendConfigEst.cs index 3a5200a44..2c36c28a7 100644 --- a/sdk/dotnet/PkiSecret/GetBackendConfigEst.cs +++ b/sdk/dotnet/PkiSecret/GetBackendConfigEst.cs @@ -68,6 +68,35 @@ public static Task InvokeAsync(GetBackendConfigEstArg /// public static Output Invoke(GetBackendConfigEstInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", args ?? new GetBackendConfigEstInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pki = new Vault.Mount("pki", new() + /// { + /// Path = "pki", + /// Type = "pki", + /// Description = "PKI secret engine mount", + /// }); + /// + /// var estConfig = Vault.PkiSecret.GetBackendConfigEst.Invoke(new() + /// { + /// Backend = pki.Path, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetBackendConfigEstInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", args ?? new GetBackendConfigEstInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/PkiSecret/GetBackendIssuer.cs b/sdk/dotnet/PkiSecret/GetBackendIssuer.cs index 20e1b15fc..98c4d56bd 100644 --- a/sdk/dotnet/PkiSecret/GetBackendIssuer.cs +++ b/sdk/dotnet/PkiSecret/GetBackendIssuer.cs @@ -88,6 +88,45 @@ public static Task InvokeAsync(GetBackendIssuerArgs args /// public static Output Invoke(GetBackendIssuerInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendIssuer:getBackendIssuer", args ?? new GetBackendIssuerInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pki = new Vault.Mount("pki", new() + /// { + /// Path = "pki", + /// Type = "pki", + /// Description = "PKI secret engine mount", + /// }); + /// + /// var root = new Vault.PkiSecret.SecretBackendRootCert("root", new() + /// { + /// Backend = pki.Path, + /// Type = "internal", + /// CommonName = "example", + /// Ttl = "86400", + /// IssuerName = "example", + /// }); + /// + /// var example = Vault.PkiSecret.GetBackendIssuer.Invoke(new() + /// { + /// Backend = root.Path, + /// IssuerRef = root.IssuerId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetBackendIssuerInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendIssuer:getBackendIssuer", args ?? new GetBackendIssuerInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/PkiSecret/GetBackendIssuers.cs b/sdk/dotnet/PkiSecret/GetBackendIssuers.cs index 0e88e429b..bf2ba1288 100644 --- a/sdk/dotnet/PkiSecret/GetBackendIssuers.cs +++ b/sdk/dotnet/PkiSecret/GetBackendIssuers.cs @@ -86,6 +86,44 @@ public static Task InvokeAsync(GetBackendIssuersArgs ar /// public static Output Invoke(GetBackendIssuersInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendIssuers:getBackendIssuers", args ?? new GetBackendIssuersInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pki = new Vault.Mount("pki", new() + /// { + /// Path = "pki", + /// Type = "pki", + /// Description = "PKI secret engine mount", + /// }); + /// + /// var root = new Vault.PkiSecret.SecretBackendRootCert("root", new() + /// { + /// Backend = pki.Path, + /// Type = "internal", + /// CommonName = "example", + /// Ttl = "86400", + /// IssuerName = "example", + /// }); + /// + /// var test = Vault.PkiSecret.GetBackendIssuers.Invoke(new() + /// { + /// Backend = root.Backend, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetBackendIssuersInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendIssuers:getBackendIssuers", args ?? new GetBackendIssuersInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/PkiSecret/GetBackendKey.cs b/sdk/dotnet/PkiSecret/GetBackendKey.cs index 07ec4e771..8a94db9f2 100644 --- a/sdk/dotnet/PkiSecret/GetBackendKey.cs +++ b/sdk/dotnet/PkiSecret/GetBackendKey.cs @@ -88,6 +88,45 @@ public static Task InvokeAsync(GetBackendKeyArgs args, Invo /// public static Output Invoke(GetBackendKeyInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendKey:getBackendKey", args ?? new GetBackendKeyInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pki = new Vault.Mount("pki", new() + /// { + /// Path = "pki", + /// Type = "pki", + /// Description = "PKI secret engine mount", + /// }); + /// + /// var key = new Vault.PkiSecret.SecretBackendKey("key", new() + /// { + /// Backend = pki.Path, + /// Type = "internal", + /// KeyName = "example", + /// KeyType = "rsa", + /// KeyBits = 4096, + /// }); + /// + /// var example = Vault.PkiSecret.GetBackendKey.Invoke(new() + /// { + /// Backend = keyVaultMount.Path, + /// KeyRef = key.KeyId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetBackendKeyInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendKey:getBackendKey", args ?? new GetBackendKeyInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/PkiSecret/GetBackendKeys.cs b/sdk/dotnet/PkiSecret/GetBackendKeys.cs index 1d7edcb41..7c58e7560 100644 --- a/sdk/dotnet/PkiSecret/GetBackendKeys.cs +++ b/sdk/dotnet/PkiSecret/GetBackendKeys.cs @@ -86,6 +86,44 @@ public static Task InvokeAsync(GetBackendKeysArgs args, In /// public static Output Invoke(GetBackendKeysInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendKeys:getBackendKeys", args ?? new GetBackendKeysInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var pki = new Vault.Mount("pki", new() + /// { + /// Path = "pki", + /// Type = "pki", + /// Description = "PKI secret engine mount", + /// }); + /// + /// var root = new Vault.PkiSecret.SecretBackendRootCert("root", new() + /// { + /// Backend = pki.Path, + /// Type = "internal", + /// CommonName = "example", + /// Ttl = "86400", + /// KeyName = "example", + /// }); + /// + /// var example = Vault.PkiSecret.GetBackendKeys.Invoke(new() + /// { + /// Backend = root.Backend, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetBackendKeysInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:pkiSecret/getBackendKeys:getBackendKeys", args ?? new GetBackendKeysInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Transform/GetDecode.cs b/sdk/dotnet/Transform/GetDecode.cs index 878b7311a..4073c5fbb 100644 --- a/sdk/dotnet/Transform/GetDecode.cs +++ b/sdk/dotnet/Transform/GetDecode.cs @@ -124,6 +124,63 @@ public static Task InvokeAsync(GetDecodeArgs args, InvokeOption /// public static Output Invoke(GetDecodeInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:transform/getDecode:getDecode", args ?? new GetDecodeInvokeArgs(), options.WithDefaults()); + + /// + /// This data source supports the "/transform/decode/{role_name}" Vault endpoint. + /// + /// It decodes the provided value using a named role. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var transform = new Vault.Mount("transform", new() + /// { + /// Path = "transform", + /// Type = "transform", + /// }); + /// + /// var ccn_fpe = new Vault.Transform.Transformation("ccn-fpe", new() + /// { + /// Path = transform.Path, + /// Name = "ccn-fpe", + /// Type = "fpe", + /// Template = "builtin/creditcardnumber", + /// TweakSource = "internal", + /// AllowedRoles = new[] + /// { + /// "payments", + /// }, + /// }); + /// + /// var payments = new Vault.Transform.Role("payments", new() + /// { + /// Path = ccn_fpe.Path, + /// Name = "payments", + /// Transformations = new[] + /// { + /// "ccn-fpe", + /// }, + /// }); + /// + /// var test = Vault.Transform.GetDecode.Invoke(new() + /// { + /// Path = payments.Path, + /// RoleName = "payments", + /// Value = "9300-3376-4943-8903", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDecodeInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:transform/getDecode:getDecode", args ?? new GetDecodeInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Transform/GetEncode.cs b/sdk/dotnet/Transform/GetEncode.cs index 26875e8fe..2bc2d67e2 100644 --- a/sdk/dotnet/Transform/GetEncode.cs +++ b/sdk/dotnet/Transform/GetEncode.cs @@ -136,6 +136,69 @@ public static Task InvokeAsync(GetEncodeArgs args, InvokeOption /// public static Output Invoke(GetEncodeInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:transform/getEncode:getEncode", args ?? new GetEncodeInvokeArgs(), options.WithDefaults()); + + /// + /// This data source supports the "/transform/encode/{role_name}" Vault endpoint. + /// + /// It encodes the provided value using a named role. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var transform = new Vault.Mount("transform", new() + /// { + /// Path = "transform", + /// Type = "transform", + /// }); + /// + /// var ccn_fpe = new Vault.Transform.Transformation("ccn-fpe", new() + /// { + /// Path = transform.Path, + /// Name = "ccn-fpe", + /// Type = "fpe", + /// Template = "builtin/creditcardnumber", + /// TweakSource = "internal", + /// AllowedRoles = new[] + /// { + /// "payments", + /// }, + /// }); + /// + /// var payments = new Vault.Transform.Role("payments", new() + /// { + /// Path = ccn_fpe.Path, + /// Name = "payments", + /// Transformations = new[] + /// { + /// "ccn-fpe", + /// }, + /// }); + /// + /// var test = Vault.Transform.GetEncode.Invoke(new() + /// { + /// Path = payments.Path, + /// RoleName = "payments", + /// BatchInputs = new[] + /// { + /// + /// { + /// { "value", "1111-2222-3333-4444" }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetEncodeInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:transform/getEncode:getEncode", args ?? new GetEncodeInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Transit/GetDecrypt.cs b/sdk/dotnet/Transit/GetDecrypt.cs index fe8417633..49b8d315f 100644 --- a/sdk/dotnet/Transit/GetDecrypt.cs +++ b/sdk/dotnet/Transit/GetDecrypt.cs @@ -62,6 +62,32 @@ public static Task InvokeAsync(GetDecryptArgs args, InvokeOpti /// public static Output Invoke(GetDecryptInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:transit/getDecrypt:getDecrypt", args ?? new GetDecryptInvokeArgs(), options.WithDefaults()); + + /// + /// This is a data source which can be used to decrypt ciphertext using a Vault Transit key. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var test = Vault.Transit.GetDecrypt.Invoke(new() + /// { + /// Backend = "transit", + /// Key = "test", + /// Ciphertext = "vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDecryptInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:transit/getDecrypt:getDecrypt", args ?? new GetDecryptInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Transit/GetEncrypt.cs b/sdk/dotnet/Transit/GetEncrypt.cs index 3856c81a1..b60d1128c 100644 --- a/sdk/dotnet/Transit/GetEncrypt.cs +++ b/sdk/dotnet/Transit/GetEncrypt.cs @@ -22,6 +22,12 @@ public static Task InvokeAsync(GetEncryptArgs args, InvokeOpti /// public static Output Invoke(GetEncryptInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:transit/getEncrypt:getEncrypt", args ?? new GetEncryptInvokeArgs(), options.WithDefaults()); + + /// + /// This is a data source which can be used to encrypt plaintext using a Vault Transit key. + /// + public static Output Invoke(GetEncryptInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:transit/getEncrypt:getEncrypt", args ?? new GetEncryptInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index fb070d3d9..60cde8784 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -56,6 +56,13 @@ static class Utilities return dst; } + public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) + { + var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; + dst.Version = src?.Version ?? Version; + return dst; + } + private readonly static string version; public static string Version => version; diff --git a/sdk/dotnet/kv/GetSecret.cs b/sdk/dotnet/kv/GetSecret.cs index 99843d003..858886c11 100644 --- a/sdk/dotnet/kv/GetSecret.cs +++ b/sdk/dotnet/kv/GetSecret.cs @@ -106,6 +106,54 @@ public static Task InvokeAsync(GetSecretArgs args, InvokeOption /// public static Output Invoke(GetSecretInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecret:getSecret", args ?? new GetSecretInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var kvv1 = new Vault.Mount("kvv1", new() + /// { + /// Path = "kvv1", + /// Type = "kv", + /// Options = + /// { + /// { "version", "1" }, + /// }, + /// Description = "KV Version 1 secret engine mount", + /// }); + /// + /// var secret = new Vault.Kv.Secret("secret", new() + /// { + /// Path = kvv1.Path.Apply(path => $"{path}/secret"), + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["zip"] = "zap", + /// ["foo"] = "bar", + /// }), + /// }); + /// + /// var secretData = Vault.kv.GetSecret.Invoke(new() + /// { + /// Path = secret.Path, + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecret:getSecret", args ?? new GetSecretInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/kv/GetSecretSubkeysV2.cs b/sdk/dotnet/kv/GetSecretSubkeysV2.cs index 36d6c8d53..8a12cfae2 100644 --- a/sdk/dotnet/kv/GetSecretSubkeysV2.cs +++ b/sdk/dotnet/kv/GetSecretSubkeysV2.cs @@ -110,6 +110,56 @@ public static Task InvokeAsync(GetSecretSubkeysV2Args /// public static Output Invoke(GetSecretSubkeysV2InvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", args ?? new GetSecretSubkeysV2InvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var kvv2 = new Vault.Mount("kvv2", new() + /// { + /// Path = "kvv2", + /// Type = "kv", + /// Options = + /// { + /// { "version", "2" }, + /// }, + /// Description = "KV Version 2 secret engine mount", + /// }); + /// + /// var awsSecret = new Vault.Kv.SecretV2("aws_secret", new() + /// { + /// Mount = kvv2.Path, + /// Name = "aws_secret", + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["zip"] = "zap", + /// ["foo"] = "bar", + /// }), + /// }); + /// + /// var test = Vault.kv.GetSecretSubkeysV2.Invoke(new() + /// { + /// Mount = kvv2.Path, + /// Name = awsSecret.Name, + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretSubkeysV2InvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", args ?? new GetSecretSubkeysV2InvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/kv/GetSecretV2.cs b/sdk/dotnet/kv/GetSecretV2.cs index 5659e6aeb..66ce4e28e 100644 --- a/sdk/dotnet/kv/GetSecretV2.cs +++ b/sdk/dotnet/kv/GetSecretV2.cs @@ -112,6 +112,57 @@ public static Task InvokeAsync(GetSecretV2Args args, InvokeOp /// public static Output Invoke(GetSecretV2InvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretV2:getSecretV2", args ?? new GetSecretV2InvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var kvv2 = new Vault.Mount("kvv2", new() + /// { + /// Path = "kvv2", + /// Type = "kv", + /// Options = + /// { + /// { "version", "2" }, + /// }, + /// Description = "KV Version 2 secret engine mount", + /// }); + /// + /// var exampleSecretV2 = new Vault.Kv.SecretV2("example", new() + /// { + /// Mount = kvv2.Path, + /// Name = "secret", + /// DeleteAllVersions = true, + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["zip"] = "zap", + /// ["foo"] = "bar", + /// }), + /// }); + /// + /// var example = Vault.kv.GetSecretV2.Invoke(new() + /// { + /// Mount = kvv2.Path, + /// Name = exampleSecretV2.Name, + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretV2InvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretV2:getSecretV2", args ?? new GetSecretV2InvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/kv/GetSecretsList.cs b/sdk/dotnet/kv/GetSecretsList.cs index 8b0f0abb4..8ecd7b68f 100644 --- a/sdk/dotnet/kv/GetSecretsList.cs +++ b/sdk/dotnet/kv/GetSecretsList.cs @@ -122,6 +122,62 @@ public static Task InvokeAsync(GetSecretsListArgs args, In /// public static Output Invoke(GetSecretsListInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretsList:getSecretsList", args ?? new GetSecretsListInvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var kvv1 = new Vault.Mount("kvv1", new() + /// { + /// Path = "kvv1", + /// Type = "kv", + /// Options = + /// { + /// { "version", "1" }, + /// }, + /// Description = "KV Version 1 secret engine mount", + /// }); + /// + /// var awsSecret = new Vault.Kv.Secret("aws_secret", new() + /// { + /// Path = kvv1.Path.Apply(path => $"{path}/aws-secret"), + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["zip"] = "zap", + /// }), + /// }); + /// + /// var azureSecret = new Vault.Kv.Secret("azure_secret", new() + /// { + /// Path = kvv1.Path.Apply(path => $"{path}/azure-secret"), + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["foo"] = "bar", + /// }), + /// }); + /// + /// var secrets = Vault.kv.GetSecretsList.Invoke(new() + /// { + /// Path = kvv1.Path, + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretsListInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretsList:getSecretsList", args ?? new GetSecretsListInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/kv/GetSecretsListV2.cs b/sdk/dotnet/kv/GetSecretsListV2.cs index 89dc08cb0..fbd70ace8 100644 --- a/sdk/dotnet/kv/GetSecretsListV2.cs +++ b/sdk/dotnet/kv/GetSecretsListV2.cs @@ -158,6 +158,80 @@ public static Task InvokeAsync(GetSecretsListV2Args args /// public static Output Invoke(GetSecretsListV2InvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretsListV2:getSecretsListV2", args ?? new GetSecretsListV2InvokeArgs(), options.WithDefaults()); + + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using System.Text.Json; + /// using Pulumi; + /// using Vault = Pulumi.Vault; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var kvv2 = new Vault.Mount("kvv2", new() + /// { + /// Path = "kvv2", + /// Type = "kv", + /// Options = + /// { + /// { "version", "2" }, + /// }, + /// Description = "KV Version 2 secret engine mount", + /// }); + /// + /// var awsSecret = new Vault.Kv.SecretV2("aws_secret", new() + /// { + /// Mount = kvv2.Path, + /// Name = "aws_secret", + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["zip"] = "zap", + /// }), + /// }); + /// + /// var azureSecret = new Vault.Kv.SecretV2("azure_secret", new() + /// { + /// Mount = kvv2.Path, + /// Name = "azure_secret", + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["foo"] = "bar", + /// }), + /// }); + /// + /// var nestedSecret = new Vault.Kv.SecretV2("nested_secret", new() + /// { + /// Mount = kvv2.Path, + /// Name = azureSecret.Name.Apply(name => $"{name}/dev"), + /// DataJson = JsonSerializer.Serialize(new Dictionary<string, object?> + /// { + /// ["password"] = "test", + /// }), + /// }); + /// + /// var secrets = Vault.kv.GetSecretsListV2.Invoke(new() + /// { + /// Mount = kvv2.Path, + /// }); + /// + /// var nestedSecrets = Vault.kv.GetSecretsListV2.Invoke(new() + /// { + /// Mount = kvv2.Path, + /// Name = test2.Name, + /// }); + /// + /// }); + /// ``` + /// + /// ## Required Vault Capabilities + /// + /// Use of this resource requires the `read` capability on the given path. + /// + public static Output Invoke(GetSecretsListV2InvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vault:kv/getSecretsListV2:getSecretsListV2", args ?? new GetSecretsListV2InvokeArgs(), options.WithDefaults()); } diff --git a/sdk/go/vault/ad/getAccessCredentials.go b/sdk/go/vault/ad/getAccessCredentials.go index 3e4667651..d93242b2e 100644 --- a/sdk/go/vault/ad/getAccessCredentials.go +++ b/sdk/go/vault/ad/getAccessCredentials.go @@ -53,21 +53,11 @@ type GetAccessCredentialsResult struct { } func GetAccessCredentialsOutput(ctx *pulumi.Context, args GetAccessCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetAccessCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAccessCredentialsResultOutput, error) { args := v.(GetAccessCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetAccessCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:ad/getAccessCredentials:getAccessCredentials", args, &rv, "", opts...) - if err != nil { - return GetAccessCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetAccessCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetAccessCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:ad/getAccessCredentials:getAccessCredentials", args, GetAccessCredentialsResultOutput{}, options).(GetAccessCredentialsResultOutput), nil }).(GetAccessCredentialsResultOutput) } diff --git a/sdk/go/vault/approle/getAuthBackendRoleId.go b/sdk/go/vault/approle/getAuthBackendRoleId.go index 6dcc342f4..194bc1cb7 100644 --- a/sdk/go/vault/approle/getAuthBackendRoleId.go +++ b/sdk/go/vault/approle/getAuthBackendRoleId.go @@ -76,21 +76,11 @@ type GetAuthBackendRoleIdResult struct { } func GetAuthBackendRoleIdOutput(ctx *pulumi.Context, args GetAuthBackendRoleIdOutputArgs, opts ...pulumi.InvokeOption) GetAuthBackendRoleIdResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAuthBackendRoleIdResultOutput, error) { args := v.(GetAuthBackendRoleIdArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetAuthBackendRoleIdResult - secret, err := ctx.InvokePackageRaw("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", args, &rv, "", opts...) - if err != nil { - return GetAuthBackendRoleIdResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetAuthBackendRoleIdResultOutput) - if secret { - return pulumi.ToSecret(output).(GetAuthBackendRoleIdResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", args, GetAuthBackendRoleIdResultOutput{}, options).(GetAuthBackendRoleIdResultOutput), nil }).(GetAuthBackendRoleIdResultOutput) } diff --git a/sdk/go/vault/aws/getAccessCredentials.go b/sdk/go/vault/aws/getAccessCredentials.go index 2cf71c394..4882d442b 100644 --- a/sdk/go/vault/aws/getAccessCredentials.go +++ b/sdk/go/vault/aws/getAccessCredentials.go @@ -80,21 +80,11 @@ type GetAccessCredentialsResult struct { } func GetAccessCredentialsOutput(ctx *pulumi.Context, args GetAccessCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetAccessCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAccessCredentialsResultOutput, error) { args := v.(GetAccessCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetAccessCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:aws/getAccessCredentials:getAccessCredentials", args, &rv, "", opts...) - if err != nil { - return GetAccessCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetAccessCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetAccessCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:aws/getAccessCredentials:getAccessCredentials", args, GetAccessCredentialsResultOutput{}, options).(GetAccessCredentialsResultOutput), nil }).(GetAccessCredentialsResultOutput) } diff --git a/sdk/go/vault/aws/getStaticAccessCredentials.go b/sdk/go/vault/aws/getStaticAccessCredentials.go index 973bd591d..24baf9345 100644 --- a/sdk/go/vault/aws/getStaticAccessCredentials.go +++ b/sdk/go/vault/aws/getStaticAccessCredentials.go @@ -40,21 +40,11 @@ type GetStaticAccessCredentialsResult struct { } func GetStaticAccessCredentialsOutput(ctx *pulumi.Context, args GetStaticAccessCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetStaticAccessCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetStaticAccessCredentialsResultOutput, error) { args := v.(GetStaticAccessCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetStaticAccessCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", args, &rv, "", opts...) - if err != nil { - return GetStaticAccessCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetStaticAccessCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetStaticAccessCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", args, GetStaticAccessCredentialsResultOutput{}, options).(GetStaticAccessCredentialsResultOutput), nil }).(GetStaticAccessCredentialsResultOutput) } diff --git a/sdk/go/vault/azure/getAccessCredentials.go b/sdk/go/vault/azure/getAccessCredentials.go index aeca766e0..6f9603589 100644 --- a/sdk/go/vault/azure/getAccessCredentials.go +++ b/sdk/go/vault/azure/getAccessCredentials.go @@ -130,21 +130,11 @@ type GetAccessCredentialsResult struct { } func GetAccessCredentialsOutput(ctx *pulumi.Context, args GetAccessCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetAccessCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAccessCredentialsResultOutput, error) { args := v.(GetAccessCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetAccessCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:azure/getAccessCredentials:getAccessCredentials", args, &rv, "", opts...) - if err != nil { - return GetAccessCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetAccessCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetAccessCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:azure/getAccessCredentials:getAccessCredentials", args, GetAccessCredentialsResultOutput{}, options).(GetAccessCredentialsResultOutput), nil }).(GetAccessCredentialsResultOutput) } diff --git a/sdk/go/vault/gcp/getAuthBackendRole.go b/sdk/go/vault/gcp/getAuthBackendRole.go index 448d4d10e..284ef85cc 100644 --- a/sdk/go/vault/gcp/getAuthBackendRole.go +++ b/sdk/go/vault/gcp/getAuthBackendRole.go @@ -161,21 +161,11 @@ type LookupAuthBackendRoleResult struct { } func LookupAuthBackendRoleOutput(ctx *pulumi.Context, args LookupAuthBackendRoleOutputArgs, opts ...pulumi.InvokeOption) LookupAuthBackendRoleResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAuthBackendRoleResultOutput, error) { args := v.(LookupAuthBackendRoleArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupAuthBackendRoleResult - secret, err := ctx.InvokePackageRaw("vault:gcp/getAuthBackendRole:getAuthBackendRole", args, &rv, "", opts...) - if err != nil { - return LookupAuthBackendRoleResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupAuthBackendRoleResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupAuthBackendRoleResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:gcp/getAuthBackendRole:getAuthBackendRole", args, LookupAuthBackendRoleResultOutput{}, options).(LookupAuthBackendRoleResultOutput), nil }).(LookupAuthBackendRoleResultOutput) } diff --git a/sdk/go/vault/generic/getSecret.go b/sdk/go/vault/generic/getSecret.go index f2959a951..dd2176dc8 100644 --- a/sdk/go/vault/generic/getSecret.go +++ b/sdk/go/vault/generic/getSecret.go @@ -135,21 +135,11 @@ type LookupSecretResult struct { } func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSecretResultOutput, error) { args := v.(LookupSecretArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupSecretResult - secret, err := ctx.InvokePackageRaw("vault:generic/getSecret:getSecret", args, &rv, "", opts...) - if err != nil { - return LookupSecretResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupSecretResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupSecretResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:generic/getSecret:getSecret", args, LookupSecretResultOutput{}, options).(LookupSecretResultOutput), nil }).(LookupSecretResultOutput) } diff --git a/sdk/go/vault/getAuthBackend.go b/sdk/go/vault/getAuthBackend.go index 10adbf42c..345020ab3 100644 --- a/sdk/go/vault/getAuthBackend.go +++ b/sdk/go/vault/getAuthBackend.go @@ -80,21 +80,11 @@ type LookupAuthBackendResult struct { } func LookupAuthBackendOutput(ctx *pulumi.Context, args LookupAuthBackendOutputArgs, opts ...pulumi.InvokeOption) LookupAuthBackendResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAuthBackendResultOutput, error) { args := v.(LookupAuthBackendArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupAuthBackendResult - secret, err := ctx.InvokePackageRaw("vault:index/getAuthBackend:getAuthBackend", args, &rv, "", opts...) - if err != nil { - return LookupAuthBackendResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupAuthBackendResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupAuthBackendResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getAuthBackend:getAuthBackend", args, LookupAuthBackendResultOutput{}, options).(LookupAuthBackendResultOutput), nil }).(LookupAuthBackendResultOutput) } diff --git a/sdk/go/vault/getAuthBackends.go b/sdk/go/vault/getAuthBackends.go index 7a63dd3ed..b0ee5d2e4 100644 --- a/sdk/go/vault/getAuthBackends.go +++ b/sdk/go/vault/getAuthBackends.go @@ -92,21 +92,11 @@ type GetAuthBackendsResult struct { } func GetAuthBackendsOutput(ctx *pulumi.Context, args GetAuthBackendsOutputArgs, opts ...pulumi.InvokeOption) GetAuthBackendsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAuthBackendsResultOutput, error) { args := v.(GetAuthBackendsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetAuthBackendsResult - secret, err := ctx.InvokePackageRaw("vault:index/getAuthBackends:getAuthBackends", args, &rv, "", opts...) - if err != nil { - return GetAuthBackendsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetAuthBackendsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetAuthBackendsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getAuthBackends:getAuthBackends", args, GetAuthBackendsResultOutput{}, options).(GetAuthBackendsResultOutput), nil }).(GetAuthBackendsResultOutput) } diff --git a/sdk/go/vault/getNamespace.go b/sdk/go/vault/getNamespace.go index 5de8dd313..d88b102fb 100644 --- a/sdk/go/vault/getNamespace.go +++ b/sdk/go/vault/getNamespace.go @@ -134,21 +134,11 @@ type LookupNamespaceResult struct { } func LookupNamespaceOutput(ctx *pulumi.Context, args LookupNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNamespaceResultOutput, error) { args := v.(LookupNamespaceArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupNamespaceResult - secret, err := ctx.InvokePackageRaw("vault:index/getNamespace:getNamespace", args, &rv, "", opts...) - if err != nil { - return LookupNamespaceResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupNamespaceResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupNamespaceResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getNamespace:getNamespace", args, LookupNamespaceResultOutput{}, options).(LookupNamespaceResultOutput), nil }).(LookupNamespaceResultOutput) } diff --git a/sdk/go/vault/getNamespaces.go b/sdk/go/vault/getNamespaces.go index 942a1e07d..9232aa45b 100644 --- a/sdk/go/vault/getNamespaces.go +++ b/sdk/go/vault/getNamespaces.go @@ -64,21 +64,11 @@ type GetNamespacesResult struct { } func GetNamespacesOutput(ctx *pulumi.Context, args GetNamespacesOutputArgs, opts ...pulumi.InvokeOption) GetNamespacesResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetNamespacesResultOutput, error) { args := v.(GetNamespacesArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetNamespacesResult - secret, err := ctx.InvokePackageRaw("vault:index/getNamespaces:getNamespaces", args, &rv, "", opts...) - if err != nil { - return GetNamespacesResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetNamespacesResultOutput) - if secret { - return pulumi.ToSecret(output).(GetNamespacesResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getNamespaces:getNamespaces", args, GetNamespacesResultOutput{}, options).(GetNamespacesResultOutput), nil }).(GetNamespacesResultOutput) } diff --git a/sdk/go/vault/getNomadAccessToken.go b/sdk/go/vault/getNomadAccessToken.go index b763a4f8e..4260a14e0 100644 --- a/sdk/go/vault/getNomadAccessToken.go +++ b/sdk/go/vault/getNomadAccessToken.go @@ -100,21 +100,11 @@ type GetNomadAccessTokenResult struct { } func GetNomadAccessTokenOutput(ctx *pulumi.Context, args GetNomadAccessTokenOutputArgs, opts ...pulumi.InvokeOption) GetNomadAccessTokenResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetNomadAccessTokenResultOutput, error) { args := v.(GetNomadAccessTokenArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetNomadAccessTokenResult - secret, err := ctx.InvokePackageRaw("vault:index/getNomadAccessToken:getNomadAccessToken", args, &rv, "", opts...) - if err != nil { - return GetNomadAccessTokenResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetNomadAccessTokenResultOutput) - if secret { - return pulumi.ToSecret(output).(GetNomadAccessTokenResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getNomadAccessToken:getNomadAccessToken", args, GetNomadAccessTokenResultOutput{}, options).(GetNomadAccessTokenResultOutput), nil }).(GetNomadAccessTokenResultOutput) } diff --git a/sdk/go/vault/getPolicyDocument.go b/sdk/go/vault/getPolicyDocument.go index f1bf8f77c..9a3b278a1 100644 --- a/sdk/go/vault/getPolicyDocument.go +++ b/sdk/go/vault/getPolicyDocument.go @@ -84,21 +84,11 @@ type GetPolicyDocumentResult struct { } func GetPolicyDocumentOutput(ctx *pulumi.Context, args GetPolicyDocumentOutputArgs, opts ...pulumi.InvokeOption) GetPolicyDocumentResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyDocumentResultOutput, error) { args := v.(GetPolicyDocumentArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetPolicyDocumentResult - secret, err := ctx.InvokePackageRaw("vault:index/getPolicyDocument:getPolicyDocument", args, &rv, "", opts...) - if err != nil { - return GetPolicyDocumentResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetPolicyDocumentResultOutput) - if secret { - return pulumi.ToSecret(output).(GetPolicyDocumentResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getPolicyDocument:getPolicyDocument", args, GetPolicyDocumentResultOutput{}, options).(GetPolicyDocumentResultOutput), nil }).(GetPolicyDocumentResultOutput) } diff --git a/sdk/go/vault/getRaftAutopilotState.go b/sdk/go/vault/getRaftAutopilotState.go index be6cef594..8aeaba608 100644 --- a/sdk/go/vault/getRaftAutopilotState.go +++ b/sdk/go/vault/getRaftAutopilotState.go @@ -84,21 +84,11 @@ type GetRaftAutopilotStateResult struct { } func GetRaftAutopilotStateOutput(ctx *pulumi.Context, args GetRaftAutopilotStateOutputArgs, opts ...pulumi.InvokeOption) GetRaftAutopilotStateResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetRaftAutopilotStateResultOutput, error) { args := v.(GetRaftAutopilotStateArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetRaftAutopilotStateResult - secret, err := ctx.InvokePackageRaw("vault:index/getRaftAutopilotState:getRaftAutopilotState", args, &rv, "", opts...) - if err != nil { - return GetRaftAutopilotStateResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetRaftAutopilotStateResultOutput) - if secret { - return pulumi.ToSecret(output).(GetRaftAutopilotStateResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:index/getRaftAutopilotState:getRaftAutopilotState", args, GetRaftAutopilotStateResultOutput{}, options).(GetRaftAutopilotStateResultOutput), nil }).(GetRaftAutopilotStateResultOutput) } diff --git a/sdk/go/vault/identity/getEntity.go b/sdk/go/vault/identity/getEntity.go index c57e895e3..77a3c0eca 100644 --- a/sdk/go/vault/identity/getEntity.go +++ b/sdk/go/vault/identity/getEntity.go @@ -112,21 +112,11 @@ type LookupEntityResult struct { } func LookupEntityOutput(ctx *pulumi.Context, args LookupEntityOutputArgs, opts ...pulumi.InvokeOption) LookupEntityResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupEntityResultOutput, error) { args := v.(LookupEntityArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupEntityResult - secret, err := ctx.InvokePackageRaw("vault:identity/getEntity:getEntity", args, &rv, "", opts...) - if err != nil { - return LookupEntityResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupEntityResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupEntityResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:identity/getEntity:getEntity", args, LookupEntityResultOutput{}, options).(LookupEntityResultOutput), nil }).(LookupEntityResultOutput) } diff --git a/sdk/go/vault/identity/getGroup.go b/sdk/go/vault/identity/getGroup.go index c30ffd49f..df0353166 100644 --- a/sdk/go/vault/identity/getGroup.go +++ b/sdk/go/vault/identity/getGroup.go @@ -124,21 +124,11 @@ type LookupGroupResult struct { } func LookupGroupOutput(ctx *pulumi.Context, args LookupGroupOutputArgs, opts ...pulumi.InvokeOption) LookupGroupResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupGroupResultOutput, error) { args := v.(LookupGroupArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupGroupResult - secret, err := ctx.InvokePackageRaw("vault:identity/getGroup:getGroup", args, &rv, "", opts...) - if err != nil { - return LookupGroupResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupGroupResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupGroupResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:identity/getGroup:getGroup", args, LookupGroupResultOutput{}, options).(LookupGroupResultOutput), nil }).(LookupGroupResultOutput) } diff --git a/sdk/go/vault/identity/getOidcClientCreds.go b/sdk/go/vault/identity/getOidcClientCreds.go index 477288e6a..10833161a 100644 --- a/sdk/go/vault/identity/getOidcClientCreds.go +++ b/sdk/go/vault/identity/getOidcClientCreds.go @@ -81,21 +81,11 @@ type GetOidcClientCredsResult struct { } func GetOidcClientCredsOutput(ctx *pulumi.Context, args GetOidcClientCredsOutputArgs, opts ...pulumi.InvokeOption) GetOidcClientCredsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetOidcClientCredsResultOutput, error) { args := v.(GetOidcClientCredsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetOidcClientCredsResult - secret, err := ctx.InvokePackageRaw("vault:identity/getOidcClientCreds:getOidcClientCreds", args, &rv, "", opts...) - if err != nil { - return GetOidcClientCredsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetOidcClientCredsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetOidcClientCredsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:identity/getOidcClientCreds:getOidcClientCreds", args, GetOidcClientCredsResultOutput{}, options).(GetOidcClientCredsResultOutput), nil }).(GetOidcClientCredsResultOutput) } diff --git a/sdk/go/vault/identity/getOidcOpenidConfig.go b/sdk/go/vault/identity/getOidcOpenidConfig.go index 3bcb61ec2..f465b99f2 100644 --- a/sdk/go/vault/identity/getOidcOpenidConfig.go +++ b/sdk/go/vault/identity/getOidcOpenidConfig.go @@ -123,21 +123,11 @@ type GetOidcOpenidConfigResult struct { } func GetOidcOpenidConfigOutput(ctx *pulumi.Context, args GetOidcOpenidConfigOutputArgs, opts ...pulumi.InvokeOption) GetOidcOpenidConfigResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetOidcOpenidConfigResultOutput, error) { args := v.(GetOidcOpenidConfigArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetOidcOpenidConfigResult - secret, err := ctx.InvokePackageRaw("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", args, &rv, "", opts...) - if err != nil { - return GetOidcOpenidConfigResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetOidcOpenidConfigResultOutput) - if secret { - return pulumi.ToSecret(output).(GetOidcOpenidConfigResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", args, GetOidcOpenidConfigResultOutput{}, options).(GetOidcOpenidConfigResultOutput), nil }).(GetOidcOpenidConfigResultOutput) } diff --git a/sdk/go/vault/identity/getOidcPublicKeys.go b/sdk/go/vault/identity/getOidcPublicKeys.go index 28c0437fb..ac049d75e 100644 --- a/sdk/go/vault/identity/getOidcPublicKeys.go +++ b/sdk/go/vault/identity/getOidcPublicKeys.go @@ -100,21 +100,11 @@ type GetOidcPublicKeysResult struct { } func GetOidcPublicKeysOutput(ctx *pulumi.Context, args GetOidcPublicKeysOutputArgs, opts ...pulumi.InvokeOption) GetOidcPublicKeysResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetOidcPublicKeysResultOutput, error) { args := v.(GetOidcPublicKeysArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetOidcPublicKeysResult - secret, err := ctx.InvokePackageRaw("vault:identity/getOidcPublicKeys:getOidcPublicKeys", args, &rv, "", opts...) - if err != nil { - return GetOidcPublicKeysResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetOidcPublicKeysResultOutput) - if secret { - return pulumi.ToSecret(output).(GetOidcPublicKeysResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:identity/getOidcPublicKeys:getOidcPublicKeys", args, GetOidcPublicKeysResultOutput{}, options).(GetOidcPublicKeysResultOutput), nil }).(GetOidcPublicKeysResultOutput) } diff --git a/sdk/go/vault/kubernetes/getAuthBackendConfig.go b/sdk/go/vault/kubernetes/getAuthBackendConfig.go index 1bef76ac9..3f6e72e99 100644 --- a/sdk/go/vault/kubernetes/getAuthBackendConfig.go +++ b/sdk/go/vault/kubernetes/getAuthBackendConfig.go @@ -73,21 +73,11 @@ type LookupAuthBackendConfigResult struct { } func LookupAuthBackendConfigOutput(ctx *pulumi.Context, args LookupAuthBackendConfigOutputArgs, opts ...pulumi.InvokeOption) LookupAuthBackendConfigResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAuthBackendConfigResultOutput, error) { args := v.(LookupAuthBackendConfigArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupAuthBackendConfigResult - secret, err := ctx.InvokePackageRaw("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", args, &rv, "", opts...) - if err != nil { - return LookupAuthBackendConfigResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupAuthBackendConfigResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupAuthBackendConfigResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", args, LookupAuthBackendConfigResultOutput{}, options).(LookupAuthBackendConfigResultOutput), nil }).(LookupAuthBackendConfigResultOutput) } diff --git a/sdk/go/vault/kubernetes/getAuthBackendRole.go b/sdk/go/vault/kubernetes/getAuthBackendRole.go index 9773fff27..69af86918 100644 --- a/sdk/go/vault/kubernetes/getAuthBackendRole.go +++ b/sdk/go/vault/kubernetes/getAuthBackendRole.go @@ -130,21 +130,11 @@ type LookupAuthBackendRoleResult struct { } func LookupAuthBackendRoleOutput(ctx *pulumi.Context, args LookupAuthBackendRoleOutputArgs, opts ...pulumi.InvokeOption) LookupAuthBackendRoleResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAuthBackendRoleResultOutput, error) { args := v.(LookupAuthBackendRoleArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupAuthBackendRoleResult - secret, err := ctx.InvokePackageRaw("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", args, &rv, "", opts...) - if err != nil { - return LookupAuthBackendRoleResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupAuthBackendRoleResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupAuthBackendRoleResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", args, LookupAuthBackendRoleResultOutput{}, options).(LookupAuthBackendRoleResultOutput), nil }).(LookupAuthBackendRoleResultOutput) } diff --git a/sdk/go/vault/kubernetes/getServiceAccountToken.go b/sdk/go/vault/kubernetes/getServiceAccountToken.go index d215d7062..23b89337f 100644 --- a/sdk/go/vault/kubernetes/getServiceAccountToken.go +++ b/sdk/go/vault/kubernetes/getServiceAccountToken.go @@ -141,21 +141,11 @@ type GetServiceAccountTokenResult struct { } func GetServiceAccountTokenOutput(ctx *pulumi.Context, args GetServiceAccountTokenOutputArgs, opts ...pulumi.InvokeOption) GetServiceAccountTokenResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetServiceAccountTokenResultOutput, error) { args := v.(GetServiceAccountTokenArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetServiceAccountTokenResult - secret, err := ctx.InvokePackageRaw("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", args, &rv, "", opts...) - if err != nil { - return GetServiceAccountTokenResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetServiceAccountTokenResultOutput) - if secret { - return pulumi.ToSecret(output).(GetServiceAccountTokenResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", args, GetServiceAccountTokenResultOutput{}, options).(GetServiceAccountTokenResultOutput), nil }).(GetServiceAccountTokenResultOutput) } diff --git a/sdk/go/vault/kv/getSecret.go b/sdk/go/vault/kv/getSecret.go index 2f0839a3e..944049e36 100644 --- a/sdk/go/vault/kv/getSecret.go +++ b/sdk/go/vault/kv/getSecret.go @@ -115,21 +115,11 @@ type LookupSecretResult struct { } func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSecretResultOutput, error) { args := v.(LookupSecretArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupSecretResult - secret, err := ctx.InvokePackageRaw("vault:kv/getSecret:getSecret", args, &rv, "", opts...) - if err != nil { - return LookupSecretResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupSecretResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupSecretResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kv/getSecret:getSecret", args, LookupSecretResultOutput{}, options).(LookupSecretResultOutput), nil }).(LookupSecretResultOutput) } diff --git a/sdk/go/vault/kv/getSecretSubkeysV2.go b/sdk/go/vault/kv/getSecretSubkeysV2.go index 2e845ca53..92f32214e 100644 --- a/sdk/go/vault/kv/getSecretSubkeysV2.go +++ b/sdk/go/vault/kv/getSecretSubkeysV2.go @@ -120,21 +120,11 @@ type GetSecretSubkeysV2Result struct { } func GetSecretSubkeysV2Output(ctx *pulumi.Context, args GetSecretSubkeysV2OutputArgs, opts ...pulumi.InvokeOption) GetSecretSubkeysV2ResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSecretSubkeysV2ResultOutput, error) { args := v.(GetSecretSubkeysV2Args) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetSecretSubkeysV2Result - secret, err := ctx.InvokePackageRaw("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", args, &rv, "", opts...) - if err != nil { - return GetSecretSubkeysV2ResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetSecretSubkeysV2ResultOutput) - if secret { - return pulumi.ToSecret(output).(GetSecretSubkeysV2ResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", args, GetSecretSubkeysV2ResultOutput{}, options).(GetSecretSubkeysV2ResultOutput), nil }).(GetSecretSubkeysV2ResultOutput) } diff --git a/sdk/go/vault/kv/getSecretV2.go b/sdk/go/vault/kv/getSecretV2.go index 149ec4c77..53ba7749e 100644 --- a/sdk/go/vault/kv/getSecretV2.go +++ b/sdk/go/vault/kv/getSecretV2.go @@ -127,21 +127,11 @@ type LookupSecretV2Result struct { } func LookupSecretV2Output(ctx *pulumi.Context, args LookupSecretV2OutputArgs, opts ...pulumi.InvokeOption) LookupSecretV2ResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSecretV2ResultOutput, error) { args := v.(LookupSecretV2Args) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupSecretV2Result - secret, err := ctx.InvokePackageRaw("vault:kv/getSecretV2:getSecretV2", args, &rv, "", opts...) - if err != nil { - return LookupSecretV2ResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupSecretV2ResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupSecretV2ResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kv/getSecretV2:getSecretV2", args, LookupSecretV2ResultOutput{}, options).(LookupSecretV2ResultOutput), nil }).(LookupSecretV2ResultOutput) } diff --git a/sdk/go/vault/kv/getSecretsList.go b/sdk/go/vault/kv/getSecretsList.go index 8d7c7c74f..94a7f07ec 100644 --- a/sdk/go/vault/kv/getSecretsList.go +++ b/sdk/go/vault/kv/getSecretsList.go @@ -116,21 +116,11 @@ type GetSecretsListResult struct { } func GetSecretsListOutput(ctx *pulumi.Context, args GetSecretsListOutputArgs, opts ...pulumi.InvokeOption) GetSecretsListResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSecretsListResultOutput, error) { args := v.(GetSecretsListArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetSecretsListResult - secret, err := ctx.InvokePackageRaw("vault:kv/getSecretsList:getSecretsList", args, &rv, "", opts...) - if err != nil { - return GetSecretsListResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetSecretsListResultOutput) - if secret { - return pulumi.ToSecret(output).(GetSecretsListResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kv/getSecretsList:getSecretsList", args, GetSecretsListResultOutput{}, options).(GetSecretsListResultOutput), nil }).(GetSecretsListResultOutput) } diff --git a/sdk/go/vault/kv/getSecretsListV2.go b/sdk/go/vault/kv/getSecretsListV2.go index 58309d101..4453d7fef 100644 --- a/sdk/go/vault/kv/getSecretsListV2.go +++ b/sdk/go/vault/kv/getSecretsListV2.go @@ -145,21 +145,11 @@ type GetSecretsListV2Result struct { } func GetSecretsListV2Output(ctx *pulumi.Context, args GetSecretsListV2OutputArgs, opts ...pulumi.InvokeOption) GetSecretsListV2ResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSecretsListV2ResultOutput, error) { args := v.(GetSecretsListV2Args) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetSecretsListV2Result - secret, err := ctx.InvokePackageRaw("vault:kv/getSecretsListV2:getSecretsListV2", args, &rv, "", opts...) - if err != nil { - return GetSecretsListV2ResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetSecretsListV2ResultOutput) - if secret { - return pulumi.ToSecret(output).(GetSecretsListV2ResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:kv/getSecretsListV2:getSecretsListV2", args, GetSecretsListV2ResultOutput{}, options).(GetSecretsListV2ResultOutput), nil }).(GetSecretsListV2ResultOutput) } diff --git a/sdk/go/vault/ldap/getDynamicCredentials.go b/sdk/go/vault/ldap/getDynamicCredentials.go index efa1f1d37..9ce9a7e76 100644 --- a/sdk/go/vault/ldap/getDynamicCredentials.go +++ b/sdk/go/vault/ldap/getDynamicCredentials.go @@ -44,21 +44,11 @@ type GetDynamicCredentialsResult struct { } func GetDynamicCredentialsOutput(ctx *pulumi.Context, args GetDynamicCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetDynamicCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDynamicCredentialsResultOutput, error) { args := v.(GetDynamicCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDynamicCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:ldap/getDynamicCredentials:getDynamicCredentials", args, &rv, "", opts...) - if err != nil { - return GetDynamicCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDynamicCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDynamicCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:ldap/getDynamicCredentials:getDynamicCredentials", args, GetDynamicCredentialsResultOutput{}, options).(GetDynamicCredentialsResultOutput), nil }).(GetDynamicCredentialsResultOutput) } diff --git a/sdk/go/vault/ldap/getStaticCredentials.go b/sdk/go/vault/ldap/getStaticCredentials.go index cd33fda1a..438b9a7fd 100644 --- a/sdk/go/vault/ldap/getStaticCredentials.go +++ b/sdk/go/vault/ldap/getStaticCredentials.go @@ -45,21 +45,11 @@ type GetStaticCredentialsResult struct { } func GetStaticCredentialsOutput(ctx *pulumi.Context, args GetStaticCredentialsOutputArgs, opts ...pulumi.InvokeOption) GetStaticCredentialsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetStaticCredentialsResultOutput, error) { args := v.(GetStaticCredentialsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetStaticCredentialsResult - secret, err := ctx.InvokePackageRaw("vault:ldap/getStaticCredentials:getStaticCredentials", args, &rv, "", opts...) - if err != nil { - return GetStaticCredentialsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetStaticCredentialsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetStaticCredentialsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:ldap/getStaticCredentials:getStaticCredentials", args, GetStaticCredentialsResultOutput{}, options).(GetStaticCredentialsResultOutput), nil }).(GetStaticCredentialsResultOutput) } diff --git a/sdk/go/vault/pkisecret/getBackendConfigEst.go b/sdk/go/vault/pkisecret/getBackendConfigEst.go index a867be357..cd07475a3 100644 --- a/sdk/go/vault/pkisecret/getBackendConfigEst.go +++ b/sdk/go/vault/pkisecret/getBackendConfigEst.go @@ -89,21 +89,11 @@ type LookupBackendConfigEstResult struct { } func LookupBackendConfigEstOutput(ctx *pulumi.Context, args LookupBackendConfigEstOutputArgs, opts ...pulumi.InvokeOption) LookupBackendConfigEstResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupBackendConfigEstResultOutput, error) { args := v.(LookupBackendConfigEstArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupBackendConfigEstResult - secret, err := ctx.InvokePackageRaw("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", args, &rv, "", opts...) - if err != nil { - return LookupBackendConfigEstResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupBackendConfigEstResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupBackendConfigEstResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", args, LookupBackendConfigEstResultOutput{}, options).(LookupBackendConfigEstResultOutput), nil }).(LookupBackendConfigEstResultOutput) } diff --git a/sdk/go/vault/pkisecret/getBackendIssuer.go b/sdk/go/vault/pkisecret/getBackendIssuer.go index 7cbd05572..67e0c020d 100644 --- a/sdk/go/vault/pkisecret/getBackendIssuer.go +++ b/sdk/go/vault/pkisecret/getBackendIssuer.go @@ -106,21 +106,11 @@ type GetBackendIssuerResult struct { } func GetBackendIssuerOutput(ctx *pulumi.Context, args GetBackendIssuerOutputArgs, opts ...pulumi.InvokeOption) GetBackendIssuerResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetBackendIssuerResultOutput, error) { args := v.(GetBackendIssuerArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetBackendIssuerResult - secret, err := ctx.InvokePackageRaw("vault:pkiSecret/getBackendIssuer:getBackendIssuer", args, &rv, "", opts...) - if err != nil { - return GetBackendIssuerResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetBackendIssuerResultOutput) - if secret { - return pulumi.ToSecret(output).(GetBackendIssuerResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:pkiSecret/getBackendIssuer:getBackendIssuer", args, GetBackendIssuerResultOutput{}, options).(GetBackendIssuerResultOutput), nil }).(GetBackendIssuerResultOutput) } diff --git a/sdk/go/vault/pkisecret/getBackendIssuers.go b/sdk/go/vault/pkisecret/getBackendIssuers.go index 8235c2686..72db321cf 100644 --- a/sdk/go/vault/pkisecret/getBackendIssuers.go +++ b/sdk/go/vault/pkisecret/getBackendIssuers.go @@ -89,21 +89,11 @@ type GetBackendIssuersResult struct { } func GetBackendIssuersOutput(ctx *pulumi.Context, args GetBackendIssuersOutputArgs, opts ...pulumi.InvokeOption) GetBackendIssuersResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetBackendIssuersResultOutput, error) { args := v.(GetBackendIssuersArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetBackendIssuersResult - secret, err := ctx.InvokePackageRaw("vault:pkiSecret/getBackendIssuers:getBackendIssuers", args, &rv, "", opts...) - if err != nil { - return GetBackendIssuersResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetBackendIssuersResultOutput) - if secret { - return pulumi.ToSecret(output).(GetBackendIssuersResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:pkiSecret/getBackendIssuers:getBackendIssuers", args, GetBackendIssuersResultOutput{}, options).(GetBackendIssuersResultOutput), nil }).(GetBackendIssuersResultOutput) } diff --git a/sdk/go/vault/pkisecret/getBackendKey.go b/sdk/go/vault/pkisecret/getBackendKey.go index 295db4fd9..ab0873dbb 100644 --- a/sdk/go/vault/pkisecret/getBackendKey.go +++ b/sdk/go/vault/pkisecret/getBackendKey.go @@ -95,21 +95,11 @@ type GetBackendKeyResult struct { } func GetBackendKeyOutput(ctx *pulumi.Context, args GetBackendKeyOutputArgs, opts ...pulumi.InvokeOption) GetBackendKeyResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetBackendKeyResultOutput, error) { args := v.(GetBackendKeyArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetBackendKeyResult - secret, err := ctx.InvokePackageRaw("vault:pkiSecret/getBackendKey:getBackendKey", args, &rv, "", opts...) - if err != nil { - return GetBackendKeyResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetBackendKeyResultOutput) - if secret { - return pulumi.ToSecret(output).(GetBackendKeyResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:pkiSecret/getBackendKey:getBackendKey", args, GetBackendKeyResultOutput{}, options).(GetBackendKeyResultOutput), nil }).(GetBackendKeyResultOutput) } diff --git a/sdk/go/vault/pkisecret/getBackendKeys.go b/sdk/go/vault/pkisecret/getBackendKeys.go index 1cecd27bb..e1c7b9526 100644 --- a/sdk/go/vault/pkisecret/getBackendKeys.go +++ b/sdk/go/vault/pkisecret/getBackendKeys.go @@ -89,21 +89,11 @@ type GetBackendKeysResult struct { } func GetBackendKeysOutput(ctx *pulumi.Context, args GetBackendKeysOutputArgs, opts ...pulumi.InvokeOption) GetBackendKeysResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetBackendKeysResultOutput, error) { args := v.(GetBackendKeysArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetBackendKeysResult - secret, err := ctx.InvokePackageRaw("vault:pkiSecret/getBackendKeys:getBackendKeys", args, &rv, "", opts...) - if err != nil { - return GetBackendKeysResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetBackendKeysResultOutput) - if secret { - return pulumi.ToSecret(output).(GetBackendKeysResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:pkiSecret/getBackendKeys:getBackendKeys", args, GetBackendKeysResultOutput{}, options).(GetBackendKeysResultOutput), nil }).(GetBackendKeysResultOutput) } diff --git a/sdk/go/vault/transform/getDecode.go b/sdk/go/vault/transform/getDecode.go index bf85cc643..cf9e087b5 100644 --- a/sdk/go/vault/transform/getDecode.go +++ b/sdk/go/vault/transform/getDecode.go @@ -121,21 +121,11 @@ type GetDecodeResult struct { } func GetDecodeOutput(ctx *pulumi.Context, args GetDecodeOutputArgs, opts ...pulumi.InvokeOption) GetDecodeResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDecodeResultOutput, error) { args := v.(GetDecodeArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDecodeResult - secret, err := ctx.InvokePackageRaw("vault:transform/getDecode:getDecode", args, &rv, "", opts...) - if err != nil { - return GetDecodeResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDecodeResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDecodeResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:transform/getDecode:getDecode", args, GetDecodeResultOutput{}, options).(GetDecodeResultOutput), nil }).(GetDecodeResultOutput) } diff --git a/sdk/go/vault/transform/getEncode.go b/sdk/go/vault/transform/getEncode.go index 5d7f6bd16..16d74a15f 100644 --- a/sdk/go/vault/transform/getEncode.go +++ b/sdk/go/vault/transform/getEncode.go @@ -125,21 +125,11 @@ type GetEncodeResult struct { } func GetEncodeOutput(ctx *pulumi.Context, args GetEncodeOutputArgs, opts ...pulumi.InvokeOption) GetEncodeResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetEncodeResultOutput, error) { args := v.(GetEncodeArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetEncodeResult - secret, err := ctx.InvokePackageRaw("vault:transform/getEncode:getEncode", args, &rv, "", opts...) - if err != nil { - return GetEncodeResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetEncodeResultOutput) - if secret { - return pulumi.ToSecret(output).(GetEncodeResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:transform/getEncode:getEncode", args, GetEncodeResultOutput{}, options).(GetEncodeResultOutput), nil }).(GetEncodeResultOutput) } diff --git a/sdk/go/vault/transit/getDecrypt.go b/sdk/go/vault/transit/getDecrypt.go index 2e0491a1f..1de08fbda 100644 --- a/sdk/go/vault/transit/getDecrypt.go +++ b/sdk/go/vault/transit/getDecrypt.go @@ -73,21 +73,11 @@ type GetDecryptResult struct { } func GetDecryptOutput(ctx *pulumi.Context, args GetDecryptOutputArgs, opts ...pulumi.InvokeOption) GetDecryptResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDecryptResultOutput, error) { args := v.(GetDecryptArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDecryptResult - secret, err := ctx.InvokePackageRaw("vault:transit/getDecrypt:getDecrypt", args, &rv, "", opts...) - if err != nil { - return GetDecryptResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDecryptResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDecryptResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:transit/getDecrypt:getDecrypt", args, GetDecryptResultOutput{}, options).(GetDecryptResultOutput), nil }).(GetDecryptResultOutput) } diff --git a/sdk/go/vault/transit/getEncrypt.go b/sdk/go/vault/transit/getEncrypt.go index 6fc8fbcc6..4c081137b 100644 --- a/sdk/go/vault/transit/getEncrypt.go +++ b/sdk/go/vault/transit/getEncrypt.go @@ -47,21 +47,11 @@ type GetEncryptResult struct { } func GetEncryptOutput(ctx *pulumi.Context, args GetEncryptOutputArgs, opts ...pulumi.InvokeOption) GetEncryptResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetEncryptResultOutput, error) { args := v.(GetEncryptArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetEncryptResult - secret, err := ctx.InvokePackageRaw("vault:transit/getEncrypt:getEncrypt", args, &rv, "", opts...) - if err != nil { - return GetEncryptResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetEncryptResultOutput) - if secret { - return pulumi.ToSecret(output).(GetEncryptResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vault:transit/getEncrypt:getEncrypt", args, GetEncryptResultOutput{}, options).(GetEncryptResultOutput), nil }).(GetEncryptResultOutput) } diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index bca3386dd..60109be00 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.18.0") + implementation("com.pulumi:pulumi:0.20.0") } task sourcesJar(type: Jar) { diff --git a/sdk/java/src/main/java/com/pulumi/vault/Utilities.java b/sdk/java/src/main/java/com/pulumi/vault/Utilities.java index 16f60ec86..fe3940b8c 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/vault/Utilities.java @@ -14,6 +14,7 @@ import javax.annotation.Nullable; import com.pulumi.core.internal.Environment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; public class Utilities { @@ -57,16 +58,28 @@ public static Optional getEnvDouble(java.lang.String... names) return Optional.empty(); } - public static InvokeOptions withVersion(@Nullable InvokeOptions options) { - if (options != null && options.getVersion().isPresent()) { - return options; - } - return new InvokeOptions( - options == null ? null : options.getParent().orElse(null), - options == null ? null : options.getProvider().orElse(null), - getVersion() - ); + public static InvokeOptions withVersion(@Nullable InvokeOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; + } + return new InvokeOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion() + ); + } + + public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; } + return new InvokeOutputOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion(), + options == null ? null : options.getDependsOn() + ); + } private static final java.lang.String version; public static java.lang.String getVersion() { diff --git a/sdk/java/src/main/java/com/pulumi/vault/VaultFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/VaultFunctions.java index e903f1e8a..57ff90bd9 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/VaultFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/VaultFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.inputs.GetAuthBackendArgs; import com.pulumi.vault.inputs.GetAuthBackendPlainArgs; @@ -152,6 +153,46 @@ public static CompletableFuture getAuthBackendPlain(GetAut public static Output getAuthBackend(GetAuthBackendArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getAuthBackend:getAuthBackend", TypeShape.of(GetAuthBackendResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetAuthBackendArgs;
+     * 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 example = VaultFunctions.getAuthBackend(GetAuthBackendArgs.builder()
+     *             .path("userpass")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getAuthBackend(GetAuthBackendArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getAuthBackend:getAuthBackend", TypeShape.of(GetAuthBackendResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -547,6 +588,77 @@ public static CompletableFuture getAuthBackendsPlain(GetA public static Output getAuthBackends(GetAuthBackendsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getAuthBackends:getAuthBackends", TypeShape.of(GetAuthBackendsResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetAuthBackendsArgs;
+     * 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 example = VaultFunctions.getAuthBackends();
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetAuthBackendsArgs;
+     * 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 example-filter = VaultFunctions.getAuthBackends(GetAuthBackendsArgs.builder()
+     *             .type("kubernetes")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getAuthBackends(GetAuthBackendsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getAuthBackends:getAuthBackends", TypeShape.of(GetAuthBackendsResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1311,6 +1423,122 @@ public static Output getNamespace(GetNamespaceArgs args, Inv * <!--End PulumiCodeChooser --> * */ + public static Output getNamespace(GetNamespaceArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getNamespace:getNamespace", TypeShape.of(GetNamespaceResult.class), args, Utilities.withVersion(options)); + } + /** + * ## Example Usage + * + * ### Current namespace + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetNamespaceArgs;
+     * 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 current = VaultFunctions.getNamespace();
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### Single namespace + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetNamespaceArgs;
+     * 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 ns1 = VaultFunctions.getNamespace(GetNamespaceArgs.builder()
+     *             .path("ns1")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### Nested namespace + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetNamespaceArgs;
+     * 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 child = VaultFunctions.getNamespace(GetNamespaceArgs.builder()
+     *             .namespace("parent")
+     *             .path("child")
+     *             .build());
+     * 
+     *         final var fullPath = child.applyValue(getNamespaceResult -> getNamespaceResult.id());
+     * 
+     *         // -> foo/parent/child/
+     *         final var pathFq = child.applyValue(getNamespaceResult -> getNamespaceResult.pathFq());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ public static CompletableFuture getNamespacePlain(GetNamespacePlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("vault:index/getNamespace:getNamespace", TypeShape.of(GetNamespaceResult.class), args, Utilities.withVersion(options)); } @@ -1549,6 +1777,53 @@ public static CompletableFuture getNamespacesPlain(GetNames public static Output getNamespaces(GetNamespacesArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getNamespaces:getNamespaces", TypeShape.of(GetNamespacesResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * ### Child namespaces + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetNamespacesArgs;
+     * 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 children = VaultFunctions.getNamespaces();
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### Nested namespace + * + * To fetch the details of nested namespaces: + * + * <!--Start PulumiCodeChooser --> + * <!--End PulumiCodeChooser --> + * + */ + public static Output getNamespaces(GetNamespacesArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getNamespaces:getNamespaces", TypeShape.of(GetNamespacesResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1779,6 +2054,67 @@ public static CompletableFuture getNomadAccessTokenPl public static Output getNomadAccessToken(GetNomadAccessTokenArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getNomadAccessToken:getNomadAccessToken", TypeShape.of(GetNomadAccessTokenResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.NomadSecretBackend;
+     * import com.pulumi.vault.NomadSecretBackendArgs;
+     * import com.pulumi.vault.NomadSecretRole;
+     * import com.pulumi.vault.NomadSecretRoleArgs;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetNomadAccessTokenArgs;
+     * 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) {
+     *         var config = new NomadSecretBackend("config", NomadSecretBackendArgs.builder()
+     *             .backend("nomad")
+     *             .description("test description")
+     *             .defaultLeaseTtlSeconds("3600")
+     *             .maxLeaseTtlSeconds("7200")
+     *             .address("https://127.0.0.1:4646")
+     *             .token("ae20ceaa-...")
+     *             .build());
+     * 
+     *         var test = new NomadSecretRole("test", NomadSecretRoleArgs.builder()
+     *             .backend(config.backend())
+     *             .role("test")
+     *             .type("client")
+     *             .policies("readonly")
+     *             .build());
+     * 
+     *         final var token = VaultFunctions.getNomadAccessToken(GetNomadAccessTokenArgs.builder()
+     *             .backend(config.backend())
+     *             .role(test.role())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getNomadAccessToken(GetNomadAccessTokenArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getNomadAccessToken:getNomadAccessToken", TypeShape.of(GetNomadAccessTokenResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -2130,6 +2466,64 @@ public static CompletableFuture getPolicyDocumentPlain( public static Output getPolicyDocument(GetPolicyDocumentArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getPolicyDocument:getPolicyDocument", TypeShape.of(GetPolicyDocumentResult.class), args, Utilities.withVersion(options)); } + /** + * This is a data source which can be used to construct a HCL representation of an Vault policy document, for use with resources which expect policy documents, such as the `vault.Policy` resource. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetPolicyDocumentArgs;
+     * import com.pulumi.vault.Policy;
+     * import com.pulumi.vault.PolicyArgs;
+     * 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 example = VaultFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
+     *             .rules(GetPolicyDocumentRuleArgs.builder()
+     *                 .path("secret/*")
+     *                 .capabilities(                
+     *                     "create",
+     *                     "read",
+     *                     "update",
+     *                     "delete",
+     *                     "list")
+     *                 .description("allow all on secrets")
+     *                 .build())
+     *             .build());
+     * 
+     *         var examplePolicy = new Policy("examplePolicy", PolicyArgs.builder()
+     *             .name("example_policy")
+     *             .policy(example.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.hcl()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getPolicyDocument(GetPolicyDocumentArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getPolicyDocument:getPolicyDocument", TypeShape.of(GetPolicyDocumentResult.class), args, Utilities.withVersion(options)); + } /** * This is a data source which can be used to construct a HCL representation of an Vault policy document, for use with resources which expect policy documents, such as the `vault.Policy` resource. * @@ -2383,6 +2777,45 @@ public static CompletableFuture getRaftAutopilotSta public static Output getRaftAutopilotState(GetRaftAutopilotStateArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:index/getRaftAutopilotState:getRaftAutopilotState", TypeShape.of(GetRaftAutopilotStateResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.VaultFunctions;
+     * import com.pulumi.vault.inputs.GetRaftAutopilotStateArgs;
+     * 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 main = VaultFunctions.getRaftAutopilotState();
+     * 
+     *         ctx.export("failure-tolerance", main.applyValue(getRaftAutopilotStateResult -> getRaftAutopilotStateResult.failureTolerance()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getRaftAutopilotState(GetRaftAutopilotStateArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:index/getRaftAutopilotState:getRaftAutopilotState", TypeShape.of(GetRaftAutopilotStateResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/ad/AdFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/ad/AdFunctions.java index 07e32765f..162ca4556 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/ad/AdFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/ad/AdFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.ad.inputs.GetAccessCredentialsArgs; import com.pulumi.vault.ad.inputs.GetAccessCredentialsPlainArgs; @@ -35,6 +36,13 @@ public static CompletableFuture getAccessCredentials public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:ad/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + */ + public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:ad/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/appRole/AppRoleFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/appRole/AppRoleFunctions.java index 2a8da2ed8..d48f496b9 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/appRole/AppRoleFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/appRole/AppRoleFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.appRole.inputs.GetAuthBackendRoleIdArgs; import com.pulumi.vault.appRole.inputs.GetAuthBackendRoleIdPlainArgs; @@ -146,6 +147,50 @@ public static CompletableFuture getAuthBackendRoleId public static Output getAuthBackendRoleId(GetAuthBackendRoleIdArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", TypeShape.of(GetAuthBackendRoleIdResult.class), args, Utilities.withVersion(options)); } + /** + * Reads the Role ID of an AppRole from a Vault server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.appRole.AppRoleFunctions;
+     * import com.pulumi.vault.appRole.inputs.GetAuthBackendRoleIdArgs;
+     * 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 role = AppRoleFunctions.getAuthBackendRoleId(GetAuthBackendRoleIdArgs.builder()
+     *             .backend("my-approle-backend")
+     *             .roleName("my-role")
+     *             .build());
+     * 
+     *         ctx.export("role-id", role.applyValue(getAuthBackendRoleIdResult -> getAuthBackendRoleIdResult.roleId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getAuthBackendRoleId(GetAuthBackendRoleIdArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:appRole/getAuthBackendRoleId:getAuthBackendRoleId", TypeShape.of(GetAuthBackendRoleIdResult.class), args, Utilities.withVersion(options)); + } /** * Reads the Role ID of an AppRole from a Vault server. * diff --git a/sdk/java/src/main/java/com/pulumi/vault/aws/AwsFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/aws/AwsFunctions.java index 61b4d8234..3c0f93e60 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/aws/AwsFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/aws/AwsFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.aws.inputs.GetAccessCredentialsArgs; import com.pulumi.vault.aws.inputs.GetAccessCredentialsPlainArgs; @@ -47,6 +48,16 @@ public static CompletableFuture getAccessCredentials public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:aws/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + * <!--End PulumiCodeChooser --> + * + */ + public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:aws/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -66,6 +77,9 @@ public static CompletableFuture getStaticAcces public static Output getStaticAccessCredentials(GetStaticAccessCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", TypeShape.of(GetStaticAccessCredentialsResult.class), args, Utilities.withVersion(options)); } + public static Output getStaticAccessCredentials(GetStaticAccessCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", TypeShape.of(GetStaticAccessCredentialsResult.class), args, Utilities.withVersion(options)); + } public static CompletableFuture getStaticAccessCredentialsPlain(GetStaticAccessCredentialsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("vault:aws/getStaticAccessCredentials:getStaticAccessCredentials", TypeShape.of(GetStaticAccessCredentialsResult.class), args, Utilities.withVersion(options)); } diff --git a/sdk/java/src/main/java/com/pulumi/vault/azure/AzureFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/azure/AzureFunctions.java index 68d4cbbe5..6dca9fdd2 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/azure/AzureFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/azure/AzureFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.azure.inputs.GetAccessCredentialsArgs; import com.pulumi.vault.azure.inputs.GetAccessCredentialsPlainArgs; @@ -164,6 +165,56 @@ public static CompletableFuture getAccessCredentials public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:azure/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.azure.AzureFunctions;
+     * import com.pulumi.vault.azure.inputs.GetAccessCredentialsArgs;
+     * 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 creds = AzureFunctions.getAccessCredentials(GetAccessCredentialsArgs.builder()
+     *             .role("my-role")
+     *             .validateCreds(true)
+     *             .numSequentialSuccesses(8)
+     *             .numSecondsBetweenTests(1)
+     *             .maxCredValidationSeconds(300)
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Caveats + * + * The `validate_creds` option requires read-access to the `backend` config endpoint. + * If the effective Vault role does not have the required permissions then valid values + * are required to be set for: `subscription_id`, `tenant_id`, `environment`. + * + */ + public static Output getAccessCredentials(GetAccessCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:azure/getAccessCredentials:getAccessCredentials", TypeShape.of(GetAccessCredentialsResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/gcp/GcpFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/gcp/GcpFunctions.java index 52e22df1b..75383a025 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/gcp/GcpFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/gcp/GcpFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.gcp.inputs.GetAuthBackendRoleArgs; import com.pulumi.vault.gcp.inputs.GetAuthBackendRolePlainArgs; @@ -146,6 +147,50 @@ public static CompletableFuture getAuthBackendRolePlai public static Output getAuthBackendRole(GetAuthBackendRoleArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:gcp/getAuthBackendRole:getAuthBackendRole", TypeShape.of(GetAuthBackendRoleResult.class), args, Utilities.withVersion(options)); } + /** + * Reads a GCP auth role from a Vault server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.gcp.GcpFunctions;
+     * import com.pulumi.vault.gcp.inputs.GetAuthBackendRoleArgs;
+     * 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 role = GcpFunctions.getAuthBackendRole(GetAuthBackendRoleArgs.builder()
+     *             .backend("my-gcp-backend")
+     *             .roleName("my-role")
+     *             .build());
+     * 
+     *         ctx.export("role-id", role.applyValue(getAuthBackendRoleResult -> getAuthBackendRoleResult.roleId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getAuthBackendRole(GetAuthBackendRoleArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:gcp/getAuthBackendRole:getAuthBackendRole", TypeShape.of(GetAuthBackendRoleResult.class), args, Utilities.withVersion(options)); + } /** * Reads a GCP auth role from a Vault server. * diff --git a/sdk/java/src/main/java/com/pulumi/vault/generic/GenericFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/generic/GenericFunctions.java index 3d91629b4..7df2ce432 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/generic/GenericFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/generic/GenericFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.generic.inputs.GetSecretArgs; import com.pulumi.vault.generic.inputs.GetSecretPlainArgs; @@ -173,6 +174,59 @@ public static CompletableFuture getSecretPlain(GetSecretPlainAr public static Output getSecret(GetSecretArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:generic/getSecret:getSecret", TypeShape.of(GetSecretResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * ### Generic secret + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.generic.GenericFunctions;
+     * import com.pulumi.vault.generic.inputs.GetSecretArgs;
+     * 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 rundeckAuth = GenericFunctions.getSecret(GetSecretArgs.builder()
+     *             .path("secret/rundeck_auth")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### KV + * + * For this example, consider `example` as a path for a KV engine. + * + * <!--Start PulumiCodeChooser --> + * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecret(GetSecretArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:generic/getSecret:getSecret", TypeShape.of(GetSecretResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/identity/IdentityFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/identity/IdentityFunctions.java index 0f59f9006..91565d93d 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/identity/IdentityFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/identity/IdentityFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.identity.inputs.GetEntityArgs; import com.pulumi.vault.identity.inputs.GetEntityPlainArgs; @@ -246,6 +247,50 @@ public static CompletableFuture getEntityPlain(GetEntityPlainAr public static Output getEntity(GetEntityArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:identity/getEntity:getEntity", TypeShape.of(GetEntityResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.identity.IdentityFunctions;
+     * import com.pulumi.vault.identity.inputs.GetEntityArgs;
+     * 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 entity = IdentityFunctions.getEntity(GetEntityArgs.builder()
+     *             .entityName("entity_12345")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `update` capability on `/identity/lookup/entity`. + * + */ + public static Output getEntity(GetEntityArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:identity/getEntity:getEntity", TypeShape.of(GetEntityResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -510,6 +555,50 @@ public static CompletableFuture getGroupPlain(GetGroupPlainArgs public static Output getGroup(GetGroupArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:identity/getGroup:getGroup", TypeShape.of(GetGroupResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.identity.IdentityFunctions;
+     * import com.pulumi.vault.identity.inputs.GetGroupArgs;
+     * 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 group = IdentityFunctions.getGroup(GetGroupArgs.builder()
+     *             .groupName("user")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `create` capability on `/identity/lookup/group`. + * + */ + public static Output getGroup(GetGroupArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:identity/getGroup:getGroup", TypeShape.of(GetGroupResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -710,6 +799,58 @@ public static CompletableFuture getOidcClientCredsPlai public static Output getOidcClientCreds(GetOidcClientCredsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:identity/getOidcClientCreds:getOidcClientCreds", TypeShape.of(GetOidcClientCredsResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.identity.OidcClient;
+     * import com.pulumi.vault.identity.OidcClientArgs;
+     * import com.pulumi.vault.identity.IdentityFunctions;
+     * import com.pulumi.vault.identity.inputs.GetOidcClientCredsArgs;
+     * 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) {
+     *         var app = new OidcClient("app", OidcClientArgs.builder()
+     *             .name("application")
+     *             .redirectUris(            
+     *                 "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
+     *                 "http://127.0.0.1:8251/callback",
+     *                 "http://127.0.0.1:8080/callback")
+     *             .idTokenTtl(2400)
+     *             .accessTokenTtl(7200)
+     *             .build());
+     * 
+     *         final var creds = IdentityFunctions.getOidcClientCreds(GetOidcClientCredsArgs.builder()
+     *             .name(app.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOidcClientCreds(GetOidcClientCredsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:identity/getOidcClientCreds:getOidcClientCreds", TypeShape.of(GetOidcClientCredsResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -969,6 +1110,75 @@ public static CompletableFuture getOidcOpenidConfigPl public static Output getOidcOpenidConfig(GetOidcOpenidConfigArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", TypeShape.of(GetOidcOpenidConfigResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.identity.OidcKey;
+     * import com.pulumi.vault.identity.OidcKeyArgs;
+     * import com.pulumi.vault.identity.OidcClient;
+     * import com.pulumi.vault.identity.OidcClientArgs;
+     * import com.pulumi.vault.identity.OidcProvider;
+     * import com.pulumi.vault.identity.OidcProviderArgs;
+     * import com.pulumi.vault.identity.IdentityFunctions;
+     * import com.pulumi.vault.identity.inputs.GetOidcOpenidConfigArgs;
+     * 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) {
+     *         var key = new OidcKey("key", OidcKeyArgs.builder()
+     *             .name("key")
+     *             .allowedClientIds("*")
+     *             .rotationPeriod(3600)
+     *             .verificationTtl(3600)
+     *             .build());
+     * 
+     *         var app = new OidcClient("app", OidcClientArgs.builder()
+     *             .name("application")
+     *             .key(key.name())
+     *             .redirectUris(            
+     *                 "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
+     *                 "http://127.0.0.1:8251/callback",
+     *                 "http://127.0.0.1:8080/callback")
+     *             .idTokenTtl(2400)
+     *             .accessTokenTtl(7200)
+     *             .build());
+     * 
+     *         var provider = new OidcProvider("provider", OidcProviderArgs.builder()
+     *             .name("provider")
+     *             .allowedClientIds(test.clientId())
+     *             .build());
+     * 
+     *         final var config = IdentityFunctions.getOidcOpenidConfig(GetOidcOpenidConfigArgs.builder()
+     *             .name(provider.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOidcOpenidConfig(GetOidcOpenidConfigArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:identity/getOidcOpenidConfig:getOidcOpenidConfig", TypeShape.of(GetOidcOpenidConfigResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1245,6 +1455,75 @@ public static CompletableFuture getOidcPublicKeysPlain( public static Output getOidcPublicKeys(GetOidcPublicKeysArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:identity/getOidcPublicKeys:getOidcPublicKeys", TypeShape.of(GetOidcPublicKeysResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.identity.OidcKey;
+     * import com.pulumi.vault.identity.OidcKeyArgs;
+     * import com.pulumi.vault.identity.OidcClient;
+     * import com.pulumi.vault.identity.OidcClientArgs;
+     * import com.pulumi.vault.identity.OidcProvider;
+     * import com.pulumi.vault.identity.OidcProviderArgs;
+     * import com.pulumi.vault.identity.IdentityFunctions;
+     * import com.pulumi.vault.identity.inputs.GetOidcPublicKeysArgs;
+     * 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) {
+     *         var key = new OidcKey("key", OidcKeyArgs.builder()
+     *             .name("key")
+     *             .allowedClientIds("*")
+     *             .rotationPeriod(3600)
+     *             .verificationTtl(3600)
+     *             .build());
+     * 
+     *         var app = new OidcClient("app", OidcClientArgs.builder()
+     *             .name("application")
+     *             .key(key.name())
+     *             .redirectUris(            
+     *                 "http://127.0.0.1:9200/v1/auth-methods/oidc:authenticate:callback",
+     *                 "http://127.0.0.1:8251/callback",
+     *                 "http://127.0.0.1:8080/callback")
+     *             .idTokenTtl(2400)
+     *             .accessTokenTtl(7200)
+     *             .build());
+     * 
+     *         var provider = new OidcProvider("provider", OidcProviderArgs.builder()
+     *             .name("provider")
+     *             .allowedClientIds(test.clientId())
+     *             .build());
+     * 
+     *         final var publicKeys = IdentityFunctions.getOidcPublicKeys(GetOidcPublicKeysArgs.builder()
+     *             .name(provider.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getOidcPublicKeys(GetOidcPublicKeysArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:identity/getOidcPublicKeys:getOidcPublicKeys", TypeShape.of(GetOidcPublicKeysResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/kubernetes/KubernetesFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/kubernetes/KubernetesFunctions.java index b5ed92866..0c4e090d7 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/kubernetes/KubernetesFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/kubernetes/KubernetesFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.kubernetes.inputs.GetAuthBackendConfigArgs; import com.pulumi.vault.kubernetes.inputs.GetAuthBackendConfigPlainArgs; @@ -65,6 +66,15 @@ public static CompletableFuture getAuthBackendConfig public static Output getAuthBackendConfig(GetAuthBackendConfigArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", TypeShape.of(GetAuthBackendConfigResult.class), args, Utilities.withVersion(options)); } + /** + * Reads the Role of an Kubernetes from a Vault server. See the [Vault + * documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-config) for more + * information. + * + */ + public static Output getAuthBackendConfig(GetAuthBackendConfigArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kubernetes/getAuthBackendConfig:getAuthBackendConfig", TypeShape.of(GetAuthBackendConfigResult.class), args, Utilities.withVersion(options)); + } /** * Reads the Role of an Kubernetes from a Vault server. See the [Vault * documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-config) for more @@ -101,6 +111,15 @@ public static CompletableFuture getAuthBackendRolePlai public static Output getAuthBackendRole(GetAuthBackendRoleArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", TypeShape.of(GetAuthBackendRoleResult.class), args, Utilities.withVersion(options)); } + /** + * Reads the Role of an Kubernetes from a Vault server. See the [Vault + * documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-role) for more + * information. + * + */ + public static Output getAuthBackendRole(GetAuthBackendRoleArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kubernetes/getAuthBackendRole:getAuthBackendRole", TypeShape.of(GetAuthBackendRoleResult.class), args, Utilities.withVersion(options)); + } /** * Reads the Role of an Kubernetes from a Vault server. See the [Vault * documentation](https://www.vaultproject.io/api-docs/auth/kubernetes#read-role) for more @@ -344,6 +363,84 @@ public static CompletableFuture getServiceAccountT public static Output getServiceAccountToken(GetServiceAccountTokenArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", TypeShape.of(GetServiceAccountTokenResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.kubernetes.SecretBackend;
+     * import com.pulumi.vault.kubernetes.SecretBackendArgs;
+     * import com.pulumi.vault.kubernetes.SecretBackendRole;
+     * import com.pulumi.vault.kubernetes.SecretBackendRoleArgs;
+     * import com.pulumi.vault.kubernetes.KubernetesFunctions;
+     * import com.pulumi.vault.kubernetes.inputs.GetServiceAccountTokenArgs;
+     * 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) {
+     *         var config = new SecretBackend("config", SecretBackendArgs.builder()
+     *             .path("kubernetes")
+     *             .description("kubernetes secrets engine description")
+     *             .kubernetesHost("https://127.0.0.1:61233")
+     *             .kubernetesCaCert(StdFunctions.file(FileArgs.builder()
+     *                 .input("/path/to/cert")
+     *                 .build()).result())
+     *             .serviceAccountJwt(StdFunctions.file(FileArgs.builder()
+     *                 .input("/path/to/token")
+     *                 .build()).result())
+     *             .disableLocalCaJwt(false)
+     *             .build());
+     * 
+     *         var role = new SecretBackendRole("role", SecretBackendRoleArgs.builder()
+     *             .backend(config.path())
+     *             .name("service-account-name-role")
+     *             .allowedKubernetesNamespaces("*")
+     *             .tokenMaxTtl(43200)
+     *             .tokenDefaultTtl(21600)
+     *             .serviceAccountName("test-service-account-with-generated-token")
+     *             .extraLabels(Map.ofEntries(
+     *                 Map.entry("id", "abc123"),
+     *                 Map.entry("name", "some_name")
+     *             ))
+     *             .extraAnnotations(Map.ofEntries(
+     *                 Map.entry("env", "development"),
+     *                 Map.entry("location", "earth")
+     *             ))
+     *             .build());
+     * 
+     *         final var token = KubernetesFunctions.getServiceAccountToken(GetServiceAccountTokenArgs.builder()
+     *             .backend(config.path())
+     *             .role(role.name())
+     *             .kubernetesNamespace("test")
+     *             .clusterRoleBinding(false)
+     *             .ttl("1h")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getServiceAccountToken(GetServiceAccountTokenArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kubernetes/getServiceAccountToken:getServiceAccountToken", TypeShape.of(GetServiceAccountTokenResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/kv/KvFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/kv/KvFunctions.java index 8ce90821a..96e2fc2ef 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/kv/KvFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/kv/KvFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.kv.inputs.GetSecretArgs; import com.pulumi.vault.kv.inputs.GetSecretPlainArgs; @@ -221,6 +222,71 @@ public static CompletableFuture getSecretPlain(GetSecretPlainAr public static Output getSecret(GetSecretArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kv/getSecret:getSecret", TypeShape.of(GetSecretResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.kv.Secret;
+     * import com.pulumi.vault.kv.SecretArgs;
+     * import com.pulumi.vault.kv.KvFunctions;
+     * import com.pulumi.vault.kv.inputs.GetSecretArgs;
+     * import static com.pulumi.codegen.internal.Serialization.*;
+     * 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) {
+     *         var kvv1 = new Mount("kvv1", MountArgs.builder()
+     *             .path("kvv1")
+     *             .type("kv")
+     *             .options(Map.of("version", "1"))
+     *             .description("KV Version 1 secret engine mount")
+     *             .build());
+     * 
+     *         var secret = new Secret("secret", SecretArgs.builder()
+     *             .path(kvv1.path().applyValue(path -> String.format("%s/secret", path)))
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("zip", "zap"),
+     *                     jsonProperty("foo", "bar")
+     *                 )))
+     *             .build());
+     * 
+     *         final var secretData = KvFunctions.getSecret(GetSecretArgs.builder()
+     *             .path(secret.path())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecret(GetSecretArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kv/getSecret:getSecret", TypeShape.of(GetSecretResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -487,6 +553,73 @@ public static CompletableFuture getSecretSubkeysV2Plai public static Output getSecretSubkeysV2(GetSecretSubkeysV2Args args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", TypeShape.of(GetSecretSubkeysV2Result.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.kv.SecretV2;
+     * import com.pulumi.vault.kv.SecretV2Args;
+     * import com.pulumi.vault.kv.KvFunctions;
+     * import com.pulumi.vault.kv.inputs.GetSecretSubkeysV2Args;
+     * import static com.pulumi.codegen.internal.Serialization.*;
+     * 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) {
+     *         var kvv2 = new Mount("kvv2", MountArgs.builder()
+     *             .path("kvv2")
+     *             .type("kv")
+     *             .options(Map.of("version", "2"))
+     *             .description("KV Version 2 secret engine mount")
+     *             .build());
+     * 
+     *         var awsSecret = new SecretV2("awsSecret", SecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name("aws_secret")
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("zip", "zap"),
+     *                     jsonProperty("foo", "bar")
+     *                 )))
+     *             .build());
+     * 
+     *         final var test = KvFunctions.getSecretSubkeysV2(GetSecretSubkeysV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name(awsSecret.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecretSubkeysV2(GetSecretSubkeysV2Args args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kv/getSecretSubkeysV2:getSecretSubkeysV2", TypeShape.of(GetSecretSubkeysV2Result.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -758,6 +891,74 @@ public static CompletableFuture getSecretV2Plain(GetSecretV2P public static Output getSecretV2(GetSecretV2Args args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kv/getSecretV2:getSecretV2", TypeShape.of(GetSecretV2Result.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.kv.SecretV2;
+     * import com.pulumi.vault.kv.SecretV2Args;
+     * import com.pulumi.vault.kv.KvFunctions;
+     * import com.pulumi.vault.kv.inputs.GetSecretV2Args;
+     * import static com.pulumi.codegen.internal.Serialization.*;
+     * 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) {
+     *         var kvv2 = new Mount("kvv2", MountArgs.builder()
+     *             .path("kvv2")
+     *             .type("kv")
+     *             .options(Map.of("version", "2"))
+     *             .description("KV Version 2 secret engine mount")
+     *             .build());
+     * 
+     *         var exampleSecretV2 = new SecretV2("exampleSecretV2", SecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name("secret")
+     *             .deleteAllVersions(true)
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("zip", "zap"),
+     *                     jsonProperty("foo", "bar")
+     *                 )))
+     *             .build());
+     * 
+     *         final var example = KvFunctions.getSecretV2(GetSecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name(exampleSecretV2.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecretV2(GetSecretV2Args args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kv/getSecretV2:getSecretV2", TypeShape.of(GetSecretV2Result.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1042,6 +1243,78 @@ public static CompletableFuture getSecretsListPlain(GetSec public static Output getSecretsList(GetSecretsListArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kv/getSecretsList:getSecretsList", TypeShape.of(GetSecretsListResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.kv.Secret;
+     * import com.pulumi.vault.kv.SecretArgs;
+     * import com.pulumi.vault.kv.KvFunctions;
+     * import com.pulumi.vault.kv.inputs.GetSecretsListArgs;
+     * import static com.pulumi.codegen.internal.Serialization.*;
+     * 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) {
+     *         var kvv1 = new Mount("kvv1", MountArgs.builder()
+     *             .path("kvv1")
+     *             .type("kv")
+     *             .options(Map.of("version", "1"))
+     *             .description("KV Version 1 secret engine mount")
+     *             .build());
+     * 
+     *         var awsSecret = new Secret("awsSecret", SecretArgs.builder()
+     *             .path(kvv1.path().applyValue(path -> String.format("%s/aws-secret", path)))
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("zip", "zap")
+     *                 )))
+     *             .build());
+     * 
+     *         var azureSecret = new Secret("azureSecret", SecretArgs.builder()
+     *             .path(kvv1.path().applyValue(path -> String.format("%s/azure-secret", path)))
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("foo", "bar")
+     *                 )))
+     *             .build());
+     * 
+     *         final var secrets = KvFunctions.getSecretsList(GetSecretsListArgs.builder()
+     *             .path(kvv1.path())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecretsList(GetSecretsListArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kv/getSecretsList:getSecretsList", TypeShape.of(GetSecretsListResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1378,6 +1651,94 @@ public static CompletableFuture getSecretsListV2Plain(Ge public static Output getSecretsListV2(GetSecretsListV2Args args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:kv/getSecretsListV2:getSecretsListV2", TypeShape.of(GetSecretsListV2Result.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.kv.SecretV2;
+     * import com.pulumi.vault.kv.SecretV2Args;
+     * import com.pulumi.vault.kv.KvFunctions;
+     * import com.pulumi.vault.kv.inputs.GetSecretsListV2Args;
+     * import static com.pulumi.codegen.internal.Serialization.*;
+     * 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) {
+     *         var kvv2 = new Mount("kvv2", MountArgs.builder()
+     *             .path("kvv2")
+     *             .type("kv")
+     *             .options(Map.of("version", "2"))
+     *             .description("KV Version 2 secret engine mount")
+     *             .build());
+     * 
+     *         var awsSecret = new SecretV2("awsSecret", SecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name("aws_secret")
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("zip", "zap")
+     *                 )))
+     *             .build());
+     * 
+     *         var azureSecret = new SecretV2("azureSecret", SecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name("azure_secret")
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("foo", "bar")
+     *                 )))
+     *             .build());
+     * 
+     *         var nestedSecret = new SecretV2("nestedSecret", SecretV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name(azureSecret.name().applyValue(name -> String.format("%s/dev", name)))
+     *             .dataJson(serializeJson(
+     *                 jsonObject(
+     *                     jsonProperty("password", "test")
+     *                 )))
+     *             .build());
+     * 
+     *         final var secrets = KvFunctions.getSecretsListV2(GetSecretsListV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .build());
+     * 
+     *         final var nestedSecrets = KvFunctions.getSecretsListV2(GetSecretsListV2Args.builder()
+     *             .mount(kvv2.path())
+     *             .name(test2.name())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ## Required Vault Capabilities + * + * Use of this resource requires the `read` capability on the given path. + * + */ + public static Output getSecretsListV2(GetSecretsListV2Args args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:kv/getSecretsListV2:getSecretsListV2", TypeShape.of(GetSecretsListV2Result.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/ldap/LdapFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/ldap/LdapFunctions.java index 1ea6c6da5..24dd66f02 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/ldap/LdapFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/ldap/LdapFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.ldap.inputs.GetDynamicCredentialsArgs; import com.pulumi.vault.ldap.inputs.GetDynamicCredentialsPlainArgs; @@ -26,6 +27,9 @@ public static CompletableFuture getDynamicCredentia public static Output getDynamicCredentials(GetDynamicCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:ldap/getDynamicCredentials:getDynamicCredentials", TypeShape.of(GetDynamicCredentialsResult.class), args, Utilities.withVersion(options)); } + public static Output getDynamicCredentials(GetDynamicCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:ldap/getDynamicCredentials:getDynamicCredentials", TypeShape.of(GetDynamicCredentialsResult.class), args, Utilities.withVersion(options)); + } public static CompletableFuture getDynamicCredentialsPlain(GetDynamicCredentialsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("vault:ldap/getDynamicCredentials:getDynamicCredentials", TypeShape.of(GetDynamicCredentialsResult.class), args, Utilities.withVersion(options)); } @@ -38,6 +42,9 @@ public static CompletableFuture getStaticCredentials public static Output getStaticCredentials(GetStaticCredentialsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:ldap/getStaticCredentials:getStaticCredentials", TypeShape.of(GetStaticCredentialsResult.class), args, Utilities.withVersion(options)); } + public static Output getStaticCredentials(GetStaticCredentialsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:ldap/getStaticCredentials:getStaticCredentials", TypeShape.of(GetStaticCredentialsResult.class), args, Utilities.withVersion(options)); + } public static CompletableFuture getStaticCredentialsPlain(GetStaticCredentialsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("vault:ldap/getStaticCredentials:getStaticCredentials", TypeShape.of(GetStaticCredentialsResult.class), args, Utilities.withVersion(options)); } diff --git a/sdk/java/src/main/java/com/pulumi/vault/pkiSecret/PkiSecretFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/pkiSecret/PkiSecretFunctions.java index f95d1e018..9bf2c726f 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/pkiSecret/PkiSecretFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/pkiSecret/PkiSecretFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.pkiSecret.inputs.GetBackendConfigEstArgs; import com.pulumi.vault.pkiSecret.inputs.GetBackendConfigEstPlainArgs; @@ -170,6 +171,54 @@ public static CompletableFuture getBackendConfigEstPl public static Output getBackendConfigEst(GetBackendConfigEstArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", TypeShape.of(GetBackendConfigEstResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.pkiSecret.PkiSecretFunctions;
+     * import com.pulumi.vault.pkiSecret.inputs.GetBackendConfigEstArgs;
+     * 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) {
+     *         var pki = new Mount("pki", MountArgs.builder()
+     *             .path("pki")
+     *             .type("pki")
+     *             .description("PKI secret engine mount")
+     *             .build());
+     * 
+     *         final var estConfig = PkiSecretFunctions.getBackendConfigEst(GetBackendConfigEstArgs.builder()
+     *             .backend(pki.path())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getBackendConfigEst(GetBackendConfigEstArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:pkiSecret/getBackendConfigEst:getBackendConfigEst", TypeShape.of(GetBackendConfigEstResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -395,6 +444,65 @@ public static CompletableFuture getBackendIssuerPlain(Ge public static Output getBackendIssuer(GetBackendIssuerArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:pkiSecret/getBackendIssuer:getBackendIssuer", TypeShape.of(GetBackendIssuerResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCert;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCertArgs;
+     * import com.pulumi.vault.pkiSecret.PkiSecretFunctions;
+     * import com.pulumi.vault.pkiSecret.inputs.GetBackendIssuerArgs;
+     * 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) {
+     *         var pki = new Mount("pki", MountArgs.builder()
+     *             .path("pki")
+     *             .type("pki")
+     *             .description("PKI secret engine mount")
+     *             .build());
+     * 
+     *         var root = new SecretBackendRootCert("root", SecretBackendRootCertArgs.builder()
+     *             .backend(pki.path())
+     *             .type("internal")
+     *             .commonName("example")
+     *             .ttl("86400")
+     *             .issuerName("example")
+     *             .build());
+     * 
+     *         final var example = PkiSecretFunctions.getBackendIssuer(GetBackendIssuerArgs.builder()
+     *             .backend(root.path())
+     *             .issuerRef(root.issuerId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getBackendIssuer(GetBackendIssuerArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:pkiSecret/getBackendIssuer:getBackendIssuer", TypeShape.of(GetBackendIssuerResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -628,6 +736,64 @@ public static CompletableFuture getBackendIssuersPlain( public static Output getBackendIssuers(GetBackendIssuersArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:pkiSecret/getBackendIssuers:getBackendIssuers", TypeShape.of(GetBackendIssuersResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCert;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCertArgs;
+     * import com.pulumi.vault.pkiSecret.PkiSecretFunctions;
+     * import com.pulumi.vault.pkiSecret.inputs.GetBackendIssuersArgs;
+     * 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) {
+     *         var pki = new Mount("pki", MountArgs.builder()
+     *             .path("pki")
+     *             .type("pki")
+     *             .description("PKI secret engine mount")
+     *             .build());
+     * 
+     *         var root = new SecretBackendRootCert("root", SecretBackendRootCertArgs.builder()
+     *             .backend(pki.path())
+     *             .type("internal")
+     *             .commonName("example")
+     *             .ttl("86400")
+     *             .issuerName("example")
+     *             .build());
+     * 
+     *         final var test = PkiSecretFunctions.getBackendIssuers(GetBackendIssuersArgs.builder()
+     *             .backend(root.backend())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getBackendIssuers(GetBackendIssuersArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:pkiSecret/getBackendIssuers:getBackendIssuers", TypeShape.of(GetBackendIssuersResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -863,6 +1029,65 @@ public static CompletableFuture getBackendKeyPlain(GetBacke public static Output getBackendKey(GetBackendKeyArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:pkiSecret/getBackendKey:getBackendKey", TypeShape.of(GetBackendKeyResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.pkiSecret.SecretBackendKey;
+     * import com.pulumi.vault.pkiSecret.SecretBackendKeyArgs;
+     * import com.pulumi.vault.pkiSecret.PkiSecretFunctions;
+     * import com.pulumi.vault.pkiSecret.inputs.GetBackendKeyArgs;
+     * 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) {
+     *         var pki = new Mount("pki", MountArgs.builder()
+     *             .path("pki")
+     *             .type("pki")
+     *             .description("PKI secret engine mount")
+     *             .build());
+     * 
+     *         var key = new SecretBackendKey("key", SecretBackendKeyArgs.builder()
+     *             .backend(pki.path())
+     *             .type("internal")
+     *             .keyName("example")
+     *             .keyType("rsa")
+     *             .keyBits("4096")
+     *             .build());
+     * 
+     *         final var example = PkiSecretFunctions.getBackendKey(GetBackendKeyArgs.builder()
+     *             .backend(keyVaultMount.path())
+     *             .keyRef(key.keyId())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getBackendKey(GetBackendKeyArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:pkiSecret/getBackendKey:getBackendKey", TypeShape.of(GetBackendKeyResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * @@ -1096,6 +1321,64 @@ public static CompletableFuture getBackendKeysPlain(GetBac public static Output getBackendKeys(GetBackendKeysArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:pkiSecret/getBackendKeys:getBackendKeys", TypeShape.of(GetBackendKeysResult.class), args, Utilities.withVersion(options)); } + /** + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCert;
+     * import com.pulumi.vault.pkiSecret.SecretBackendRootCertArgs;
+     * import com.pulumi.vault.pkiSecret.PkiSecretFunctions;
+     * import com.pulumi.vault.pkiSecret.inputs.GetBackendKeysArgs;
+     * 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) {
+     *         var pki = new Mount("pki", MountArgs.builder()
+     *             .path("pki")
+     *             .type("pki")
+     *             .description("PKI secret engine mount")
+     *             .build());
+     * 
+     *         var root = new SecretBackendRootCert("root", SecretBackendRootCertArgs.builder()
+     *             .backend(pki.path())
+     *             .type("internal")
+     *             .commonName("example")
+     *             .ttl("86400")
+     *             .keyName("example")
+     *             .build());
+     * 
+     *         final var example = PkiSecretFunctions.getBackendKeys(GetBackendKeysArgs.builder()
+     *             .backend(root.backend())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getBackendKeys(GetBackendKeysArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:pkiSecret/getBackendKeys:getBackendKeys", TypeShape.of(GetBackendKeysResult.class), args, Utilities.withVersion(options)); + } /** * ## Example Usage * diff --git a/sdk/java/src/main/java/com/pulumi/vault/transform/TransformFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/transform/TransformFunctions.java index 7c949d2c5..eb0976866 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/transform/TransformFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/transform/TransformFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.transform.inputs.GetDecodeArgs; import com.pulumi.vault.transform.inputs.GetDecodePlainArgs; @@ -233,6 +234,78 @@ public static CompletableFuture getDecodePlain(GetDecodePlainAr public static Output getDecode(GetDecodeArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:transform/getDecode:getDecode", TypeShape.of(GetDecodeResult.class), args, Utilities.withVersion(options)); } + /** + * This data source supports the "/transform/decode/{role_name}" Vault endpoint. + * + * It decodes the provided value using a named role. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.transform.Transformation;
+     * import com.pulumi.vault.transform.TransformationArgs;
+     * import com.pulumi.vault.transform.Role;
+     * import com.pulumi.vault.transform.RoleArgs;
+     * import com.pulumi.vault.transform.TransformFunctions;
+     * import com.pulumi.vault.transform.inputs.GetDecodeArgs;
+     * 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) {
+     *         var transform = new Mount("transform", MountArgs.builder()
+     *             .path("transform")
+     *             .type("transform")
+     *             .build());
+     * 
+     *         var ccn_fpe = new Transformation("ccn-fpe", TransformationArgs.builder()
+     *             .path(transform.path())
+     *             .name("ccn-fpe")
+     *             .type("fpe")
+     *             .template("builtin/creditcardnumber")
+     *             .tweakSource("internal")
+     *             .allowedRoles("payments")
+     *             .build());
+     * 
+     *         var payments = new Role("payments", RoleArgs.builder()
+     *             .path(ccn_fpe.path())
+     *             .name("payments")
+     *             .transformations("ccn-fpe")
+     *             .build());
+     * 
+     *         final var test = TransformFunctions.getDecode(GetDecodeArgs.builder()
+     *             .path(payments.path())
+     *             .roleName("payments")
+     *             .value("9300-3376-4943-8903")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getDecode(GetDecodeArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:transform/getDecode:getDecode", TypeShape.of(GetDecodeResult.class), args, Utilities.withVersion(options)); + } /** * This data source supports the "/transform/decode/{role_name}" Vault endpoint. * @@ -521,6 +594,78 @@ public static CompletableFuture getEncodePlain(GetEncodePlainAr public static Output getEncode(GetEncodeArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:transform/getEncode:getEncode", TypeShape.of(GetEncodeResult.class), args, Utilities.withVersion(options)); } + /** + * This data source supports the "/transform/encode/{role_name}" Vault endpoint. + * + * It encodes the provided value using a named role. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.Mount;
+     * import com.pulumi.vault.MountArgs;
+     * import com.pulumi.vault.transform.Transformation;
+     * import com.pulumi.vault.transform.TransformationArgs;
+     * import com.pulumi.vault.transform.Role;
+     * import com.pulumi.vault.transform.RoleArgs;
+     * import com.pulumi.vault.transform.TransformFunctions;
+     * import com.pulumi.vault.transform.inputs.GetEncodeArgs;
+     * 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) {
+     *         var transform = new Mount("transform", MountArgs.builder()
+     *             .path("transform")
+     *             .type("transform")
+     *             .build());
+     * 
+     *         var ccn_fpe = new Transformation("ccn-fpe", TransformationArgs.builder()
+     *             .path(transform.path())
+     *             .name("ccn-fpe")
+     *             .type("fpe")
+     *             .template("builtin/creditcardnumber")
+     *             .tweakSource("internal")
+     *             .allowedRoles("payments")
+     *             .build());
+     * 
+     *         var payments = new Role("payments", RoleArgs.builder()
+     *             .path(ccn_fpe.path())
+     *             .name("payments")
+     *             .transformations("ccn-fpe")
+     *             .build());
+     * 
+     *         final var test = TransformFunctions.getEncode(GetEncodeArgs.builder()
+     *             .path(payments.path())
+     *             .roleName("payments")
+     *             .batchInputs(Map.of("value", "1111-2222-3333-4444"))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getEncode(GetEncodeArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:transform/getEncode:getEncode", TypeShape.of(GetEncodeResult.class), args, Utilities.withVersion(options)); + } /** * This data source supports the "/transform/encode/{role_name}" Vault endpoint. * diff --git a/sdk/java/src/main/java/com/pulumi/vault/transit/TransitFunctions.java b/sdk/java/src/main/java/com/pulumi/vault/transit/TransitFunctions.java index be96d7b7b..d4113a169 100644 --- a/sdk/java/src/main/java/com/pulumi/vault/transit/TransitFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vault/transit/TransitFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.vault.Utilities; import com.pulumi.vault.transit.inputs.GetDecryptArgs; import com.pulumi.vault.transit.inputs.GetDecryptPlainArgs; @@ -149,6 +150,50 @@ public static CompletableFuture getDecryptPlain(GetDecryptPlai public static Output getDecrypt(GetDecryptArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:transit/getDecrypt:getDecrypt", TypeShape.of(GetDecryptResult.class), args, Utilities.withVersion(options)); } + /** + * This is a data source which can be used to decrypt ciphertext using a Vault Transit key. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vault.transit.TransitFunctions;
+     * import com.pulumi.vault.transit.inputs.GetDecryptArgs;
+     * 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 test = TransitFunctions.getDecrypt(GetDecryptArgs.builder()
+     *             .backend("transit")
+     *             .key("test")
+     *             .ciphertext("vault:v1:S3GtnJ5GUNCWV+/pdL9+g1Feu/nzAv+RlmTmE91Tu0rBkeIU8MEb2nSspC/1IQ==")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getDecrypt(GetDecryptArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:transit/getDecrypt:getDecrypt", TypeShape.of(GetDecryptResult.class), args, Utilities.withVersion(options)); + } /** * This is a data source which can be used to decrypt ciphertext using a Vault Transit key. * @@ -214,6 +259,13 @@ public static CompletableFuture getEncryptPlain(GetEncryptPlai public static Output getEncrypt(GetEncryptArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vault:transit/getEncrypt:getEncrypt", TypeShape.of(GetEncryptResult.class), args, Utilities.withVersion(options)); } + /** + * This is a data source which can be used to encrypt plaintext using a Vault Transit key. + * + */ + public static Output getEncrypt(GetEncryptArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vault:transit/getEncrypt:getEncrypt", TypeShape.of(GetEncryptResult.class), args, Utilities.withVersion(options)); + } /** * This is a data source which can be used to encrypt plaintext using a Vault Transit key. * diff --git a/sdk/nodejs/getNamespaces.ts b/sdk/nodejs/getNamespaces.ts index 5391c1a13..61e365885 100644 --- a/sdk/nodejs/getNamespaces.ts +++ b/sdk/nodejs/getNamespaces.ts @@ -27,7 +27,7 @@ import * as utilities from "./utilities"; * const children = vault.getNamespaces({ * namespace: "parent", * }); - * const child = .reduce((__obj, [, ]) => ({ ...__obj, [__key]: vault.getNamespace({ + * const child = .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: vault.getNamespace({ * namespace: _arg0_.namespace, * path: __key, * }) })); @@ -90,7 +90,7 @@ export interface GetNamespacesResult { * const children = vault.getNamespaces({ * namespace: "parent", * }); - * const child = .reduce((__obj, [, ]) => ({ ...__obj, [__key]: vault.getNamespace({ + * const child = .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: vault.getNamespace({ * namespace: _arg0_.namespace, * path: __key, * }) })); diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 76cb23bac..baf0047a1 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -13,7 +13,7 @@ "build": "tsc" }, "dependencies": { - "@pulumi/pulumi": "^3.136.0" + "@pulumi/pulumi": "^3.142.0" }, "devDependencies": { "@types/mime": "^2.0.0", diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 8865fb031..20587f82d 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "pulumi_vault" description = "A Pulumi package for creating and managing HashiCorp Vault cloud resources." - dependencies = ["parver>=0.2.1", "pulumi>=3.136.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] + dependencies = ["parver>=0.2.1", "pulumi>=3.142.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] keywords = ["pulumi", "vault"] readme = "README.md" - requires-python = ">=3.8" + requires-python = ">=3.9" version = "6.0.0a0+dev" [project.license] text = "Apache-2.0"