acm

package
v2.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	pulumi.CustomResourceState

	// The ARN of the certificate
	Arn pulumi.StringOutput `pulumi:"arn"`
	// ARN of an ACMPCA
	CertificateAuthorityArn pulumi.StringPtrOutput `pulumi:"certificateAuthorityArn"`
	// The certificate's PEM-formatted public key
	CertificateBody pulumi.StringPtrOutput `pulumi:"certificateBody"`
	// The certificate's PEM-formatted chain
	// * Creating a private CA issued certificate
	CertificateChain pulumi.StringPtrOutput `pulumi:"certificateChain"`
	// A domain name for which the certificate should be issued
	DomainName pulumi.StringOutput `pulumi:"domainName"`
	// A list of attributes to feed into other resources to complete certificate validation. Can have more than one element, e.g. if SANs are defined. Only set if `DNS`-validation was used.
	DomainValidationOptions CertificateDomainValidationOptionArrayOutput `pulumi:"domainValidationOptions"`
	// Configuration block used to set certificate options. Detailed below.
	// * Importing an existing certificate
	Options CertificateOptionsPtrOutput `pulumi:"options"`
	// The certificate's PEM-formatted private key
	PrivateKey pulumi.StringPtrOutput `pulumi:"privateKey"`
	// Status of the certificate.
	Status pulumi.StringOutput `pulumi:"status"`
	// A list of domains that should be SANs in the issued certificate. To remove all elements of a previously configured list, set this value equal to an empty list (`[]`).
	SubjectAlternativeNames pulumi.StringArrayOutput `pulumi:"subjectAlternativeNames"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A list of addresses that received a validation E-Mail. Only set if `EMAIL`-validation was used.
	ValidationEmails pulumi.StringArrayOutput `pulumi:"validationEmails"`
	// Which method to use for validation. `DNS` or `EMAIL` are valid, `NONE` can be used for certificates that were imported into ACM and then into state managed by this provider.
	ValidationMethod pulumi.StringOutput `pulumi:"validationMethod"`
}

The ACM certificate resource allows requesting and management of certificates from the Amazon Certificate Manager.

It deals with requesting certificates and managing their attributes and life-cycle. This resource does not deal with validation of a certificate but can provide inputs for other resources implementing the validation. It does not wait for a certificate to be issued. Use a `acm.CertificateValidation` resource for this.

Most commonly, this resource is used together with `route53.Record` and `acm.CertificateValidation` to request a DNS validated certificate, deploy the required validation records and wait for validation to complete.

Domain validation through E-Mail is also supported but should be avoided as it requires a manual step outside of this provider.

It's recommended to specify `createBeforeDestroy = true` in a [lifecycle](https://www.terraform.io/docs/configuration/resources.html#lifecycle) block to replace a certificate which is currently in use (eg, by `lb.Listener`).

## Example Usage

### Certificate creation

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/acm"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cert, err := acm.NewCertificate(ctx, "cert", &acm.CertificateArgs{
			DomainName: pulumi.String("example.com"),
			Tags: map[string]interface{}{
				"Environment": "test",
			},
			ValidationMethod: pulumi.String("DNS"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetCertificate

func GetCertificate(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error)

GetCertificate gets an existing Certificate resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewCertificate

func NewCertificate(ctx *pulumi.Context,
	name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error)

NewCertificate registers a new resource with the given unique name, arguments, and options.

type CertificateArgs

type CertificateArgs struct {
	// ARN of an ACMPCA
	CertificateAuthorityArn pulumi.StringPtrInput
	// The certificate's PEM-formatted public key
	CertificateBody pulumi.StringPtrInput
	// The certificate's PEM-formatted chain
	// * Creating a private CA issued certificate
	CertificateChain pulumi.StringPtrInput
	// A domain name for which the certificate should be issued
	DomainName pulumi.StringPtrInput
	// Configuration block used to set certificate options. Detailed below.
	// * Importing an existing certificate
	Options CertificateOptionsPtrInput
	// The certificate's PEM-formatted private key
	PrivateKey pulumi.StringPtrInput
	// A list of domains that should be SANs in the issued certificate. To remove all elements of a previously configured list, set this value equal to an empty list (`[]`).
	SubjectAlternativeNames pulumi.StringArrayInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Which method to use for validation. `DNS` or `EMAIL` are valid, `NONE` can be used for certificates that were imported into ACM and then into state managed by this provider.
	ValidationMethod pulumi.StringPtrInput
}

The set of arguments for constructing a Certificate resource.

func (CertificateArgs) ElementType

func (CertificateArgs) ElementType() reflect.Type

type CertificateDomainValidationOption

type CertificateDomainValidationOption struct {
	// A domain name for which the certificate should be issued
	DomainName *string `pulumi:"domainName"`
	// The name of the DNS record to create to validate the certificate
	ResourceRecordName *string `pulumi:"resourceRecordName"`
	// The type of DNS record to create
	ResourceRecordType *string `pulumi:"resourceRecordType"`
	// The value the DNS record needs to have
	ResourceRecordValue *string `pulumi:"resourceRecordValue"`
}

type CertificateDomainValidationOptionArgs

type CertificateDomainValidationOptionArgs struct {
	// A domain name for which the certificate should be issued
	DomainName pulumi.StringPtrInput `pulumi:"domainName"`
	// The name of the DNS record to create to validate the certificate
	ResourceRecordName pulumi.StringPtrInput `pulumi:"resourceRecordName"`
	// The type of DNS record to create
	ResourceRecordType pulumi.StringPtrInput `pulumi:"resourceRecordType"`
	// The value the DNS record needs to have
	ResourceRecordValue pulumi.StringPtrInput `pulumi:"resourceRecordValue"`
}

func (CertificateDomainValidationOptionArgs) ElementType

func (CertificateDomainValidationOptionArgs) ToCertificateDomainValidationOptionOutput

func (i CertificateDomainValidationOptionArgs) ToCertificateDomainValidationOptionOutput() CertificateDomainValidationOptionOutput

func (CertificateDomainValidationOptionArgs) ToCertificateDomainValidationOptionOutputWithContext

func (i CertificateDomainValidationOptionArgs) ToCertificateDomainValidationOptionOutputWithContext(ctx context.Context) CertificateDomainValidationOptionOutput

type CertificateDomainValidationOptionArray

type CertificateDomainValidationOptionArray []CertificateDomainValidationOptionInput

func (CertificateDomainValidationOptionArray) ElementType

func (CertificateDomainValidationOptionArray) ToCertificateDomainValidationOptionArrayOutput

func (i CertificateDomainValidationOptionArray) ToCertificateDomainValidationOptionArrayOutput() CertificateDomainValidationOptionArrayOutput

func (CertificateDomainValidationOptionArray) ToCertificateDomainValidationOptionArrayOutputWithContext

func (i CertificateDomainValidationOptionArray) ToCertificateDomainValidationOptionArrayOutputWithContext(ctx context.Context) CertificateDomainValidationOptionArrayOutput

type CertificateDomainValidationOptionArrayInput

type CertificateDomainValidationOptionArrayInput interface {
	pulumi.Input

	ToCertificateDomainValidationOptionArrayOutput() CertificateDomainValidationOptionArrayOutput
	ToCertificateDomainValidationOptionArrayOutputWithContext(context.Context) CertificateDomainValidationOptionArrayOutput
}

CertificateDomainValidationOptionArrayInput is an input type that accepts CertificateDomainValidationOptionArray and CertificateDomainValidationOptionArrayOutput values. You can construct a concrete instance of `CertificateDomainValidationOptionArrayInput` via:

CertificateDomainValidationOptionArray{ CertificateDomainValidationOptionArgs{...} }

type CertificateDomainValidationOptionArrayOutput

type CertificateDomainValidationOptionArrayOutput struct{ *pulumi.OutputState }

func (CertificateDomainValidationOptionArrayOutput) ElementType

func (CertificateDomainValidationOptionArrayOutput) Index

func (CertificateDomainValidationOptionArrayOutput) ToCertificateDomainValidationOptionArrayOutput

func (o CertificateDomainValidationOptionArrayOutput) ToCertificateDomainValidationOptionArrayOutput() CertificateDomainValidationOptionArrayOutput

func (CertificateDomainValidationOptionArrayOutput) ToCertificateDomainValidationOptionArrayOutputWithContext

func (o CertificateDomainValidationOptionArrayOutput) ToCertificateDomainValidationOptionArrayOutputWithContext(ctx context.Context) CertificateDomainValidationOptionArrayOutput

type CertificateDomainValidationOptionInput

type CertificateDomainValidationOptionInput interface {
	pulumi.Input

	ToCertificateDomainValidationOptionOutput() CertificateDomainValidationOptionOutput
	ToCertificateDomainValidationOptionOutputWithContext(context.Context) CertificateDomainValidationOptionOutput
}

CertificateDomainValidationOptionInput is an input type that accepts CertificateDomainValidationOptionArgs and CertificateDomainValidationOptionOutput values. You can construct a concrete instance of `CertificateDomainValidationOptionInput` via:

CertificateDomainValidationOptionArgs{...}

type CertificateDomainValidationOptionOutput

type CertificateDomainValidationOptionOutput struct{ *pulumi.OutputState }

func (CertificateDomainValidationOptionOutput) DomainName

A domain name for which the certificate should be issued

func (CertificateDomainValidationOptionOutput) ElementType

func (CertificateDomainValidationOptionOutput) ResourceRecordName

The name of the DNS record to create to validate the certificate

func (CertificateDomainValidationOptionOutput) ResourceRecordType

The type of DNS record to create

func (CertificateDomainValidationOptionOutput) ResourceRecordValue

The value the DNS record needs to have

func (CertificateDomainValidationOptionOutput) ToCertificateDomainValidationOptionOutput

func (o CertificateDomainValidationOptionOutput) ToCertificateDomainValidationOptionOutput() CertificateDomainValidationOptionOutput

func (CertificateDomainValidationOptionOutput) ToCertificateDomainValidationOptionOutputWithContext

func (o CertificateDomainValidationOptionOutput) ToCertificateDomainValidationOptionOutputWithContext(ctx context.Context) CertificateDomainValidationOptionOutput

type CertificateOptions

type CertificateOptions struct {
	// Specifies whether certificate details should be added to a certificate transparency log. Valid values are `ENABLED` or `DISABLED`. See https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency for more details.
	CertificateTransparencyLoggingPreference *string `pulumi:"certificateTransparencyLoggingPreference"`
}

type CertificateOptionsArgs

type CertificateOptionsArgs struct {
	// Specifies whether certificate details should be added to a certificate transparency log. Valid values are `ENABLED` or `DISABLED`. See https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency for more details.
	CertificateTransparencyLoggingPreference pulumi.StringPtrInput `pulumi:"certificateTransparencyLoggingPreference"`
}

func (CertificateOptionsArgs) ElementType

func (CertificateOptionsArgs) ElementType() reflect.Type

func (CertificateOptionsArgs) ToCertificateOptionsOutput

func (i CertificateOptionsArgs) ToCertificateOptionsOutput() CertificateOptionsOutput

func (CertificateOptionsArgs) ToCertificateOptionsOutputWithContext

func (i CertificateOptionsArgs) ToCertificateOptionsOutputWithContext(ctx context.Context) CertificateOptionsOutput

func (CertificateOptionsArgs) ToCertificateOptionsPtrOutput

func (i CertificateOptionsArgs) ToCertificateOptionsPtrOutput() CertificateOptionsPtrOutput

func (CertificateOptionsArgs) ToCertificateOptionsPtrOutputWithContext

func (i CertificateOptionsArgs) ToCertificateOptionsPtrOutputWithContext(ctx context.Context) CertificateOptionsPtrOutput

type CertificateOptionsInput

type CertificateOptionsInput interface {
	pulumi.Input

	ToCertificateOptionsOutput() CertificateOptionsOutput
	ToCertificateOptionsOutputWithContext(context.Context) CertificateOptionsOutput
}

CertificateOptionsInput is an input type that accepts CertificateOptionsArgs and CertificateOptionsOutput values. You can construct a concrete instance of `CertificateOptionsInput` via:

CertificateOptionsArgs{...}

type CertificateOptionsOutput

type CertificateOptionsOutput struct{ *pulumi.OutputState }

func (CertificateOptionsOutput) CertificateTransparencyLoggingPreference

func (o CertificateOptionsOutput) CertificateTransparencyLoggingPreference() pulumi.StringPtrOutput

Specifies whether certificate details should be added to a certificate transparency log. Valid values are `ENABLED` or `DISABLED`. See https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency for more details.

func (CertificateOptionsOutput) ElementType

func (CertificateOptionsOutput) ElementType() reflect.Type

func (CertificateOptionsOutput) ToCertificateOptionsOutput

func (o CertificateOptionsOutput) ToCertificateOptionsOutput() CertificateOptionsOutput

func (CertificateOptionsOutput) ToCertificateOptionsOutputWithContext

func (o CertificateOptionsOutput) ToCertificateOptionsOutputWithContext(ctx context.Context) CertificateOptionsOutput

func (CertificateOptionsOutput) ToCertificateOptionsPtrOutput

func (o CertificateOptionsOutput) ToCertificateOptionsPtrOutput() CertificateOptionsPtrOutput

func (CertificateOptionsOutput) ToCertificateOptionsPtrOutputWithContext

func (o CertificateOptionsOutput) ToCertificateOptionsPtrOutputWithContext(ctx context.Context) CertificateOptionsPtrOutput

type CertificateOptionsPtrInput

type CertificateOptionsPtrInput interface {
	pulumi.Input

	ToCertificateOptionsPtrOutput() CertificateOptionsPtrOutput
	ToCertificateOptionsPtrOutputWithContext(context.Context) CertificateOptionsPtrOutput
}

CertificateOptionsPtrInput is an input type that accepts CertificateOptionsArgs, CertificateOptionsPtr and CertificateOptionsPtrOutput values. You can construct a concrete instance of `CertificateOptionsPtrInput` via:

		 CertificateOptionsArgs{...}

 or:

		 nil

type CertificateOptionsPtrOutput

type CertificateOptionsPtrOutput struct{ *pulumi.OutputState }

func (CertificateOptionsPtrOutput) CertificateTransparencyLoggingPreference

func (o CertificateOptionsPtrOutput) CertificateTransparencyLoggingPreference() pulumi.StringPtrOutput

Specifies whether certificate details should be added to a certificate transparency log. Valid values are `ENABLED` or `DISABLED`. See https://docs.aws.amazon.com/acm/latest/userguide/acm-concepts.html#concept-transparency for more details.

func (CertificateOptionsPtrOutput) Elem

func (CertificateOptionsPtrOutput) ElementType

func (CertificateOptionsPtrOutput) ToCertificateOptionsPtrOutput

func (o CertificateOptionsPtrOutput) ToCertificateOptionsPtrOutput() CertificateOptionsPtrOutput

func (CertificateOptionsPtrOutput) ToCertificateOptionsPtrOutputWithContext

func (o CertificateOptionsPtrOutput) ToCertificateOptionsPtrOutputWithContext(ctx context.Context) CertificateOptionsPtrOutput

type CertificateState

type CertificateState struct {
	// The ARN of the certificate
	Arn pulumi.StringPtrInput
	// ARN of an ACMPCA
	CertificateAuthorityArn pulumi.StringPtrInput
	// The certificate's PEM-formatted public key
	CertificateBody pulumi.StringPtrInput
	// The certificate's PEM-formatted chain
	// * Creating a private CA issued certificate
	CertificateChain pulumi.StringPtrInput
	// A domain name for which the certificate should be issued
	DomainName pulumi.StringPtrInput
	// A list of attributes to feed into other resources to complete certificate validation. Can have more than one element, e.g. if SANs are defined. Only set if `DNS`-validation was used.
	DomainValidationOptions CertificateDomainValidationOptionArrayInput
	// Configuration block used to set certificate options. Detailed below.
	// * Importing an existing certificate
	Options CertificateOptionsPtrInput
	// The certificate's PEM-formatted private key
	PrivateKey pulumi.StringPtrInput
	// Status of the certificate.
	Status pulumi.StringPtrInput
	// A list of domains that should be SANs in the issued certificate. To remove all elements of a previously configured list, set this value equal to an empty list (`[]`).
	SubjectAlternativeNames pulumi.StringArrayInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// A list of addresses that received a validation E-Mail. Only set if `EMAIL`-validation was used.
	ValidationEmails pulumi.StringArrayInput
	// Which method to use for validation. `DNS` or `EMAIL` are valid, `NONE` can be used for certificates that were imported into ACM and then into state managed by this provider.
	ValidationMethod pulumi.StringPtrInput
}

func (CertificateState) ElementType

func (CertificateState) ElementType() reflect.Type

type CertificateValidation

type CertificateValidation struct {
	pulumi.CustomResourceState

	// The ARN of the certificate that is being validated.
	CertificateArn pulumi.StringOutput `pulumi:"certificateArn"`
	// List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
	ValidationRecordFqdns pulumi.StringArrayOutput `pulumi:"validationRecordFqdns"`
}

This resource represents a successful validation of an ACM certificate in concert with other resources.

Most commonly, this resource is used together with `route53.Record` and `acm.Certificate` to request a DNS validated certificate, deploy the required validation records and wait for validation to complete.

> **WARNING:** This resource implements a part of the validation workflow. It does not represent a real-world entity in AWS, therefore changing or deleting this resource on its own has no immediate effect.

## Example Usage

### Email Validation

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/acm"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		certCertificate, err := acm.NewCertificate(ctx, "certCertificate", &acm.CertificateArgs{
			DomainName:       pulumi.String("example.com"),
			ValidationMethod: pulumi.String("EMAIL"),
		})
		if err != nil {
			return err
		}
		certCertificateValidation, err := acm.NewCertificateValidation(ctx, "certCertificateValidation", &acm.CertificateValidationArgs{
			CertificateArn: certCertificate.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetCertificateValidation

func GetCertificateValidation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CertificateValidationState, opts ...pulumi.ResourceOption) (*CertificateValidation, error)

GetCertificateValidation gets an existing CertificateValidation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewCertificateValidation

func NewCertificateValidation(ctx *pulumi.Context,
	name string, args *CertificateValidationArgs, opts ...pulumi.ResourceOption) (*CertificateValidation, error)

NewCertificateValidation registers a new resource with the given unique name, arguments, and options.

type CertificateValidationArgs

type CertificateValidationArgs struct {
	// The ARN of the certificate that is being validated.
	CertificateArn pulumi.StringInput
	// List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
	ValidationRecordFqdns pulumi.StringArrayInput
}

The set of arguments for constructing a CertificateValidation resource.

func (CertificateValidationArgs) ElementType

func (CertificateValidationArgs) ElementType() reflect.Type

type CertificateValidationState

type CertificateValidationState struct {
	// The ARN of the certificate that is being validated.
	CertificateArn pulumi.StringPtrInput
	// List of FQDNs that implement the validation. Only valid for DNS validation method ACM certificates. If this is set, the resource can implement additional sanity checks and has an explicit dependency on the resource that is implementing the validation
	ValidationRecordFqdns pulumi.StringArrayInput
}

func (CertificateValidationState) ElementType

func (CertificateValidationState) ElementType() reflect.Type

type LookupCertificateArgs

type LookupCertificateArgs struct {
	// The domain of the certificate to look up. If no certificate is found with this name, an error will be returned.
	Domain string `pulumi:"domain"`
	// A list of key algorithms to filter certificates. By default, ACM does not return all certificate types when searching. Valid values are `RSA_1024`, `RSA_2048`, `RSA_4096`, `EC_prime256v1`, `EC_secp384r1`, and `EC_secp521r1`.
	KeyTypes []string `pulumi:"keyTypes"`
	// If set to true, it sorts the certificates matched by previous criteria by the NotBefore field, returning only the most recent one. If set to false, it returns an error if more than one certificate is found. Defaults to false.
	MostRecent *bool `pulumi:"mostRecent"`
	// A list of statuses on which to filter the returned list. Valid values are `PENDING_VALIDATION`, `ISSUED`,
	// `INACTIVE`, `EXPIRED`, `VALIDATION_TIMED_OUT`, `REVOKED` and `FAILED`. If no value is specified, only certificates in the `ISSUED` state
	// are returned.
	Statuses []string `pulumi:"statuses"`
	// A mapping of tags for the resource.
	Tags map[string]string `pulumi:"tags"`
	// A list of types on which to filter the returned list. Valid values are `AMAZON_ISSUED` and `IMPORTED`.
	Types []string `pulumi:"types"`
}

A collection of arguments for invoking getCertificate.

type LookupCertificateResult

type LookupCertificateResult struct {
	// Set to the ARN of the found certificate, suitable for referencing in other resources that support ACM certificates.
	Arn    string `pulumi:"arn"`
	Domain string `pulumi:"domain"`
	// The provider-assigned unique ID for this managed resource.
	Id         string   `pulumi:"id"`
	KeyTypes   []string `pulumi:"keyTypes"`
	MostRecent *bool    `pulumi:"mostRecent"`
	Statuses   []string `pulumi:"statuses"`
	// A mapping of tags for the resource.
	Tags  map[string]string `pulumi:"tags"`
	Types []string          `pulumi:"types"`
}

A collection of values returned by getCertificate.

func LookupCertificate

func LookupCertificate(ctx *pulumi.Context, args *LookupCertificateArgs, opts ...pulumi.InvokeOption) (*LookupCertificateResult, error)

Use this data source to get the ARN of a certificate in AWS Certificate Manager (ACM), you can reference it by domain without having to hard code the ARNs as input.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := acm.LookupCertificate(ctx, &acm.LookupCertificateArgs{
			Domain: "tf.example.com",
			KeyTypes: []string{
				"RSA_4096",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL