Skip to content

Commit

Permalink
Merge pull request #3144 from ministryofjustice/CC-2017/add-outputs
Browse files Browse the repository at this point in the history
CC-2017: Add outputs to ccms-ebs Terraform code.
  • Loading branch information
mmgovuk authored Aug 29, 2023
2 parents 50b1d15 + 37c6d0a commit 2f5947c
Show file tree
Hide file tree
Showing 27 changed files with 1,324 additions and 15 deletions.
49 changes: 49 additions & 0 deletions terraform/environments/ccms-ebs/ccms-athena-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
output "aws_athena_database_lb_access_logs_id" {
description = "aws_athena_database lb-access-logs id"
value = aws_athena_database.lb-access-logs.id
}

#

output "aws_athena_workgroup_lb_access_logs_arn" {
description = "aws_athena_workgroup lb-access-logs arn"
value = aws_athena_workgroup.lb-access-logs.arn
}

output "aws_athena_workgroup_lb_access_logs_configuration" {
description = "aws_athena_workgroup lb-access-logs configuration"
value = aws_athena_workgroup.lb-access-logs.configuration
}

output "aws_athena_workgroup_lb_access_logs_id" {
description = "aws_athena_workgroup lb-access-logs id"
value = aws_athena_workgroup.lb-access-logs.id
}

#

output "aws_athena_named_query_main_table_ebsapp" {
description = "aws_athena_named_query main_table_ebsapp id"
value = aws_athena_named_query.main_table_ebsapp.id
}

#

output "aws_athena_named_query_http_requests_ebsapp" {
description = "aws_athena_named_query http_requests_ebsapp id"
value = aws_athena_named_query.http_requests_ebsapp.id
}

#

output "aws_athena_named_query_main_table_wgate" {
description = "aws_athena_named_query main_table_wgate id"
value = aws_athena_named_query.main_table_wgate.id
}

#

output "aws_athena_named_query_http_requests_wgate" {
description = "aws_athena_named_query http_requests_wgate id"
value = aws_athena_named_query.http_requests_wgate.id
}
60 changes: 60 additions & 0 deletions terraform/environments/ccms-ebs/ccms-certificates-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
output "aws_acm_certificate-external-arn" {
description = "aws_acm_certificate external arn"
value = try(aws_acm_certificate.external[*].arn, "None")
}

output "aws_acm_certificate-external-domain_name" {
description = "aws_acm_certificate external 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 = try(aws_acm_certificate.external[*].not_after, "None")
}

output "aws_acm_certificate-external-status" {
description = "aws_acm_certificate external status"
value = try(aws_acm_certificate.external[*].status, "None")
}

#

output "aws_acm_certificate-external-service-arn" {
description = "aws_acm_certificate external-service 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 = 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 = try(aws_acm_certificate.external-service[*].not_after, "None")
}

output "aws_acm_certificate-external-service-status" {
description = "aws_acm_certificate external-service 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 = try(aws_route53_record.external_validation[*].fqdn, "None")
}

output "aws_route53_record-external_validation-name" {
description = "aws_route53_record external_validation 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 = try(aws_acm_certificate_validation.external[*].id, "None")
}
54 changes: 54 additions & 0 deletions terraform/environments/ccms-ebs/ccms-cloudwatch-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
output "aws_ssm_document_cloud_watch_agent_description" {
description = "aws_ssm_document cloud_watch_agent description"
value = aws_ssm_document.cloud_watch_agent.description
}

#

output "aws_cloudwatch_log_group_groups_arn" {
description = "aws_cloudwatch_log_group groups arn"
value = try(aws_cloudwatch_log_group.groups[*].arn, "None")
}

#

output "aws_ssm_parameter_cw_agent_config_arn" {
description = "aws_ssm_parameter cw_agent_config arn"
value = aws_ssm_parameter.cw_agent_config.arn
}

#

output "aws_ssm_association_update_ssm_agent_arn" {
description = "aws_ssm_association update_ssm_agent arn"
value = aws_ssm_association.update_ssm_agent.arn
}

output "aws_ssm_association_update_ssm_agent_targets" {
description = "aws_ssm_association update_ssm_agent targets"
value = aws_ssm_association.update_ssm_agent.targets
}

