github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lb/trustStore.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package lb
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a ELBv2 Trust Store for use with Application Load Balancer Listener resources.
    16  //
    17  // ## Example Usage
    18  //
    19  // ## Import
    20  //
    21  // Using `pulumi import`, import Target Groups using their ARN. For example:
    22  //
    23  // ```sh
    24  // $ pulumi import aws:lb/trustStore:TrustStore example arn:aws:elasticloadbalancing:us-west-2:187416307283:truststore/my-trust-store/20cfe21448b66314
    25  // ```
    26  type TrustStore struct {
    27  	pulumi.CustomResourceState
    28  
    29  	// ARN of the Trust Store (matches `id`).
    30  	Arn pulumi.StringOutput `pulumi:"arn"`
    31  	// ARN suffix for use with CloudWatch Metrics.
    32  	ArnSuffix pulumi.StringOutput `pulumi:"arnSuffix"`
    33  	// S3 Bucket name holding the client certificate CA bundle.
    34  	CaCertificatesBundleS3Bucket pulumi.StringOutput `pulumi:"caCertificatesBundleS3Bucket"`
    35  	// S3 object key holding the client certificate CA bundle.
    36  	CaCertificatesBundleS3Key pulumi.StringOutput `pulumi:"caCertificatesBundleS3Key"`
    37  	// Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
    38  	CaCertificatesBundleS3ObjectVersion pulumi.StringPtrOutput `pulumi:"caCertificatesBundleS3ObjectVersion"`
    39  	// Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
    40  	Name pulumi.StringOutput `pulumi:"name"`
    41  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
    42  	NamePrefix pulumi.StringOutput `pulumi:"namePrefix"`
    43  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    44  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    45  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    46  	//
    47  	// Deprecated: Please use `tags` instead.
    48  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    49  }
    50  
    51  // NewTrustStore registers a new resource with the given unique name, arguments, and options.
    52  func NewTrustStore(ctx *pulumi.Context,
    53  	name string, args *TrustStoreArgs, opts ...pulumi.ResourceOption) (*TrustStore, error) {
    54  	if args == nil {
    55  		return nil, errors.New("missing one or more required arguments")
    56  	}
    57  
    58  	if args.CaCertificatesBundleS3Bucket == nil {
    59  		return nil, errors.New("invalid value for required argument 'CaCertificatesBundleS3Bucket'")
    60  	}
    61  	if args.CaCertificatesBundleS3Key == nil {
    62  		return nil, errors.New("invalid value for required argument 'CaCertificatesBundleS3Key'")
    63  	}
    64  	opts = internal.PkgResourceDefaultOpts(opts)
    65  	var resource TrustStore
    66  	err := ctx.RegisterResource("aws:lb/trustStore:TrustStore", name, args, &resource, opts...)
    67  	if err != nil {
    68  		return nil, err
    69  	}
    70  	return &resource, nil
    71  }
    72  
    73  // GetTrustStore gets an existing TrustStore resource's state with the given name, ID, and optional
    74  // state properties that are used to uniquely qualify the lookup (nil if not required).
    75  func GetTrustStore(ctx *pulumi.Context,
    76  	name string, id pulumi.IDInput, state *TrustStoreState, opts ...pulumi.ResourceOption) (*TrustStore, error) {
    77  	var resource TrustStore
    78  	err := ctx.ReadResource("aws:lb/trustStore:TrustStore", name, id, state, &resource, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return &resource, nil
    83  }
    84  
    85  // Input properties used for looking up and filtering TrustStore resources.
    86  type trustStoreState struct {
    87  	// ARN of the Trust Store (matches `id`).
    88  	Arn *string `pulumi:"arn"`
    89  	// ARN suffix for use with CloudWatch Metrics.
    90  	ArnSuffix *string `pulumi:"arnSuffix"`
    91  	// S3 Bucket name holding the client certificate CA bundle.
    92  	CaCertificatesBundleS3Bucket *string `pulumi:"caCertificatesBundleS3Bucket"`
    93  	// S3 object key holding the client certificate CA bundle.
    94  	CaCertificatesBundleS3Key *string `pulumi:"caCertificatesBundleS3Key"`
    95  	// Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
    96  	CaCertificatesBundleS3ObjectVersion *string `pulumi:"caCertificatesBundleS3ObjectVersion"`
    97  	// Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
    98  	Name *string `pulumi:"name"`
    99  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
   100  	NamePrefix *string `pulumi:"namePrefix"`
   101  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   102  	Tags map[string]string `pulumi:"tags"`
   103  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   104  	//
   105  	// Deprecated: Please use `tags` instead.
   106  	TagsAll map[string]string `pulumi:"tagsAll"`
   107  }
   108  
   109  type TrustStoreState struct {
   110  	// ARN of the Trust Store (matches `id`).
   111  	Arn pulumi.StringPtrInput
   112  	// ARN suffix for use with CloudWatch Metrics.
   113  	ArnSuffix pulumi.StringPtrInput
   114  	// S3 Bucket name holding the client certificate CA bundle.
   115  	CaCertificatesBundleS3Bucket pulumi.StringPtrInput
   116  	// S3 object key holding the client certificate CA bundle.
   117  	CaCertificatesBundleS3Key pulumi.StringPtrInput
   118  	// Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
   119  	CaCertificatesBundleS3ObjectVersion pulumi.StringPtrInput
   120  	// Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
   121  	Name pulumi.StringPtrInput
   122  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
   123  	NamePrefix pulumi.StringPtrInput
   124  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   125  	Tags pulumi.StringMapInput
   126  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   127  	//
   128  	// Deprecated: Please use `tags` instead.
   129  	TagsAll pulumi.StringMapInput
   130  }
   131  
   132  func (TrustStoreState) ElementType() reflect.Type {
   133  	return reflect.TypeOf((*trustStoreState)(nil)).Elem()
   134  }
   135  
   136  type trustStoreArgs struct {
   137  	// S3 Bucket name holding the client certificate CA bundle.
   138  	CaCertificatesBundleS3Bucket string `pulumi:"caCertificatesBundleS3Bucket"`
   139  	// S3 object key holding the client certificate CA bundle.
   140  	CaCertificatesBundleS3Key string `pulumi:"caCertificatesBundleS3Key"`
   141  	// Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
   142  	CaCertificatesBundleS3ObjectVersion *string `pulumi:"caCertificatesBundleS3ObjectVersion"`
   143  	// Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
   144  	Name *string `pulumi:"name"`
   145  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
   146  	NamePrefix *string `pulumi:"namePrefix"`
   147  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   148  	Tags map[string]string `pulumi:"tags"`
   149  }
   150  
   151  // The set of arguments for constructing a TrustStore resource.
   152  type TrustStoreArgs struct {
   153  	// S3 Bucket name holding the client certificate CA bundle.
   154  	CaCertificatesBundleS3Bucket pulumi.StringInput
   155  	// S3 object key holding the client certificate CA bundle.
   156  	CaCertificatesBundleS3Key pulumi.StringInput
   157  	// Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
   158  	CaCertificatesBundleS3ObjectVersion pulumi.StringPtrInput
   159  	// Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
   160  	Name pulumi.StringPtrInput
   161  	// Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
   162  	NamePrefix pulumi.StringPtrInput
   163  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   164  	Tags pulumi.StringMapInput
   165  }
   166  
   167  func (TrustStoreArgs) ElementType() reflect.Type {
   168  	return reflect.TypeOf((*trustStoreArgs)(nil)).Elem()
   169  }
   170  
   171  type TrustStoreInput interface {
   172  	pulumi.Input
   173  
   174  	ToTrustStoreOutput() TrustStoreOutput
   175  	ToTrustStoreOutputWithContext(ctx context.Context) TrustStoreOutput
   176  }
   177  
   178  func (*TrustStore) ElementType() reflect.Type {
   179  	return reflect.TypeOf((**TrustStore)(nil)).Elem()
   180  }
   181  
   182  func (i *TrustStore) ToTrustStoreOutput() TrustStoreOutput {
   183  	return i.ToTrustStoreOutputWithContext(context.Background())
   184  }
   185  
   186  func (i *TrustStore) ToTrustStoreOutputWithContext(ctx context.Context) TrustStoreOutput {
   187  	return pulumi.ToOutputWithContext(ctx, i).(TrustStoreOutput)
   188  }
   189  
   190  // TrustStoreArrayInput is an input type that accepts TrustStoreArray and TrustStoreArrayOutput values.
   191  // You can construct a concrete instance of `TrustStoreArrayInput` via:
   192  //
   193  //	TrustStoreArray{ TrustStoreArgs{...} }
   194  type TrustStoreArrayInput interface {
   195  	pulumi.Input
   196  
   197  	ToTrustStoreArrayOutput() TrustStoreArrayOutput
   198  	ToTrustStoreArrayOutputWithContext(context.Context) TrustStoreArrayOutput
   199  }
   200  
   201  type TrustStoreArray []TrustStoreInput
   202  
   203  func (TrustStoreArray) ElementType() reflect.Type {
   204  	return reflect.TypeOf((*[]*TrustStore)(nil)).Elem()
   205  }
   206  
   207  func (i TrustStoreArray) ToTrustStoreArrayOutput() TrustStoreArrayOutput {
   208  	return i.ToTrustStoreArrayOutputWithContext(context.Background())
   209  }
   210  
   211  func (i TrustStoreArray) ToTrustStoreArrayOutputWithContext(ctx context.Context) TrustStoreArrayOutput {
   212  	return pulumi.ToOutputWithContext(ctx, i).(TrustStoreArrayOutput)
   213  }
   214  
   215  // TrustStoreMapInput is an input type that accepts TrustStoreMap and TrustStoreMapOutput values.
   216  // You can construct a concrete instance of `TrustStoreMapInput` via:
   217  //
   218  //	TrustStoreMap{ "key": TrustStoreArgs{...} }
   219  type TrustStoreMapInput interface {
   220  	pulumi.Input
   221  
   222  	ToTrustStoreMapOutput() TrustStoreMapOutput
   223  	ToTrustStoreMapOutputWithContext(context.Context) TrustStoreMapOutput
   224  }
   225  
   226  type TrustStoreMap map[string]TrustStoreInput
   227  
   228  func (TrustStoreMap) ElementType() reflect.Type {
   229  	return reflect.TypeOf((*map[string]*TrustStore)(nil)).Elem()
   230  }
   231  
   232  func (i TrustStoreMap) ToTrustStoreMapOutput() TrustStoreMapOutput {
   233  	return i.ToTrustStoreMapOutputWithContext(context.Background())
   234  }
   235  
   236  func (i TrustStoreMap) ToTrustStoreMapOutputWithContext(ctx context.Context) TrustStoreMapOutput {
   237  	return pulumi.ToOutputWithContext(ctx, i).(TrustStoreMapOutput)
   238  }
   239  
   240  type TrustStoreOutput struct{ *pulumi.OutputState }
   241  
   242  func (TrustStoreOutput) ElementType() reflect.Type {
   243  	return reflect.TypeOf((**TrustStore)(nil)).Elem()
   244  }
   245  
   246  func (o TrustStoreOutput) ToTrustStoreOutput() TrustStoreOutput {
   247  	return o
   248  }
   249  
   250  func (o TrustStoreOutput) ToTrustStoreOutputWithContext(ctx context.Context) TrustStoreOutput {
   251  	return o
   252  }
   253  
   254  // ARN of the Trust Store (matches `id`).
   255  func (o TrustStoreOutput) Arn() pulumi.StringOutput {
   256  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   257  }
   258  
   259  // ARN suffix for use with CloudWatch Metrics.
   260  func (o TrustStoreOutput) ArnSuffix() pulumi.StringOutput {
   261  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.ArnSuffix }).(pulumi.StringOutput)
   262  }
   263  
   264  // S3 Bucket name holding the client certificate CA bundle.
   265  func (o TrustStoreOutput) CaCertificatesBundleS3Bucket() pulumi.StringOutput {
   266  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.CaCertificatesBundleS3Bucket }).(pulumi.StringOutput)
   267  }
   268  
   269  // S3 object key holding the client certificate CA bundle.
   270  func (o TrustStoreOutput) CaCertificatesBundleS3Key() pulumi.StringOutput {
   271  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.CaCertificatesBundleS3Key }).(pulumi.StringOutput)
   272  }
   273  
   274  // Version Id of CA bundle S3 bucket object, if versioned, defaults to latest if omitted.
   275  func (o TrustStoreOutput) CaCertificatesBundleS3ObjectVersion() pulumi.StringPtrOutput {
   276  	return o.ApplyT(func(v *TrustStore) pulumi.StringPtrOutput { return v.CaCertificatesBundleS3ObjectVersion }).(pulumi.StringPtrOutput)
   277  }
   278  
   279  // Name of the Trust Store. If omitted, the provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
   280  func (o TrustStoreOutput) Name() pulumi.StringOutput {
   281  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   282  }
   283  
   284  // Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
   285  func (o TrustStoreOutput) NamePrefix() pulumi.StringOutput {
   286  	return o.ApplyT(func(v *TrustStore) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput)
   287  }
   288  
   289  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   290  func (o TrustStoreOutput) Tags() pulumi.StringMapOutput {
   291  	return o.ApplyT(func(v *TrustStore) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   292  }
   293  
   294  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   295  //
   296  // Deprecated: Please use `tags` instead.
   297  func (o TrustStoreOutput) TagsAll() pulumi.StringMapOutput {
   298  	return o.ApplyT(func(v *TrustStore) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   299  }
   300  
   301  type TrustStoreArrayOutput struct{ *pulumi.OutputState }
   302  
   303  func (TrustStoreArrayOutput) ElementType() reflect.Type {
   304  	return reflect.TypeOf((*[]*TrustStore)(nil)).Elem()
   305  }
   306  
   307  func (o TrustStoreArrayOutput) ToTrustStoreArrayOutput() TrustStoreArrayOutput {
   308  	return o
   309  }
   310  
   311  func (o TrustStoreArrayOutput) ToTrustStoreArrayOutputWithContext(ctx context.Context) TrustStoreArrayOutput {
   312  	return o
   313  }
   314  
   315  func (o TrustStoreArrayOutput) Index(i pulumi.IntInput) TrustStoreOutput {
   316  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrustStore {
   317  		return vs[0].([]*TrustStore)[vs[1].(int)]
   318  	}).(TrustStoreOutput)
   319  }
   320  
   321  type TrustStoreMapOutput struct{ *pulumi.OutputState }
   322  
   323  func (TrustStoreMapOutput) ElementType() reflect.Type {
   324  	return reflect.TypeOf((*map[string]*TrustStore)(nil)).Elem()
   325  }
   326  
   327  func (o TrustStoreMapOutput) ToTrustStoreMapOutput() TrustStoreMapOutput {
   328  	return o
   329  }
   330  
   331  func (o TrustStoreMapOutput) ToTrustStoreMapOutputWithContext(ctx context.Context) TrustStoreMapOutput {
   332  	return o
   333  }
   334  
   335  func (o TrustStoreMapOutput) MapIndex(k pulumi.StringInput) TrustStoreOutput {
   336  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrustStore {
   337  		return vs[0].(map[string]*TrustStore)[vs[1].(string)]
   338  	}).(TrustStoreOutput)
   339  }
   340  
   341  func init() {
   342  	pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreInput)(nil)).Elem(), &TrustStore{})
   343  	pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreArrayInput)(nil)).Elem(), TrustStoreArray{})
   344  	pulumi.RegisterInputType(reflect.TypeOf((*TrustStoreMapInput)(nil)).Elem(), TrustStoreMap{})
   345  	pulumi.RegisterOutputType(TrustStoreOutput{})
   346  	pulumi.RegisterOutputType(TrustStoreArrayOutput{})
   347  	pulumi.RegisterOutputType(TrustStoreMapOutput{})
   348  }