-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Renamed the s3 module to backup - Bumped GraphDB version to 10.4.0-RC5 - Removed IAM backup user - Moved IAM policies to their respectful modules
- Loading branch information
1 parent
baa39e9
commit cdefef3
Showing
25 changed files
with
260 additions
and
287 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# GraphDB Backups Module |
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,14 @@ | ||
output "bucket_name" { | ||
description = "Name of the S3 bucket for storing GraphDB backups" | ||
value = aws_s3_bucket.backup.bucket | ||
} | ||
|
||
output "bucket_id" { | ||
description = "ID of the S3 bucket for storing GraphDB backups" | ||
value = aws_s3_bucket.backup.id | ||
} | ||
|
||
output "bucket_arn" { | ||
description = "ARN of the S3 bucket for storing GraphDB backups" | ||
value = aws_s3_bucket.backup.arn | ||
} |
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,20 +1,15 @@ | ||
# REQUIRED parameters | ||
|
||
variable "resource_name_prefix" { | ||
description = "Resource name prefix used for tagging and naming AWS resources" | ||
type = string | ||
} | ||
|
||
# OPTIONAL parameters | ||
|
||
variable "kms_key_arn" { | ||
description = "KMS key to use for bucket encryption." | ||
variable "iam_role_id" { | ||
description = "IAM role ID to attach permission policies to" | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "access_log_bucket" { | ||
description = "S3 bucket ID for storing access logs of the GraphDB backup bucket" | ||
variable "kms_key_arn" { | ||
description = "KMS key to use for bucket encryption. If left empty, it will use the account's default for S3." | ||
type = string | ||
default = null | ||
} |
File renamed without changes.
File renamed without changes.
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,9 +1,28 @@ | ||
resource "aws_route53_zone" "zone" { | ||
name = var.zone_dns_name | ||
|
||
# Allows for Terraform to destroy it. | ||
force_destroy = true | ||
|
||
vpc { | ||
vpc_id = var.vpc_id | ||
} | ||
} | ||
|
||
resource "aws_iam_role_policy" "route53_instance_registration" { | ||
name = "${var.resource_name_prefix}-graphdb-route53-instance-registration" | ||
role = var.iam_role_id | ||
policy = data.aws_iam_policy_document.route53_instance_registration.json | ||
} | ||
|
||
data "aws_iam_policy_document" "route53_instance_registration" { | ||
statement { | ||
effect = "Allow" | ||
|
||
actions = [ | ||
"route53:ChangeResourceRecordSets" | ||
] | ||
|
||
resources = ["arn:aws:route53:::hostedzone/${aws_route53_zone.zone.zone_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,3 +1,4 @@ | ||
output "zone_id" { | ||
value = aws_route53_zone.zone.zone_id | ||
description = "ID of the private hosted zone for GraphDB DNS resolving" | ||
value = aws_route53_zone.zone.zone_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
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
Oops, something went wrong.