diff --git a/terraform/environments/ccms-ebs/ccms-certificates-outputs.tf b/terraform/environments/ccms-ebs/ccms-certificates-outputs.tf index 9b3435c341e..e5d4a9d7095 100644 --- a/terraform/environments/ccms-ebs/ccms-certificates-outputs.tf +++ b/terraform/environments/ccms-ebs/ccms-certificates-outputs.tf @@ -1,60 +1,60 @@ output "aws_acm_certificate-external-arn" { description = "aws_acm_certificate external arn" - value = aws_acm_certificate.external[count.index].arn + value = try(aws_acm_certificate.external[*].arn, "None") } output "aws_acm_certificate-external-domain_name" { description = "aws_acm_certificate external domain_name" - value = aws_acm_certificate.external[count.index].domain_name + value = try(aws_acm_certificate.external[*].domain_name, "None") } output "aws_acm_certificate-external-not_after" { description = "aws_acm_certificate external not_after" - value = aws_acm_certificate.external[count.index].not_after + value = try(try(aws_acm_certificate.external[*].not_after, "None"), "None") } output "aws_acm_certificate-external-status" { description = "aws_acm_certificate external status" - value = aws_acm_certificate.external[count.index].status + value = try(aws_acm_certificate.external[*].status, "None") } # output "aws_acm_certificate-external-service-arn" { description = "aws_acm_certificate external-service arn" - value = aws_acm_certificate.external-service[count.index].arn + value = try(aws_acm_certificate.external-service[*].arn, "None") } output "aws_acm_certificate-external-service-domain_name" { description = "aws_acm_certificate external-service domain_name" - value = aws_acm_certificate.external-service[count.index].domain_name + value = try(aws_acm_certificate.external-service[*].domain_name, "None") } output "aws_acm_certificate-external-service-not_after" { description = "aws_acm_certificate external-service not_after" - value = aws_acm_certificate.external-service[count.index].not_after + value = try(aws_acm_certificate.external-service[*].not_after, "None") } output "aws_acm_certificate-external-service-status" { description = "aws_acm_certificate external-service status" - value = aws_acm_certificate.external-service[count.index].status + value = try(aws_acm_certificate.external-service[*].status, "None") } # output "aws_route53_record-external_validation-fqdn" { description = "aws_route53_record external_validation fqdn" - value = aws_route53_record.external_validation[count.index].fqdn + value = try(aws_route53_record.external_validation[*].fqdn, "None") } output "aws_route53_record-external_validation-name" { description = "aws_route53_record external_validation name" - value = aws_route53_record.external_validation[count.index].name + value = try(aws_route53_record.external_validation[*].name, "None") } # output "aws_acm_certificate_validation-external-id" { description = "aws_acm_certificate_validation external id" - value = aws_acm_certificate_validation.external[count.index].id + value = try(aws_acm_certificate_validation.external[*].id, "None") } diff --git a/terraform/environments/ccms-ebs/ccms-cloudwatch-outputs.tf b/terraform/environments/ccms-ebs/ccms-cloudwatch-outputs.tf index 2692ef8d344..1589885e2ac 100644 --- a/terraform/environments/ccms-ebs/ccms-cloudwatch-outputs.tf +++ b/terraform/environments/ccms-ebs/ccms-cloudwatch-outputs.tf @@ -7,7 +7,7 @@ output "aws_ssm_document_cloud_watch_agent_description" { output "aws_cloudwatch_log_group_groups_arn" { description = "aws_cloudwatch_log_group groups arn" - value = aws_cloudwatch_log_group.groups[each.key].arn + value = try(aws_cloudwatch_log_group.groups[*].arn, "None") } # diff --git a/terraform/environments/ccms-ebs/ccms-dlm-outputs.tf b/terraform/environments/ccms-ebs/ccms-dlm-outputs.tf index 1ac30edbbfb..03122265ba3 100644 --- a/terraform/environments/ccms-ebs/ccms-dlm-outputs.tf +++ b/terraform/environments/ccms-ebs/ccms-dlm-outputs.tf @@ -1,38 +1,38 @@ output "aws_iam_role_dlm_lifecycle_role_arn" { description = "aws_iam_role dlm_lifecycle_role arn" - value = aws_iam_role.dlm_lifecycle_role[count.index].arn + value = try(aws_iam_role.dlm_lifecycle_role[*].arn, "None") } output "aws_iam_role_dlm_lifecycle_role_name" { description = "aws_iam_role dlm_lifecycle_role name" - value = aws_iam_role.dlm_lifecycle_role[count.index].name + value = try(aws_iam_role.dlm_lifecycle_role[*].name, "None") } # output "aws_iam_role_policy_dlm_lifecycle_id" { description = "aws_iam_role_policy dlm_lifecycle id" - value = aws_iam_role_policy.dlm_lifecycle[count.index].id + value = try(aws_iam_role_policy.dlm_lifecycle[*].id, "None") } output "aws_iam_role_policy_dlm_lifecycle_name" { description = "aws_iam_role_policy dlm_lifecycle name" - value = aws_iam_role_policy.dlm_lifecycle[count.index].name + value = try(aws_iam_role_policy.dlm_lifecycle[*].name, "None") } output "aws_iam_role_policy_dlm_lifecycle_policy" { description = "aws_iam_role_policy dlm_lifecycle policy" - value = aws_iam_role_policy.dlm_lifecycle[count.index].policy + value = try(aws_iam_role_policy.dlm_lifecycle[*].policy, "None") } output "aws_iam_role_policy_dlm_lifecycle_role" { description = "aws_iam_role_policy dlm_lifecycle role" - value = aws_iam_role_policy.dlm_lifecycle[count.index].role + value = try(aws_iam_role_policy.dlm_lifecycle[*].role, "None") } # output "aws_dlm_lifecycle_policy_lifecyclerole_arn" { description = "aws_dlm_lifecycle_policy lifecyclerole arn" - value = aws_dlm_lifecycle_policy.lifecyclerole[count.index].arn + value = try(aws_dlm_lifecycle_policy.lifecyclerole[*].arn, "None") }