apfm-actions/CloudFront Deploy
Deploy an AWS CloudFront Distribution using Terraform
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit May 31, 2023
- License
- None
Pinned Snippet
uses: apfm-actions/terraform-cloudfront-action@793ee3806d8f6eda4263ee3a0e28587e08ce39db # no releases — HEAD as of 2026-07-10tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| destroy | Runs Terraform destroy to remove resources created by this action | no | false |
| deploy | Runs Terraform apply to create/update resources created by this action | no | true |
| plan | Runs Terraform plan to check the changes necessary to achieve the desired state | no | true |
| enable_cloudfront | Whether the distribution is enabled to accept end user requests for content | no | true |
| comment | Any comments you want to include about the distribution | yes | — |
| default_root_object | The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL | no | — |
| price_class | The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100 | no | PriceClass_100 |
| origin_domain_name | The DNS domain name of the web site for a custom origin or the S3 bucket name | yes | — |
| origin_is_s3 | Set to true if the origin is an S3 bucket, otherwise set to false and a custom origin will be used. | no | false |
| origin_access_identity | The CloudFront origin access identity to associate with the origin. Only applicable to S3 origins | no | — |
| origin_id | A unique identifier for the origin | yes | — |
| origin_path | An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin | no | — |
| origin_http_port | The HTTP port the custom origin listens on. Only for custom origins | no | 80 |
| origin_https_port | The HTTPS port the custom origin listens on. Only for custom origins | no | 443 |
| origin_protocol_policy | The origin protocol policy to apply to your origin. One of http-only, https-only, or match-viewer. Only for custom origins | no | https-only |
| origin_ssl_protocols | The 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 origins | no | TLSv1.2 |
| allowed_methods | A comma separated list of Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin | no | DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT |
| cached_methods | Controls whether CloudFront caches the response to requests using the specified HTTP methods | no | GET,HEAD |
| default_ttl | The default amount of time (in seconds) that an object is in a CloudFront cache | no | 86400 |
| max_ttl | The maximum amount of time (in seconds) that an object is in a CloudFront cache | no | 31536000 |
| min_ttl | The minimum amount of time that you want objects to stay in CloudFront caches | no | 0 |
| viewer_protocol_policy | Use 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-https | no | allow-all |
| forward_headers | Specifies the Headers, if any, that you want CloudFront to vary upon for this cache behavior | no | — |
| forward_query_string | Indicates whether you want CloudFront to forward query strings to the origin | no | false |
| forward_cookies | Specifies whether you want CloudFront to forward cookies to the origin. You can specify all or none | no | none |
| domain_names | A 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 used | no | — |
| minimum_protocol_version | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. | no | TLSv1.2_2018 |
| restriction_locations | The 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_type | The method that you want to use to restrict distribution of your content by country: none, whitelist, or blacklist | no | none |
| logging_bucket | The Amazon S3 bucket to store the access logs in | no | — |
| logging_include_cookies | Specifies whether you want CloudFront to include cookies in access logs | no | false |
| logging_prefix | An optional string that you want CloudFront to prefix to the access log filenames for this distribution | no | — |
Outputs
| name | description |
|---|---|
| cloudfront_status | The current status of the distribution |
| cloudfront_domain_name | The domain name corresponding to the distribution |