output "aws_ssm_association_update_ssm_agent_name" {
description = "aws_ssm_association update_ssm_agent name"
value = aws_ssm_association.update_ssm_agent.name
}

#

output "aws_iam_policy_cloudwatch_datasource_policy_arn" {
description = "aws_iam_policy cloudwatch_datasource_policy arn"
value = aws_iam_policy.cloudwatch_datasource_policy.arn
}

output "aws_iam_policy_cloudwatch_datasource_policy_policy" {
description = "aws_iam_policy cloudwatch_datasource_policy policy"
value = aws_iam_policy.cloudwatch_datasource_policy.policy
}

#

# This resource exports no additional attributes.
#output "aws_iam_role_policy_attachment_cloudwatch_datasource_policy_attach" {
# value = aws_iam_role_policy_attachment.cloudwatch_datasource_policy_attach
#}
38 changes: 38 additions & 0 deletions terraform/environments/ccms-ebs/ccms-dlm-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
output "aws_iam_role_dlm_lifecycle_role_arn" {
description = "aws_iam_role dlm_lifecycle_role 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 = 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 = 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 = 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 = 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 = try(aws_iam_role_policy.dlm_lifecycle[*].role, "None")
}

#

output "aws_dlm_lifecycle_policy_lifecyclerole_arn" {
description = "aws_dlm_lifecycle_policy lifecyclerole arn"
value = try(aws_dlm_lifecycle_policy.lifecyclerole[*].arn, "None")
}
14 changes: 14 additions & 0 deletions terraform/environments/ccms-ebs/ccms-ec2-clamav-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "aws_instance_ec2_clamav_arn" {
description = "aws_instance ec2_clamav arn"
value = aws_instance.ec2_clamav.arn
}

output "aws_instance_ec2_clamav_private_dns" {
description = "aws_instance ec2_clamav private_dns"
value = aws_instance.ec2_clamav.private_dns
}

output "aws_instance_ec2_clamav_private_ip" {
description = "aws_instance ec2_clamav private_ip"
value = aws_instance.ec2_clamav.private_ip
}
14 changes: 14 additions & 0 deletions terraform/environments/ccms-ebs/ccms-ec2-ftp-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "aws_instance_ec2_ftp_arn" {
description = "aws_instance ec2_ftp arn"
value = aws_instance.ec2_ftp.arn
}

output "aws_instance_ec2_ftp_private_dns" {
description = "aws_instance ec2_ftp private_dns"
value = aws_instance.ec2_ftp.private_dns
}

output "aws_instance_ec2_ftp_private_ip" {
description = "aws_instance ec2_ftp private_ip"
value = aws_instance.ec2_ftp.private_ip
}
4 changes: 4 additions & 0 deletions terraform/environments/ccms-ebs/ccms-ec2-mailrelay-outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "aws_instance_ec2_mailrelay_private_ip" {
description = "aws_instance ec2_mailrelay private_ip"
value = aws_instance.ec2_mailrelay.private_ip
}
9 changes: 5 additions & 4 deletions terraform/environments/ccms-ebs/ccms-ec2-mailrelay.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ output "route53_record_mailrelay" {
}
*/

output "ec2_private_ip_mailrelay" {
description = "Mailrelay Private IP"
value = aws_instance.ec2_mailrelay.private_ip
}
# Moved to ccms-ec2-mailrelay-outputs.tf
#output "ec2_private_ip_mailrelay" {
# description = "Mailrelay Private IP"
# value = aws_instance.ec2_mailrelay.private_ip
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "aws_instance_ec2_accessgate_arn" {
description = "aws_instance ec2_accessgate arn"
value = aws_instance.ec2_accessgate[*].arn
}

output "aws_instance_ec2_accessgate_private_dns" {
description = "aws_instance ec2_accessgate private_dns"
value = aws_instance.ec2_accessgate[*].private_dns
}

output "aws_instance_ec2_accessgate_private_ip" {
description = "aws_instance ec2_accessgate private_ip"
value = aws_instance.ec2_accessgate[*].private_ip
}
Loading

0 comments on commit 2f5947c

Please sign in to comment.