property

package
v10.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MPL-2.0 Imports: 72 Imported by: 0

Documentation

Overview

Package property contains implementation for Property Provisioning module used to manage properties

Index

Constants

View Source
const (
	// ActivationPollMinimum is the minimum polling interval for activation creation
	ActivationPollMinimum = time.Minute

	// CCMWorkaroundMaxRetries defines the maximum number of retries to activate a property
	// in case of CCM "unauthorized cert" error. With the initial wait time of 10 seconds and
	// binary exponential backoff, this results in a maximum wait time of 150 seconds before giving up
	// (not including the time spent in the API calls themselves).
	CCMWorkaroundMaxRetries = 4
)
View Source
const SubproviderName = "property"

SubproviderName defines name of the property subprovider

Variables

View Source
var (
	// ErrReadFile is used to specify error while reading a file.
	ErrReadFile = errors.New("reading file")
	// ErrUnmarshal is used to specify unmarshal error.
	ErrUnmarshal = errors.New("unmarshaling value")
	// ErrFormatValue is used to specify formatting error.
	ErrFormatValue = errors.New("formatting value")
	// ErrUnknownType is used to specify unknown error.
	ErrUnknownType = errors.New("unknown 'type' value")
)
View Source
var (

	// ErrLookingUpGroupByName is returned when fetching group from API client by groupName returned an error or no group was found
	ErrLookingUpGroupByName = errors.New("looking up group with name")
	// ErrNoGroupsFound is returned when no groups were found
	ErrNoGroupsFound = errors.New("no groups found")
	// ErrGroupNotInContract is returned when none of the groups could be associated with given contractID
	ErrGroupNotInContract = errors.New("group does not belong to contract")
	// ErrFetchingGroups represents error while fetching groups
	ErrFetchingGroups = errors.New("fetching groups")
	// ErrGroupNotFound is returned when group with provided ID is not found
	ErrGroupNotFound = errors.New("group not found")

	// ErrLookingUpContract is returned when fetching contract from API client by groupId returned an error or no contract was found
	ErrLookingUpContract = errors.New("looking up contract for provided group")
	// ErrMultipleContractsInGroup is returned when fetching contract from API client by groupId returned multiple different contracts
	ErrMultipleContractsInGroup = diag.Diagnostics{
		diag.Diagnostic{
			Severity: diag.Error,
			Summary:  "multiple contracts found for given group",
			Detail: "Resource doesn't support groups with multiple contracts. " +
				"Make sure your group has only one contract assigned before proceeding.",
		},
	}
	// ErrNoContractProvided is retured when no contract ID was provided but "name" was
	ErrNoContractProvided = errors.New("'contractId' is required for non-default name")
	// ErrNoGroupProvided is returned when no "group" property is provided
	ErrNoGroupProvided = errors.New("'group' not provided and it is a required input")
	// ErrNoContractsFound is returned when no contracts were found
	ErrNoContractsFound = errors.New("no contracts were found")
	// ErrContractNotFound is returned when contract with provided ID does not exist
	ErrContractNotFound = errors.New("contract not found")
	// ErrFetchingContracts represents error while fetching contracts
	ErrFetchingContracts = errors.New("fetching contracts")
	// ErrMultipleContractsFound is returned when more than one contract was found
	ErrMultipleContractsFound = diag.Diagnostics{
		diag.Diagnostic{
			Severity: diag.Error,
			Summary:  "multiple contracts found",
			Detail: "Resource cannot unambiguously identify the contract. " +
				"Please provide either a 'group_id' or 'group_name' for accurate identification.",
		},
	}

	// ErrNoProductProvided is returned when no "product" property is provided
	ErrNoProductProvided = errors.New("'product' not provided and it is a required input")
	// ErrProductFetch represents error while fetching product
	ErrProductFetch = errors.New("fetching product")
	// ErrProductNotFound is returned when product with provided ID does not exist
	ErrProductNotFound = errors.New("product not found")

	// ErrLookingUpCPCode is returned when fetching CP Code from API client by contractID returned an error or no CP Code was found
	ErrLookingUpCPCode = errors.New("looking up cp code by name")
	// ErrCPCodeNotFound is returned when cp code with provided ID does not exist
	ErrCPCodeNotFound = errors.New("cp code not found")
	// ErrMoreCPCodesFound is returned when cp code with provided ID does not exist
	ErrMoreCPCodesFound = errors.New("more cp codes found")
	// ErrCPCodeUpdateTimeout is returned when waiting for a cp code update results in timeout
	ErrCPCodeUpdateTimeout = errors.New("cp code update timeout")

	// ErrPropertyNotFound is returned when no property was found for given name
	ErrPropertyNotFound = errors.New("property not found")
	// ErrRulesNotFound is returned when no rules were found
	ErrRulesNotFound = errors.New("property rules not found")

	// ErrVersionCreate represents an error while creating new property version
	ErrVersionCreate = errors.New("creating property version")
	// ErrPropertyVersionNotFound is returned when no property versions were found
	ErrPropertyVersionNotFound = errors.New("property version not found")

	// ErrRuleFormatsNotFound is returned when no rule formats were found
	ErrRuleFormatsNotFound = errors.New("no rule formats found")

	// ErrEdgeHostnameNotFound is returned when no edgehostname were found
	ErrEdgeHostnameNotFound = errors.New("unable to find edge hostname")

	// ErrNoLatestIncludeActivation is returned when there is no activation for provided include
	ErrNoLatestIncludeActivation = errors.New("no latest activation for given include")

	// ErrPropertyInclude is returned when operation on property include fails
	ErrPropertyInclude = errors.New("property include")

	// DiagErrActivationTimeout returned on activation poll timeout
	DiagErrActivationTimeout = diag.Diagnostic{
		Severity: diag.Error,
		Summary:  "Timeout waiting for activation status",
		Detail: `
The activation creation request has been started successfully, however the operation timeout was 
exceeded while waiting for the remote resource to update. You may retry the operation to continue 
to wait for the final status.

It is recommended that the timeout for activation resources be set to greater than 90 minutes.
See: https://www.terraform.io/docs/configuration/resources.html#operation-timeouts
`,
	}

	// DiagErrActivationCanceled is returned on activation poll cancel
	DiagErrActivationCanceled = diag.Diagnostic{
		Severity: diag.Error,
		Summary:  "Operation canceled while waiting for activation status",
		Detail: `
The activation creation request has been started successfully, however the a cancellation was received
while waiting for the remote resource to update. You may retry the operation to continue to wait for 
the final status.

It is recommended that the timeout for activation resources be set to greater than 90 minutes.
See: https://www.terraform.io/docs/configuration/resources.html#operation-timeouts
`,
	}
)
View Source
var ErrCalculatingHostnamesHash = errors.New("calculating hostnames set hash failed")

