-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from Vermyndax/optional-content-sync-identity
Create optional sync user
- Loading branch information
Showing
4 changed files
with
139 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
output "content_sync_access_key" { | ||
value = var.create_content_sync_user ? aws_iam_access_key.content_sync_key[0].id : "" | ||
description = "Access key ID of the optional content sync user." | ||
} | ||
|
||
output "content_sync_access_secret" { | ||
value = var.create_content_sync_user ? aws_iam_access_key.content_sync_key[0].secret : "" | ||
sensitive = true | ||
description = "Secret Access key of the optional content sync user. This is marked as sensitive and will not show in plan output, but be aware that it is stored in your state file. Encrypt accordingly." | ||
} | ||
|
||
output "content_sync_bucket_name" { | ||
value = random_uuid.random_bucket_name.result | ||
description = "Bucket name that contains the content for the site." | ||
} | ||
|
||
output "cloudfront_distribution_id" { | ||
value = aws_cloudfront_distribution.site_cloudfront_distribution.id | ||
description = "CloudFront distribution ID." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,83 @@ | ||
# Creation flags first | ||
|
||
variable "site_region" { | ||
type = string | ||
description = "Region in which to provision the site. Default: us-east-1" | ||
default = "us-east-1" | ||
} | ||
|
||
variable "create_www_redirect_bucket" { | ||
type = bool | ||
description = "Defines whether or not to create a www redirect S3 bucket." | ||
default = true | ||
} | ||
|
||
variable "content_bucket_versioning" { | ||
type = bool | ||
description = "Defines whether or not to set versioning on the content bucket." | ||
default = true | ||
} | ||
|
||
variable "create_cloudfront_distribution" { | ||
type = bool | ||
description = "Defines whether or not to create a CloudFront distribution for the S3 bucket." | ||
default = true | ||
} | ||
|
||
variable "log_include_cookies" { | ||
type = bool | ||
description = "Defines whether or not CloudFront should log cookies." | ||
default = false | ||
} | ||
|
||
variable "create_sns_topic" { | ||
description = "Defines whether or not to create an SNS topic for notifications about events." | ||
default = false | ||
} | ||
|
||
variable "sns_topic_name" { | ||
description = "Name for the SNS topic." | ||
default = "website-notifications" | ||
} | ||
|
||
variable "site_tld" { | ||
type = string | ||
description = "TLD of the website you want to create. A bucket will be created that is named this. Note that the module will error out if this bucket already exists in AWS. Example: example.com" | ||
} | ||
|
||
variable "create_public_dns_zone" { | ||
type = bool | ||
description = "If set to true, creates a public hosted zone in Route53 for your site." | ||
default = "false" | ||
default = false | ||
} | ||
|
||
variable "create_public_dns_site_record" { | ||
type = bool | ||
description = "If set to true, creates a public DNS record in your site_tld hosted zone. If you do not already have a hosted zone for this TLD, you should set create_public_dns_zone to true. Otherwise, this will try to create a record in an existing zone or fail." | ||
default = "true" | ||
default = true | ||
} | ||
|
||
variable "create_public_dns_www_record" { | ||
type = bool | ||
description = "Defines whether or not to create a WWW DNS record for the site." | ||
default = false | ||
} | ||
|
||
variable "root_page_object" { | ||
type = string | ||
description = "The root page object for the Cloudfront/S3 distribution." | ||
default = "index.html" | ||
} | ||
|
||
variable "error_page_object" { | ||
type = string | ||
description = "The error page object for the Cloudfront/S3 distribution." | ||
default = "404.html" | ||
} | ||
|
||
variable "cloudfront_price_class" { | ||
type = string | ||
description = "Price class for Cloudfront." | ||
default = "PriceClass_100" | ||
} | ||
|
||
variable "acm_site_certificate_arn" { | ||
type = string | ||
description = "ARN of an ACM certificate to use for https on the CloudFront distribution." | ||
} | ||
|
||
variable "create_content_sync_user" { | ||
type = bool | ||
description = "Optionally create an IAM user and access keys to sync the content bucket. Note that this will store access information in your state file. Protect it accordingly." | ||
default = false | ||
} |