apfm-actions/CloudFront Deploy

Deploy an AWS CloudFront Distribution using Terraform

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit May 31, 2023
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: apfm-actions/terraform-cloudfront-action@793ee3806d8f6eda4263ee3a0e28587e08ce39db # no releases — HEAD as of 2026-07-10

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
destroyRuns Terraform destroy to remove resources created by this actionnofalse
deployRuns Terraform apply to create/update resources created by this actionnotrue
planRuns Terraform plan to check the changes necessary to achieve the desired statenotrue
enable_cloudfrontWhether the distribution is enabled to accept end user requests for contentnotrue
commentAny comments you want to include about the distributionyes
default_root_objectThe object that you want CloudFront to return (for example, index.html) when an end user requests the root URLno
price_classThe price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100noPriceClass_100
origin_domain_nameThe DNS domain name of the web site for a custom origin or the S3 bucket nameyes
origin_is_s3Set to true if the origin is an S3 bucket, otherwise set to false and a custom origin will be used.nofalse
origin_access_identityThe CloudFront origin access identity to associate with the origin. Only applicable to S3 originsno
origin_idA unique identifier for the originyes
origin_pathAn optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom originno
origin_http_portThe HTTP port the custom origin listens on. Only for custom originsno80
origin_https_portThe HTTPS port the custom origin listens on. Only for custom originsno443
origin_protocol_policyThe origin protocol policy to apply to your origin. One of http-only, https-only, or match-viewer. Only for custom originsnohttps-only
origin_ssl_protocolsThe SSL/TLS protocols that you want CloudFront to use when communicating with your origin over HTTPS. A list of one or more of SSLv3, TLSv1, TLSv1.1, and TLSv1.2. Only for custom originsnoTLSv1.2
allowed_methodsA comma separated list of Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom originnoDELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT
cached_methodsControls whether CloudFront caches the response to requests using the specified HTTP methodsnoGET,HEAD
default_ttlThe default amount of time (in seconds) that an object is in a CloudFront cacheno86400
max_ttlThe maximum amount of time (in seconds) that an object is in a CloudFront cacheno31536000
min_ttlThe minimum amount of time that you want objects to stay in CloudFront cachesno0
viewer_protocol_policyUse this element to specify the protocol that users can use to access the files in the origin. One of allow-all, https-only, or redirect-to-httpsnoallow-all
forward_headersSpecifies the Headers, if any, that you want CloudFront to vary upon for this cache behaviorno
forward_query_stringIndicates whether you want CloudFront to forward query strings to the originnofalse
forward_cookiesSpecifies whether you want CloudFront to forward cookies to the origin. You can specify all or nonenonone
domain_namesA comma separated list of domain name aliases for this CF distribution. The first domain name/alias will be the primary domain name, and the rest will be added as SANs in the issued certificate. If not defined, the default SSL certificate will be usedno
minimum_protocol_versionThe minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections.noTLSv1.2_2018
restriction_locationsThe ISO 3166-1-alpha-2 codes for which you want CloudFront either to distribute your content (whitelist) or not distribute your content (blacklist)no
locations_restriction_typeThe method that you want to use to restrict distribution of your content by country: none, whitelist, or blacklistnonone
logging_bucketThe Amazon S3 bucket to store the access logs inno
logging_include_cookiesSpecifies whether you want CloudFront to include cookies in access logsnofalse
logging_prefixAn optional string that you want CloudFront to prefix to the access log filenames for this distributionno
namedescription
cloudfront_statusThe current status of the distribution
cloudfront_domain_nameThe domain name corresponding to the distribution