From 3855cd30571424a862bf55304f4294054cf7c24e Mon Sep 17 00:00:00 2001 From: Prabhu Date: Wed, 18 Sep 2024 13:43:13 -0400 Subject: [PATCH] Change the data source to query saml idp metadata --- main.tf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.tf b/main.tf index 53b10f3..c2fb20a 100644 --- a/main.tf +++ b/main.tf @@ -2,18 +2,14 @@ data "keycloak_realm" "kc-lz-sso-realm" { realm = var.kc_realm } -// more-or-less drop-in replacement for (broken-in-0.14) http provider -data "external" "saml_idp_descriptor" { - program = ["${path.module}/bin/http_get.sh"] - query = { - url = "${var.kc_base_url}/realms/${var.kc_realm}/protocol/saml/descriptor" - } +data "http" "saml_idp_metadata" { + url = "${var.kc_base_url}/realms/${var.kc_realm}/protocol/saml/descriptor" } resource "aws_iam_saml_provider" "default" { name = var.aws_saml_idp_name - saml_metadata_document = tostring(data.external.saml_idp_descriptor.result.data) + saml_metadata_document = data.http.saml_idp_metadata.response_body } resource "aws_iam_role" "admin_role" {