Skip to content

Commit

Permalink
Release: 1.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Apr 23, 2024
1 parent 8ab218f commit aee036d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.1
1.12.2
4 changes: 2 additions & 2 deletions modules/aft-code-repositories/codebuild.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data "local_file" "account_provisioning_customizations_buildspec" {
}

resource "aws_codebuild_project" "account_request" {
depends_on = [aws_cloudwatch_log_group.account_request]
depends_on = [aws_cloudwatch_log_group.account_request, time_sleep.iam_eventual_consistency]
name = "ct-aft-account-request"
description = "Job to apply Terraform for Account Requests"
build_timeout = tostring(var.global_codebuild_timeout)
Expand Down Expand Up @@ -65,7 +65,7 @@ resource "aws_codebuild_project" "account_request" {
}

resource "aws_codebuild_project" "account_provisioning_customizations_pipeline" {
depends_on = [aws_cloudwatch_log_group.account_request]
depends_on = [aws_cloudwatch_log_group.account_request, time_sleep.iam_eventual_consistency]
name = "ct-aft-account-provisioning-customizations"
description = "Deploys the Account Provisioning Customizations terraform project"
build_timeout = tostring(var.global_codebuild_timeout)
Expand Down
5 changes: 5 additions & 0 deletions modules/aft-code-repositories/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ resource "aws_iam_role_policy" "terraform_oss_backend_account_request_codebuild_
})
}

resource "time_sleep" "iam_eventual_consistency" {
depends_on = [aws_iam_role.account_request_codebuild_role]
create_duration = "60s"
}

# CloudWatch Events Role

resource "aws_iam_role" "cloudwatch_events_codepipeline_role" {
Expand Down
6 changes: 3 additions & 3 deletions modules/aft-customizations/codebuild.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#####################################################

resource "aws_codebuild_project" "aft_global_customizations_terraform" {
depends_on = [aws_cloudwatch_log_group.aft_global_customizations_terraform]
depends_on = [aws_cloudwatch_log_group.aft_global_customizations_terraform, time_sleep.wait_for_iam_eventual_consistency]
name = "aft-global-customizations-terraform"
description = "Job to apply Terraform provided by the customer global customizations repo"
build_timeout = tostring(var.global_codebuild_timeout)
Expand Down Expand Up @@ -80,7 +80,7 @@ resource "aws_cloudwatch_log_group" "aft_global_customizations_terraform" {
#####################################################

resource "aws_codebuild_project" "aft_account_customizations_terraform" {
depends_on = [aws_cloudwatch_log_group.aft_account_customizations_terraform]
depends_on = [aws_cloudwatch_log_group.aft_account_customizations_terraform, time_sleep.wait_for_iam_eventual_consistency]
name = "aft-account-customizations-terraform"
description = "Job to apply Terraform provided by the customer account customizations repo"
build_timeout = tostring(var.global_codebuild_timeout)
Expand Down Expand Up @@ -153,7 +153,7 @@ resource "aws_cloudwatch_log_group" "aft_account_customizations_terraform" {
#####################################################

resource "aws_codebuild_project" "aft_create_pipeline" {
depends_on = [aws_cloudwatch_log_group.aft_create_pipeline]
depends_on = [aws_cloudwatch_log_group.aft_create_pipeline, time_sleep.wait_for_iam_eventual_consistency]
name = "aft-create-pipeline"
description = "Job to run Terraform required to create account specific customizations pipeline"
build_timeout = tostring(var.global_codebuild_timeout)
Expand Down
5 changes: 5 additions & 0 deletions modules/aft-customizations/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ resource "aws_iam_role_policy" "aft_codebuild_customizations_policy" {
})
}

resource "time_sleep" "wait_for_iam_eventual_consistency" {
depends_on = [aws_iam_role.aft_codebuild_customizations_role]
create_duration = "60s"
}

###################################################################
# Step Functions - Invoke Customizations
###################################################################
Expand Down

0 comments on commit aee036d

Please sign in to comment.