ErrCalculatingHostnamesHash is used when calculating hash value for set of hostnames failed.

Functions

func NetworkAlias

func NetworkAlias(network string) (string, error)

NetworkAlias parses the given network name or alias and returns its full name and any error

func NewAccountHostnamesDataSource

func NewAccountHostnamesDataSource() datasource.DataSource

NewAccountHostnamesDataSource returns a new accountHostnamesDataSource.

func NewBootstrapResource

func NewBootstrapResource() resource.Resource

NewBootstrapResource returns new property bootstrap resource

func NewCPCodesDataSource

func NewCPCodesDataSource() datasource.DataSource

NewCPCodesDataSource returns a new CP codes data source

func NewDomainOwnershipDomainDataSource

func NewDomainOwnershipDomainDataSource() datasource.DataSource

NewDomainOwnershipDomainDataSource returns a new domainDataSource.

func NewDomainOwnershipDomainsDataSource

func NewDomainOwnershipDomainsDataSource() datasource.DataSource

NewDomainOwnershipDomainsDataSource returns a new domainDataSource.

func NewDomainOwnershipLateValidationResource

func NewDomainOwnershipLateValidationResource(config domainOwnershipLateValidationResourceConfig) func() resource.Resource

NewDomainOwnershipLateValidationResource returns new domain ownership late validation resource.

func NewDomainOwnershipSearchDomains

func NewDomainOwnershipSearchDomains() datasource.DataSource

NewDomainOwnershipSearchDomains returns a new domain ownership search domains data source.

func NewDomainOwnershipValidationResource

func NewDomainOwnershipValidationResource(config domainOwnershipValidationResourceConfig) func() resource.Resource

NewDomainOwnershipValidationResource returns new domain ownership validation resource.

func NewDomainsResource

