generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Terraform and GitHub workflows initial commit #3
Merged
Conversation
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
Add the Terraform, Terragrunt and GitHub workflows needed to manage the data lake infrastructure. This also includes the initial three S3 buckets that will hold datasets.
Production: buckets✅ Terraform Init: Plan: 12 to add, 0 to change, 0 to destroy Show summary
Show planResource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# module.curated_bucket.aws_s3_bucket.this will be created
+ resource "aws_s3_bucket" "this" {
+ acceleration_status = (known after apply)
+ acl = "private"
+ arn = (known after apply)
+ bucket = "cds-data-lake-curated-production"
+ bucket_domain_name = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = (known after apply)
+ request_payer = (known after apply)
+ tags = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging {
+ target_bucket = (known after apply)
+ target_prefix = "curated/"
}
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration {
+ rule {
+ bucket_key_enabled = false
+ apply_server_side_encryption_by_default {
+ sse_algorithm = "AES256"
}
}
}
+ versioning {
+ enabled = true
+ mfa_delete = false
}
+ website (known after apply)
}
# module.curated_bucket.aws_s3_bucket_public_access_block.this will be created
+ resource "aws_s3_bucket_public_access_block" "this" {
+ block_public_acls = true
+ block_public_policy = true
+ bucket = (known after apply)
+ id = (known after apply)
+ ignore_public_acls = true
+ restrict_public_buckets = true
}
# module.log_bucket.data.aws_iam_policy_document.combined will be read during apply
# (config refers to values not yet known)
<= data "aws_iam_policy_document" "combined" {
+ id = (known after apply)
+ json = (known after apply)
+ minified_json = (known after apply)
+ source_policy_documents = (known after apply)
}
# module.log_bucket.data.aws_iam_policy_document.deny_insecure_transport will be read during apply
# (config refers to values not yet known)
<= data "aws_iam_policy_document" "deny_insecure_transport" {
+ id = (known after apply)
+ json = (known after apply)
+ minified_json = (known after apply)
+ statement {
+ actions = [
+ "s3:*",
]
+ effect = "Deny"
+ resources = [
+ (known after apply),
+ (known after apply),
]
+ sid = "denyInsecureTransport"
+ condition {
+ test = "Bool"
+ values = [
+ "false",
]
+ variable = "aws:SecureTransport"
}
+ principals {
+ identifiers = [
+ "*",
]
+ type = "*"
}
}
}
# module.log_bucket.aws_s3_bucket.this will be created
+ resource "aws_s3_bucket" "this" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "cds-data-lake-bucket-logs-production"
+ bucket_domain_name = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = (known after apply)
+ request_payer = (known after apply)
+ tags = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "true"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "true"
+ "Terraform" = "true"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule {
+ enabled = true
+ id = (known after apply)
+ expiration {
+ days = 30
}
}
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration {
+ rule {
+ apply_server_side_encryption_by_default {
+ sse_algorithm = "AES256"
}
}
}
+ versioning (known after apply)
+ website (known after apply)
}
# module.log_bucket.aws_s3_bucket_acl.this will be created
+ resource "aws_s3_bucket_acl" "this" {
+ acl = "log-delivery-write"
+ bucket = (known after apply)
+ id = (known after apply)
+ access_control_policy (known after apply)
}
# module.log_bucket.aws_s3_bucket_ownership_controls.this will be created
+ resource "aws_s3_bucket_ownership_controls" "this" {
+ bucket = (known after apply)
+ id = (known after apply)
+ rule {
+ object_ownership = "BucketOwnerPreferred"
}
}
# module.log_bucket.aws_s3_bucket_policy.this will be created
+ resource "aws_s3_bucket_policy" "this" {
+ bucket = (known after apply)
+ id = (known after apply)
+ policy = (known after apply)
}
# module.log_bucket.aws_s3_bucket_public_access_block.this will be created
+ resource "aws_s3_bucket_public_access_block" "this" {
+ block_public_acls = true
+ block_public_policy = true
+ bucket = (known after apply)
+ id = (known after apply)
+ ignore_public_acls = true
+ restrict_public_buckets = true
}
# module.log_bucket.aws_s3_bucket_versioning.this will be created
+ resource "aws_s3_bucket_versioning" "this" {
+ bucket = (known after apply)
+ id = (known after apply)
+ versioning_configuration {
+ mfa_delete = (known after apply)
+ status = "Enabled"
}
}
# module.raw_bucket.aws_s3_bucket.this will be created
+ resource "aws_s3_bucket" "this" {
+ acceleration_status = (known after apply)
+ acl = "private"
+ arn = (known after apply)
+ bucket = "cds-data-lake-raw-production"
+ bucket_domain_name = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = (known after apply)
+ request_payer = (known after apply)
+ tags = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging {
+ target_bucket = (known after apply)
+ target_prefix = "raw/"
}
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration {
+ rule {
+ bucket_key_enabled = false
+ apply_server_side_encryption_by_default {
+ sse_algorithm = "AES256"
}
}
}
+ versioning {
+ enabled = true
+ mfa_delete = false
}
+ website (known after apply)
}
# module.raw_bucket.aws_s3_bucket_public_access_block.this will be created
+ resource "aws_s3_bucket_public_access_block" "this" {
+ block_public_acls = true
+ block_public_policy = true
+ bucket = (known after apply)
+ id = (known after apply)
+ ignore_public_acls = true
+ restrict_public_buckets = true
}
# module.transformed_bucket.aws_s3_bucket.this will be created
+ resource "aws_s3_bucket" "this" {
+ acceleration_status = (known after apply)
+ acl = "private"
+ arn = (known after apply)
+ bucket = "cds-data-lake-transformed-production"
+ bucket_domain_name = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = false
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = (known after apply)
+ request_payer = (known after apply)
+ tags = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "PlatformDataLake"
+ "Critical" = "false"
+ "Terraform" = "true"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging {
+ target_bucket = (known after apply)
+ target_prefix = "transformed/"
}
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration {
+ rule {
+ bucket_key_enabled = false
+ apply_server_side_encryption_by_default {
+ sse_algorithm = "AES256"
}
}
}
+ versioning {
+ enabled = true
+ mfa_delete = false
}
+ website (known after apply)
}
# module.transformed_bucket.aws_s3_bucket_public_access_block.this will be created
+ resource "aws_s3_bucket_public_access_block" "this" {
+ block_public_acls = true
+ block_public_policy = true
+ bucket = (known after apply)
+ id = (known after apply)
+ ignore_public_acls = true
+ restrict_public_buckets = true
}
Plan: 12 to add, 0 to change, 0 to destroy.
Warning: Argument is deprecated
with module.curated_bucket.aws_s3_bucket.this,
on .terraform/modules/curated_bucket/S3/main.tf line 8, in resource "aws_s3_bucket" "this":
8: resource "aws_s3_bucket" "this" {
Use the aws_s3_bucket_versioning resource instead
(and 11 more similar warnings elsewhere)
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest results20 tests, 20 passed, 0 warnings, 0 failures, 0 exceptions
|
wmoussa-gc
approved these changes
Oct 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add the Terraform, Terragrunt and GitHub workflows needed to manage the data lake infrastructure.
This also includes the initial three S3 buckets that will hold datasets.
Related