certificate

package
v1.28.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceType is the type name of the Hetzner Cloud resource for
	// certificates of type uploaded.
	ResourceType = "hcloud_certificate"

	// UploadedResourceType is the name of the Hetzner Cloud uploaded
	// Certificate resource. Resources of this type behave identical to
	// the hcloud_certificate resource.
	UploadedResourceType = "hcloud_uploaded_certificate"

	// ManagedResourceType is the name of the Hetzner Cloud managed Certificate
	// resource.
	ManagedResourceType = "hcloud_managed_certificate"
)
View Source
const DataSourceType = "hcloud_certificate"

DataSourceType is the type name of the Hetzner Cloud Certificate resource.

Variables

This section is empty.

Functions

func ByID

func ByID(t *testing.T, cert *hcloud.Certificate) func(*hcloud.Client, int) bool

ByID returns a function that obtains a certificate by its ID.

func DataSource added in v1.24.1

func DataSource() *schema.Resource

DataSource creates a new Terraform schema for Hetzner Cloud Certificates.

func EqualCert added in v1.24.1

func EqualCert(cert1, cert2 string) (bool, error)

EqualCert compares two PEM encoded X509 certificates.

EqualCert returns an error if it was unable to parse any of the passed certificates.

func ManagedResource added in v1.26.0

func ManagedResource() *schema.Resource

ManagedResource creates a new Terraform schema for the Hetzner Cloud managed Certificate resource.

func Sweep

func Sweep(r string) error

Sweep removes all certificates from the Hetzner Cloud backend.

func UploadedResource added in v1.26.0

func UploadedResource() *schema.Resource

UploadedResource creates a new Terraform schema for Hetzner Cloud Certificate resources.

Types

type DData

type DData struct {
	testtemplate.DataCommon

	CertificateID   string
	CertificateName string
	LabelSelector   string
}

DData defines the fields for the "testdata/d/hcloud_uploaded_certificate" template.

func (*DData) TFID

func (d *DData) TFID() string

TFID returns the data source identifier.

type RDataManaged added in v1.26.0

type RDataManaged struct {
	testtemplate.DataCommon

	Name        string
	DomainNames []string
	Labels      map[string]string
}

RDataManaged defines the fields for the "testdata/r/hcloud_managed_certificate" template.

func NewManagedRData added in v1.26.0

func NewManagedRData(t *testing.T, name string, domainNames []string) *RDataManaged

NewManagedRData creates data for a new certificate resource.

func (*RDataManaged) TFID added in v1.26.0

func (d *RDataManaged) TFID() string

TFID returns the resource identifier.

type RDataUploaded added in v1.26.0

type RDataUploaded struct {
	testtemplate.DataCommon

	Name        string
	PrivateKey  string
	Certificate string
	Labels      map[string]string
}

RDataUploaded defines the fields for the "testdata/r/hcloud_uploaded_certificate" template.

func NewUploadedRData added in v1.26.0

func NewUploadedRData(t *testing.T, name, org string) *RDataUploaded

NewUploadedRData creates data for a new certificate resource.

func (*RDataUploaded) TFID added in v1.26.0

func (d *RDataUploaded) TFID() string

TFID returns the resource identifier.

Jump to

Keyboard shortcuts

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