getTrustStore function

Future<GetTrustStoreResult> getTrustStore(
  1. GetTrustStoreArgs args, {
  2. InvokeOptions? options,
})

Provides information about a Load Balancer Trust Store.

This data source can prove useful when a module accepts an LB Trust Store as an input variable and needs to know its attributes. It can also be used to get the ARN of an LB Trust Store for use in other resources, given LB Trust Store name.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const lbTsArn = config.get("lbTsArn") || "";
const lbTsName = config.get("lbTsName") || "";
const test = aws.lb.getTrustStore({
    arn: lbTsArn,
    name: lbTsName,
});
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
lb_ts_arn = config.get("lbTsArn")
if lb_ts_arn is None:
    lb_ts_arn = ""
lb_ts_name = config.get("lbTsName")
if lb_ts_name is None:
    lb_ts_name = ""
test = aws.lb.get_trust_store(arn=lb_ts_arn,
    name=lb_ts_name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var config = new Config();
    var lbTsArn = config.Get("lbTsArn") ?? "";
    var lbTsName = config.Get("lbTsName") ?? "";
    var test = Aws.LB.GetTrustStore.Invoke(new()
    {
        Arn = lbTsArn,
        Name = lbTsName,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		lbTsArn := ""
		if param := cfg.Get("lbTsArn"); param != "" {
			lbTsArn = param
		}
		lbTsName := ""
		if param := cfg.Get("lbTsName"); param != "" {
			lbTsName = param
		}
		_, err := lb.LookupTrustStore(ctx, &lb.LookupTrustStoreArgs{
			Arn:  pulumi.StringRef(lbTsArn),
			Name: pulumi.StringRef(lbTsName),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_lb_gettruststore" "test" {
  arn  = var.lbTsArn
  name = var.lbTsName
}

variable "lbTsArn" {
  type    = string
  default = ""
}
variable "lbTsName" {
  type    = string
  default = ""
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.LbFunctions;
import com.pulumi.aws.lb.inputs.GetTrustStoreArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 config = ctx.config();
        final var lbTsArn = config.get("lbTsArn").orElse("");
        final var lbTsName = config.get("lbTsName").orElse("");
        final var test = LbFunctions.getTrustStore(GetTrustStoreArgs.builder()
            .arn(lbTsArn)
            .name(lbTsName)
            .build());

    }
}
configuration:
  lbTsArn:
    type: string
    default: ""
  lbTsName:
    type: string
    default: ""
variables:
  test:
    fn::invoke:
      function: aws:lb:getTrustStore
      arguments:
        arn: ${lbTsArn}
        name: ${lbTsName}

args Arguments passed to this invoke. Arguments for getTrustStore. options Invoke options controlling this call.

Implementation

Future<GetTrustStoreResult> getTrustStore(
  GetTrustStoreArgs args, {
  pulumi.InvokeOptions? options,
}) async {
  final deployment = pulumi.Deployment.instance;
  final result = await deployment.invoke<Map<String, dynamic>>(
    'aws:lb/getTrustStore:getTrustStore',
    args.toMap(),
    options: pulumi.toDeploymentInvokeOptions(options),
  );
  return GetTrustStoreResult.fromMap(result);
}