Skip to content

Commit

Permalink
Fix Issue with SAML Document for IDP (#15)
Browse files Browse the repository at this point in the history
* Fix for absent server certificate when SSO enabled

* Using enabled local

* fix: CA Key should always be published

* fix: Replacing join with list notation

* Adding name for saml idp
  • Loading branch information
r351574nc3 authored Nov 2, 2021
1 parent f356612 commit be1df55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
certificate_backends = ["ACM", "SSM"]
mutual_enabled = var.authentication_type == "certificate-authentication"
federated_enabled = var.authentication_type == "federated-authentication"
saml_provider_arn = local.federated_enabled ? try(join("", aws_iam_saml_provider.default.*.arn), var.saml_provider_arn) : null
saml_provider_arn = local.federated_enabled ? try(aws_iam_saml_provider.default[0].arn, var.saml_provider_arn) : null
root_certificate_chain_arn = local.mutual_enabled ? module.self_signed_cert_root.certificate_arn : null
cloudwatch_log_group = var.logging_enabled ? module.cloudwatch_log.log_group_name : null
cloudwatch_log_stream = var.logging_enabled ? var.logging_stream_name : null
Expand Down Expand Up @@ -132,7 +132,7 @@ module "cloudwatch_log" {
resource "aws_iam_saml_provider" "default" {
count = var.saml_metadata_document != null ? 1 : 0

name = var.name
name = module.this.id
saml_metadata_document = var.saml_metadata_document
}

Expand Down Expand Up @@ -233,4 +233,4 @@ data "aws_ssm_parameter" "root_key" {
depends_on = [
module.self_signed_cert_root
]
}
}

0 comments on commit be1df55

Please sign in to comment.