diff --git a/cd3_automation_toolkit/Storage/ObjectStorage/create_terraform_oss.py b/cd3_automation_toolkit/Storage/ObjectStorage/create_terraform_oss.py index ab77d99bb..8e842f039 100644 --- a/cd3_automation_toolkit/Storage/ObjectStorage/create_terraform_oss.py +++ b/cd3_automation_toolkit/Storage/ObjectStorage/create_terraform_oss.py @@ -289,10 +289,12 @@ def create_terraform_oss(inputfile, outdir, service_dir, prefix, ct): print( f"'{time_rule_locked}' is not in the correct format. It should be in the format 'dd-mm-yyyy'. The retention rules will not be processed.") continue + ''' else: print( f"'{time_rule_locked}' is not in the correct format. It should be in the format of 'YYYY-MM-DDThh:mm:ssZ' or 'YYYY-MM-DDThh:mm:ss.fffZ'. The retention rules will not be processed.") continue + ''' tempdict = {'retention_rule_display_name': retention_rule_display_name, 'time_unit': time_unit, diff --git a/cd3_automation_toolkit/Storage/ObjectStorage/export_terraform_oss.py b/cd3_automation_toolkit/Storage/ObjectStorage/export_terraform_oss.py index 425d1361f..11e9e15f4 100644 --- a/cd3_automation_toolkit/Storage/ObjectStorage/export_terraform_oss.py +++ b/cd3_automation_toolkit/Storage/ObjectStorage/export_terraform_oss.py @@ -236,11 +236,11 @@ def export_buckets(inputfile, outdir, service_dir, config, signer, ct, export_co rt_time_rule_locked = str(retention_policy.time_rule_locked) if rt_time_rule_locked != 'None' and rt_time_rule_locked != '': date_obj = parser.parse(rt_time_rule_locked) - rt_time_rule_locked = date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z" + # rt_time_rule_locked = date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z" + rt_time_rule_locked = (date_obj.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3]).rstrip("0") + "Z" rt_data = rt_name + "::" + rt_time_amount + "::" + rt_time_unit + "::" + rt_time_rule_locked else: rt_data = rt_name + "::" + rt_time_amount + "::" + rt_time_unit - else: rt_data=rt_name + "::indefinite" retention_rule_data_list.append(rt_data) diff --git a/cd3_automation_toolkit/user-scripts/terraform/modules/identity/identity-domain-user/main.tf b/cd3_automation_toolkit/user-scripts/terraform/modules/identity/identity-domain-user/main.tf index 0f12fef69..04c1e56c1 100644 --- a/cd3_automation_toolkit/user-scripts/terraform/modules/identity/identity-domain-user/main.tf +++ b/cd3_automation_toolkit/user-scripts/terraform/modules/identity/identity-domain-user/main.tf @@ -31,10 +31,14 @@ resource "oci_identity_domains_user" "user" { value = var.email verified = false } - emails { + dynamic "emails" { + for_each = var.recovery_email != null ?[1]:[] + content { type = "recovery" value = var.recovery_email +} } + dynamic "phone_numbers" { for_each = can(var.home_phone_number) && var.home_phone_number != null ? [var.home_phone_number] : [] content {