HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security
hcp.getConsulAgentKubernetesSecret
Explore with Pulumi AI
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security
The agent config Kubernetes secret data source provides Consul agents running in Kubernetes the configuration needed to connect to the Consul cluster.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Hcp = Pulumi.Hcp;
return await Deployment.RunAsync(() =>
{
var test = Hcp.GetConsulAgentKubernetesSecret.Invoke(new()
{
ClusterId = @var.Cluster_id,
});
});
package main
import (
"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hcp.GetConsulAgentKubernetesSecret(ctx, &GetConsulAgentKubernetesSecretArgs{
ClusterId: _var.Cluster_id,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcp.HcpFunctions;
import com.pulumi.hcp.inputs.GetConsulAgentKubernetesSecretArgs;
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 = HcpFunctions.getConsulAgentKubernetesSecret(GetConsulAgentKubernetesSecretArgs.builder()
.clusterId(var_.cluster_id())
.build());
}
}
import pulumi
import pulumi_hcp as hcp
test = hcp.get_consul_agent_kubernetes_secret(cluster_id=var["cluster_id"])
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";
const test = hcp.getConsulAgentKubernetesSecret({
clusterId: _var.cluster_id,
});
variables:
test:
Fn::Invoke:
Function: hcp:getConsulAgentKubernetesSecret
Arguments:
clusterId: ${var.cluster_id}
Using getConsulAgentKubernetesSecret
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConsulAgentKubernetesSecret(args: GetConsulAgentKubernetesSecretArgs, opts?: InvokeOptions): Promise<GetConsulAgentKubernetesSecretResult>
function getConsulAgentKubernetesSecretOutput(args: GetConsulAgentKubernetesSecretOutputArgs, opts?: InvokeOptions): Output<GetConsulAgentKubernetesSecretResult>
def get_consul_agent_kubernetes_secret(cluster_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConsulAgentKubernetesSecretResult
def get_consul_agent_kubernetes_secret_output(cluster_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConsulAgentKubernetesSecretResult]
func GetConsulAgentKubernetesSecret(ctx *Context, args *GetConsulAgentKubernetesSecretArgs, opts ...InvokeOption) (*GetConsulAgentKubernetesSecretResult, error)
func GetConsulAgentKubernetesSecretOutput(ctx *Context, args *GetConsulAgentKubernetesSecretOutputArgs, opts ...InvokeOption) GetConsulAgentKubernetesSecretResultOutput
> Note: This function is named GetConsulAgentKubernetesSecret
in the Go SDK.
public static class GetConsulAgentKubernetesSecret
{
public static Task<GetConsulAgentKubernetesSecretResult> InvokeAsync(GetConsulAgentKubernetesSecretArgs args, InvokeOptions? opts = null)
public static Output<GetConsulAgentKubernetesSecretResult> Invoke(GetConsulAgentKubernetesSecretInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConsulAgentKubernetesSecretResult> getConsulAgentKubernetesSecret(GetConsulAgentKubernetesSecretArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: hcp:index/getConsulAgentKubernetesSecret:getConsulAgentKubernetesSecret
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Id string - The ID of the HCP Consul cluster.
- Cluster
Id string - The ID of the HCP Consul cluster.
- cluster
Id String - The ID of the HCP Consul cluster.
- cluster
Id string - The ID of the HCP Consul cluster.
- cluster_
id str - The ID of the HCP Consul cluster.
- cluster
Id String - The ID of the HCP Consul cluster.
getConsulAgentKubernetesSecret Result
The following output properties are available:
- cluster_
id str - The ID of the HCP Consul cluster.
- id str
- The provider-assigned unique ID for this managed resource.
- secret str
- The Consul agent configuration in the format of a Kubernetes secret (YAML).
Package Details
- Repository
- hcp grapl-security/pulumi-hcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcp
Terraform Provider.
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security