Resource Type definition for AWS::CloudFront::Function
resource "awscc_cloudfront_function" "example" {
name = "example"
function_code = file("${path.module}/function.js")
function_config = {
comment = "example function"
runtime = "cloudfront-js-2.0"
}
auto_publish = true
}
resource "awscc_cloudfront_function" "example" {
name = "example"
function_code = file("${path.module}/function.js")
function_config = {
comment = "example function"
runtime = "cloudfront-js-2.0"
key_value_store_associations = [{
key_value_store_arn = var.key_store_arn
}]
}
auto_publish = true
}
variable "key_store_arn" {
type = string
description = "Key Value store arn"
}
function_code
(String)function_config
(Attributes) (see below for nested schema)name
(String)auto_publish
(Boolean)function_metadata
(Attributes) (see below for nested schema)function_arn
(String)id
(String) Uniquely identifies the resource.stage
(String)function_config
Required:
comment
(String)runtime
(String)Optional:
key_value_store_associations
(Attributes List) (see below for nested schema)function_config.key_value_store_associations
Required:
key_value_store_arn
(String)function_metadata
Read-Only:
function_arn
(String)Import is supported using the following syntax:
$ terraform import awscc_cloudfront_function.example <resource ID>