Skip to content

Latest commit

 

History

History

function

Folders and files

README.md

function

This module creates following resources.

  • aws_cloudfront_function (optional)
  • aws_cloudfront_connection_function (optional)

Requirements

Name Version
terraform >= 1.12
aws >= 6.35
telemetry >= 0.2.0

Providers

Name Version
aws >= 6.35

Modules

Name Source Version
resource_group tedilabs/misc/aws//modules/resource-group ~> 0.13.0

Resources

Name Type
aws_cloudfront_connection_function.this resource
aws_cloudfront_function.this resource

Inputs

Name Description Type Default Required
code (Required) The source code of the function. Maximum length is 40960 characters for CONNECTION functions. string n/a yes
name (Required) A unique name for the CloudFront Function. string n/a yes
runtime (Required) The identifier of the function's runtime. Valid values are cloudfront-js-1.0 and cloudfront-js-2.0. string n/a yes
description (Optional) A comment to describe the CloudFront Function. Defaults to Managed by Terraform.. string "Managed by Terraform." no
key_value_store (Optional) The ARN of CloudFront Key Value Store to associate with the function. AWS limits associations to one key value store per function. string null no
module_tags_enabled (Optional) Whether to create AWS Resource Tags for the module informations. bool true no
publish (Optional) Whether to publish the function to the LIVE stage after creation or update. Defaults to true. bool true no
resource_group (Optional) A configurations of Resource Group for this module. resource_group as defined below.
(Optional) enabled - Whether to create Resource Group to find and group AWS resources which are created by this module. Defaults to true.
(Optional) name - The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with AWS or aws. If not provided, a name will be generated using the module name and instance name.
(Optional) description - The description of Resource Group. Defaults to Managed by Terraform..
object({
enabled = optional(bool, true)
name = optional(string, "")
description = optional(string, "Managed by Terraform.")
})
{} no
tags (Optional) A map of tags to add to all resources. map(string) {} no
telemetry (Optional) A configuration to collect telemetry data for the module. This is used to improve the module and its features. To send pseudonyms instead of identifying values such as the hostname and the Git remote, set pseudonymization_enabled to true. Pseudonyms are not anonymous; to keep data from being sent, disable its collector. The default configuration enables telemetry collection for machine, network, git, github, github actions, HCP Terraform, terraform, and toolchain. You can disable telemetry collection by setting enabled to false. telemetry block as defined below.
(Optional) enabled - Whether to enable telemetry collection. Default is true.
(Optional) capture_machine - Whether to capture machine information. Default is true.
(Optional) capture_network - Whether to capture network information. Default is true.
(Optional) capture_git - Whether to capture git information. Default is true.
(Optional) capture_github - Whether to capture GitHub information. Default is true.
(Optional) capture_github_actions - Whether to capture GitHub Actions information. Default is true.
(Optional) capture_hcp_terraform - Whether to capture HCP Terraform information. Default is true.
(Optional) capture_terraform - Whether to capture Terraform information. Default is true.
(Optional) capture_toolchain - Whether to capture toolchain information. Default is true.
(Optional) pseudonymization_enabled - Whether to enable pseudonymization of the captured data. Default is false.
object({
enabled = optional(bool, true)

capture_machine = optional(bool, true)
capture_network = optional(bool, true)
capture_git = optional(bool, true)
capture_github = optional(bool, true)
capture_github_actions = optional(bool, true)
capture_hcp_terraform = optional(bool, true)
capture_terraform = optional(bool, true)
capture_toolchain = optional(bool, true)

pseudonymization_enabled = optional(bool, false)
})
{} no
type (Optional) The type of CloudFront Function to create. Valid values are GENERAL and CONNECTION. Defaults to GENERAL. string "GENERAL" no

Outputs

Name Description
arn The ARN of the CloudFront Function.
description The comment describing the CloudFront function.
etag The ETag hash of the function. This is the value for the DEVELOPMENT stage of the function.
id The ID of the CloudFront Function.
key_value_store The ARN of the CloudFront Key Value Store associated with the function, if any.
live_stage_etag The ETag hash of the LIVE stage of the function. Will be empty if the function has not been published.
name The name of the CloudFront Function.
resource_group The resource group created to manage resources in this module.
runtime The runtime environment for the function.
status The status of the function. Can be UNPUBLISHED, UNASSOCIATED or ASSOCIATED.
type The type of the CloudFront Function.