Skip to content

Commit f64e50b

Browse files
committed
[NDR-181] moving data blocks to the top
1 parent 26a5cbb commit f64e50b

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

infrastructure/modules/ecr/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
data "aws_caller_identity" "current" {}
2+
13
resource "aws_ecr_repository" "ndr-ecr" {
24
name = var.app_name
35
image_tag_mutability = "MUTABLE"
@@ -39,8 +41,6 @@ resource "aws_ecr_lifecycle_policy" "ndr_ecr_lifecycle_policy" {
3941
EOF
4042
}
4143

42-
data "aws_caller_identity" "current" {}
43-
4444
resource "aws_ecr_repository_policy" "ndr_ecr_repository_policy" {
4545
repository = aws_ecr_repository.ndr-ecr.name
4646
policy = <<EOF

infrastructure/modules/kms/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
data "aws_caller_identity" "current" {}
2+
13
resource "aws_kms_key" "encryption_key" {
24
description = var.kms_key_description
35
policy = data.aws_iam_policy_document.combined_policy_documents.json
@@ -16,8 +18,6 @@ resource "aws_kms_alias" "encryption_key_alias" {
1618
target_key_id = aws_kms_key.encryption_key.id
1719
}
1820

19-
data "aws_caller_identity" "current" {}
20-
2121
data "aws_iam_policy_document" "kms_key_base" {
2222
statement {
2323
effect = "Allow"

infrastructure/modules/lambda_edge/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
data "aws_caller_identity" "current" {}
2+
13
resource "aws_lambda_function" "lambda" {
24
provider = aws
35
publish = true
@@ -16,7 +18,6 @@ resource "aws_lambda_function" "lambda" {
1618
}
1719
}
1820

19-
2021
data "archive_file" "lambda" {
2122
type = "zip"
2223
source_file = "placeholder_lambda.py"
@@ -41,8 +42,6 @@ data "aws_iam_policy_document" "assume_role" {
4142
}
4243
}
4344

44-
data "aws_caller_identity" "current" {}
45-
4645
data "aws_iam_policy_document" "lambda_policy" {
4746
statement {
4847
effect = "Allow"

0 commit comments

Comments
 (0)