generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into standard-lifecycle-v1
- Loading branch information
Showing
103 changed files
with
2,569 additions
and
1,573 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
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
17 changes: 0 additions & 17 deletions
17
terraform/environments/analytical-platform-compute/helm-charts-applications.tf
This file was deleted.
Oops, something went wrong.
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
64 changes: 64 additions & 0 deletions
64
terraform/environments/analytical-platform-compute/lakeformation-permissions.tf
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,64 @@ | ||
|
||
resource "aws_lakeformation_lf_tag" "source" { | ||
count = terraform.workspace == "analytical-platform-compute-production" ? 1 : 0 | ||
key = "source" | ||
values = ["create-a-derived-table"] | ||
} | ||
|
||
resource "aws_lakeformation_permissions" "cadet_all_data" { | ||
for_each = (terraform.workspace == "analytical-platform-compute-production" ? | ||
toset(["TABLE", "DATABASE"]) : toset([])) | ||
|
||
principal = module.copy_apdp_cadet_metadata_to_compute_assumable_role.iam_role_arn | ||
permissions = ["ALL"] # https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html | ||
|
||
lf_tag_policy { | ||
resource_type = each.value | ||
expression { | ||
key = "source" | ||
values = ["create-a-derived-table"] | ||
} | ||
} | ||
} | ||
|
||
resource "aws_lakeformation_lf_tag" "domain" { | ||
for_each = try(local.environment_configuration.cadet_lf_tags, {}) | ||
key = each.key | ||
values = each.value | ||
} | ||
|
||
resource "aws_lakeformation_permissions" "cadet_domain_database_data" { | ||
for_each = try(local.environment_configuration.cadet_lf_tags, {}) | ||
|
||
principal = module.copy_apdp_cadet_metadata_to_compute_assumable_role.iam_role_arn | ||
permissions = ["ALL"] # https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html | ||
|
||
lf_tag_policy { | ||
resource_type = "DATABASE" | ||
expression { | ||
key = each.key | ||
values = each.value | ||
} | ||
} | ||
} | ||
|
||
resource "aws_lakeformation_permissions" "cadet_domain_table_data" { | ||
for_each = try(local.environment_configuration.cadet_lf_tags, {}) | ||
|
||
principal = module.copy_apdp_cadet_metadata_to_compute_assumable_role.iam_role_arn | ||
permissions = ["ALL"] # https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html | ||
|
||
lf_tag_policy { | ||
resource_type = "TABLE" | ||
expression { | ||
key = each.key | ||
values = each.value | ||
} | ||
} | ||
} | ||
|
||
import { | ||
for_each = try(local.environment_configuration.cadet_lf_tags, {}) | ||
to = aws_lakeformation_lf_tag.domain[each.key] | ||
id = "${local.environment_management.account_ids[terraform.workspace]}:${each.key}" | ||
} |
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
Oops, something went wrong.