func NewDomainsResource() resource.Resource

NewDomainsResource returns new domains resource.

func NewEdgeHostnameDataSource added in v10.2.0

func NewEdgeHostnameDataSource() datasource.DataSource

NewEdgeHostnameDataSource returns a new Edge Hostname data source.

func NewEdgeHostnamesDataSource added in v10.2.0

func NewEdgeHostnamesDataSource() datasource.DataSource

NewEdgeHostnamesDataSource returns a new Edge Hostnames data source

func NewHostnameActivationDataSource

func NewHostnameActivationDataSource() datasource.DataSource

NewHostnameActivationDataSource returns a new property hostname activation data source.

func NewHostnameActivationsDataSource

func NewHostnameActivationsDataSource() datasource.DataSource

NewHostnameActivationsDataSource returns a new property hostname activations data source

func NewHostnameAuditHistoryDataSource

func NewHostnameAuditHistoryDataSource() datasource.DataSource

NewHostnameAuditHistoryDataSource returns a new property hostname audit history data source.

func NewHostnameBucketResource

func NewHostnameBucketResource(config hostnameBucketResourceConfig) func() resource.Resource

NewHostnameBucketResource returns new property hostname bucket resource.

func NewHostnamesDiffDataSource

func NewHostnamesDiffDataSource() datasource.DataSource

NewHostnamesDiffDataSource returns a new property hostnames diff data source.

func NewIncludeDataSource

func NewIncludeDataSource() datasource.DataSource

NewIncludeDataSource returns a new property include data source

Types

type BootstrapResource

type BootstrapResource struct {
	meta.Resource
}

BootstrapResource represents akamai_property_bootstrap resource

func (*BootstrapResource) Create

Create implements resource's Create method

func (*BootstrapResource) Delete

Delete implements resource's Delete method

func (*BootstrapResource) ImportState

ImportState implements resource's ImportState method

func (*BootstrapResource) Metadata

Metadata implements resource.Resource.

func (*BootstrapResource) Read

Read implements resource's Read method

func (*BootstrapResource) Schema

Schema implements resource's Schema

func (*BootstrapResource) Update

Update supports change for the following attributes: - `group_id` using a dedicated endpoint from the IAM API, - `name`, which results in resource replacement. Trying to update `contract_id` or `product_id` will result in an error.

type BootstrapResourceModel

type BootstrapResourceModel struct {
	ID                types.String `tfsdk:"id"`
	Name              types.String `tfsdk:"name"`
	AssetID           types.String `tfsdk:"asset_id"`
	GroupID           types.String `tfsdk:"group_id"`
	ContractID        types.String `tfsdk:"contract_id"`
	ProductID         types.String `tfsdk:"product_id"`
	UseHostnameBucket types.Bool   `tfsdk:"use_hostname_bucket"`
}

BootstrapResourceModel is a model for akamai_property_bootstrap resource

type DomainOwnershipLateValidationResource

type DomainOwnershipLateValidationResource struct {
	meta.Resource
	// contains filtered or unexported fields
}

DomainOwnershipLateValidationResource represents akamai_domainownership_late_validation resource.

func (*DomainOwnershipLateValidationResource) Create

Create implements resource's Create method.

func (*DomainOwnershipLateValidationResource) Delete

Delete implements resource's Delete method.

func (*DomainOwnershipLateValidationResource) ImportState

ImportState implements resource's ImportState method.

func (*DomainOwnershipLateValidationResource) Metadata

Metadata implements resource.Resource.

func (*DomainOwnershipLateValidationResource) Read

Read implements resource's Read method.

func (*DomainOwnershipLateValidationResource) Schema

Schema implements resource's Schema.

func (*DomainOwnershipLateValidationResource) Update

Update implements resource's Update method.

type DomainOwnershipValidationResource

type DomainOwnershipValidationResource struct {
	meta.Resource
	// contains filtered or unexported fields
}

DomainOwnershipValidationResource represents akamai_domainownership_validation resource.

func (*DomainOwnershipValidationResource) Create

Create implements resource's Create method.

func (*DomainOwnershipValidationResource) Delete

Delete implements resource's Delete method.

func (*DomainOwnershipValidationResource) ImportState

ImportState implements resource's ImportState method.

func (*DomainOwnershipValidationResource) Metadata

Metadata implements resource.Resource.

