File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
modules/platform/forge_runners/forge_trust_validator Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ locals {
4141
4242 # concatenated_trust_object[arn] = full updated policy for each role
4343 concatenated_trust_object = {
44- for arn , trust in local . original_trust :
44+ for arn , trust in local . updated_statements :
4545 arn = > {
4646 Version = try (trust. Version , " 2012-10-17" )
4747 Statement = local.updated_statements[arn]
@@ -53,14 +53,20 @@ locals {
5353 for arn , obj in local . concatenated_trust_object :
5454 arn = > jsonencode (obj)
5555 }
56+
57+ original_statements_trust_json = {
58+ for arn , obj in local . original_statements :
59+ arn = > jsonencode (obj)
60+ }
5661}
5762
5863resource "null_resource" "update_forge_role_trust" {
5964 for_each = data. aws_iam_role . forge
6065
6166 triggers = {
62- role_name = each.value.name
63- future_sha = sha1 (local. concatenated_trust_json [each . key ])
67+ role_name = each.value.name
68+ original_sha = sha1 (local. original_statements_trust_json [each . key ])
69+ future_sha = sha1 (local. concatenated_trust_json [each . key ])
6470 }
6571
6672 provisioner "local-exec" {
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ def validate_forge_role_against_tenants(
157157 ]
158158 )
159159
160- # Optional: verify the tenant creds actually work
161160 tenant_creds = tenant_resp ['Credentials' ]
162161 sts_as_tenant = boto3 .client (
163162 'sts' ,
@@ -239,8 +238,7 @@ def lambda_handler(event, context):
239238 )
240239 all_results .append (res )
241240
242- LOG .info ('Validation complete' )
243- print (json .dumps (all_results , indent = 2 ))
241+ LOG .info ('Validation complete: %s' , json .dumps (all_results ))
244242
245243 return {
246244 'statusCode' : 200 ,
You can’t perform that action at this time.
0 commit comments