back
terraform {
required_providers {
fastly = ">= 0.28.1"
}
}
top
module "fastly_tls_subscription" {
source = "./modules/fastly/r/fastly_tls_subscription"
# certificate_authority - (required) is a type of string
certificate_authority = null
# common_name - (optional) is a type of string
common_name = null
# configuration_id - (optional) is a type of string
configuration_id = null
# domains - (required) is a type of set of string
domains = []
# force_destroy - (optional) is a type of bool
force_destroy = null
# force_update - (optional) is a type of bool
force_update = null
}
top
variable "certificate_authority" {
description = "(required) - The entity that issues and certifies the TLS certificates for your subscription. Valid values are `lets-encrypt` or `globalsign`."
type = string
}
variable "common_name" {
description = "(optional) - The common name associated with the subscription generated by Fastly TLS. If you do not pass a common name on create, we will default to the first TLS domain included. If provided, the domain chosen as the common name must be included in TLS domains."
type = string
default = null
}
variable "configuration_id" {
description = "(optional) - The ID of the set of TLS configuration options that apply to the enabled domains on this subscription."
type = string
default = null
}
variable "domains" {
description = "(required) - List of domains on which to enable TLS."
type = set(string)
}
variable "force_destroy" {
description = "(optional) - Force delete the subscription even if it has active domains. Warning: this can disable production traffic if used incorrectly. Defaults to false."
type = bool
default = null
}
variable "force_update" {
description = "(optional) - Force update the subscription even if it has active domains. Warning: this can disable production traffic if used incorrectly."
type = bool
default = null
}
top
resource "fastly_tls_subscription" "this" {
# certificate_authority - (required) is a type of string
certificate_authority = var.certificate_authority
# common_name - (optional) is a type of string
common_name = var.common_name
# configuration_id - (optional) is a type of string
configuration_id = var.configuration_id
# domains - (required) is a type of set of string
domains = var.domains
# force_destroy - (optional) is a type of bool
force_destroy = var.force_destroy
# force_update - (optional) is a type of bool
force_update = var.force_update
}
top
output "common_name" {
description = "returns a string"
value = fastly_tls_subscription.this.common_name
}
output "configuration_id" {
description = "returns a string"
value = fastly_tls_subscription.this.configuration_id
}
output "created_at" {
description = "returns a string"
value = fastly_tls_subscription.this.created_at
}
output "id" {
description = "returns a string"
value = fastly_tls_subscription.this.id
}
output "managed_dns_challenge" {
description = "returns a map of string"
value = fastly_tls_subscription.this.managed_dns_challenge
}
output "managed_http_challenges" {
description = "returns a set of object"
value = fastly_tls_subscription.this.managed_http_challenges
}
output "state" {
description = "returns a string"
value = fastly_tls_subscription.this.state
}
output "updated_at" {
description = "returns a string"
value = fastly_tls_subscription.this.updated_at
}
output "this" {
value = fastly_tls_subscription.this
}
top