HCP

Community
Package contributed by a community member
v0.1.11 published on Monday, Jul 25, 2022 by Grapl Security

getConsulAgentKubernetesSecret

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 Pulumi;
using Hcp = Pulumi.Hcp;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Hcp.GetConsulAgentKubernetesSecret.InvokeAsync(new Hcp.GetConsulAgentKubernetesSecretArgs
        {
            ClusterId = @var.Cluster_id,
        }));
    }

}
package main

import (
	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/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:

ClusterId string
ClusterId string
clusterId String
clusterId string
clusterId String

getConsulAgentKubernetesSecret Result

The following output properties are available:

ClusterId string
Id string

The provider-assigned unique ID for this managed resource.

Secret string
ClusterId string
Id string

The provider-assigned unique ID for this managed resource.

Secret string
clusterId String
id String

The provider-assigned unique ID for this managed resource.

secret String
clusterId string
id string

The provider-assigned unique ID for this managed resource.

secret string
cluster_id str
id str

The provider-assigned unique ID for this managed resource.

secret str
clusterId String
id String

The provider-assigned unique ID for this managed resource.

secret String

Package Details

Repository
https://github.com/grapl-security/pulumi-hcp
License
Apache-2.0
Notes

This Pulumi package is based on the hcp Terraform Provider.