func (*DomainOwnershipValidationResource) Read

Read implements resource's Read method.

func (*DomainOwnershipValidationResource) Schema

Schema implements resource's Schema.

func (*DomainOwnershipValidationResource) Update

Update implements resource's Update method.

type DomainsResource

type DomainsResource struct {
	meta.Resource
}

DomainsResource represents akamai_property_domainownership_domains resource.

func (*DomainsResource) Create

Create implements resource's Create method.

func (*DomainsResource) Delete

Delete implements resource's Delete method.

func (*DomainsResource) ImportState

ImportState implements resource's ImportState method.

func (*DomainsResource) Metadata

Metadata implements resource.Resource.

func (*DomainsResource) ModifyPlan

ModifyPlan is a plan modifier for domainownership_domains resource.

func (*DomainsResource) Read

Read implements resource's Read method.

func (*DomainsResource) Schema

Schema implements resource's Schema.

func (*DomainsResource) Update

Update implements resource's Update method.

type Hostname

type Hostname struct {
	CertProvisioningType types.String `tfsdk:"cert_provisioning_type"`
	EdgeHostnameID       types.String `tfsdk:"edge_hostname_id"`
	CnameTo              types.String `tfsdk:"cname_to"`
}

Hostname represents a hostname object.

type HostnameBucketResource

type HostnameBucketResource struct {
	meta.Resource
	// contains filtered or unexported fields
}

HostnameBucketResource represents akamai_property_hostname_bucket resource.

func (*HostnameBucketResource) Create

Create implements resource's Create method.

func (*HostnameBucketResource) Delete

Delete implements resource's Delete method.

func (*HostnameBucketResource) ImportState

ImportState implements resource's ImportState method. The importID has a format of for example: "prp_123:STAGING", "prp_123:PRODUCTION:ctr_456:grp_789".

func (*HostnameBucketResource) Metadata

Metadata implements resource.Resource.

func (*HostnameBucketResource) ModifyPlan

ModifyPlan performs plan modification on a resource level.

func (*HostnameBucketResource) Read

Read implements resource's Read method.

func (*HostnameBucketResource) Schema

Schema implements resource's Schema.

func (*HostnameBucketResource) Update

Update implements resource's Update method.

type HostnameBucketResourceModel

type HostnameBucketResourceModel struct {
	PropertyID           types.String `tfsdk:"property_id"`
	ContractID           types.String `tfsdk:"contract_id"`
	GroupID              types.String `tfsdk:"group_id"`
	Network              types.String `tfsdk:"network"`
	Note                 types.String `tfsdk:"note"`
	NotifyEmails         types.List   `tfsdk:"notify_emails"`
	ActivationID         types.String `tfsdk:"activation_id"`
	ID                   types.String `tfsdk:"id"`
	Hostnames            types.Map    `tfsdk:"hostnames"`
	TimeoutForActivation types.Int64  `tfsdk:"timeout_for_activation"`
	HostnameCount        types.Int64  `tfsdk:"hostname_count"`
	PendingDefaultCerts  types.Int64  `tfsdk:"pending_default_certs"`
}

HostnameBucketResourceModel is a model for akamai_property_hostname_bucket resource.

type Subprovider

type Subprovider struct {
	// contains filtered or unexported fields
}

Subprovider gathers property resources and data sources

func NewSubprovider

func NewSubprovider() *Subprovider

NewSubprovider returns a new property subprovider

func (*Subprovider) FrameworkDataSources

func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource

FrameworkDataSources returns the property data sources implemented using terraform-plugin-framework

func (*Subprovider) FrameworkResources

func (p *Subprovider) FrameworkResources() []func() resource.Resource

FrameworkResources returns the property resources implemented using terraform-plugin-framework

func (*Subprovider) SDKDataSources

func (p *Subprovider) SDKDataSources() map[string]*schema.Resource

SDKDataSources returns the property data sources implemented using terraform-plugin-sdk

func (*Subprovider) SDKResources

func (p *Subprovider) SDKResources() map[string]*schema.Resource

SDKResources returns the property resources implemented using terraform-plugin-sdk

Source Files

Directories

Path Synopsis
Package ruleformats contains logic required for akamai_property_rules_builder data source.
Package ruleformats contains logic required for akamai_property_rules_builder data source.

Jump to

Keyboard shortcuts

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