Skip to main content

SAML Provider

๐Ÿ“ฆ Overviewโ€‹

This Terraform module provisions an AWS IAM SAML provider, enabling federated access through external identity providers using the SAML 2.0 standard.


โœ… Key Featuresโ€‹

  • Registers a trusted SAML identity provider using metadata XML
  • Enables Single Sign-On (SSO) with IdPs like Okta, Azure AD, or Google Workspace
  • Tags provider resources for environment visibility and tracking
  • Supports centralized access management and identity federation

๐Ÿ’ผ Use Casesโ€‹

  • Integrate AWS IAM with enterprise SSO providers
  • Enable federated login for developers or auditors
  • Meet identity governance and compliance requirements
  • Provide SAML-based access without using IAM users

๐Ÿ“ฅ Input Variablesโ€‹

NameTypeDescription
regionstringAWS region for deployment
saml_provider_namestringName for the IAM SAML provider
metadata_documentstringContent or path to the IdP metadata XML file
environmentstringDeployment environment tag (e.g., dev, prod)

๐Ÿ“ค Outputsโ€‹

NameDescription
saml_provider_arnARN of the created SAML provider
saml_provider_nameName of the created SAML provider

๐Ÿš€ Deployment Readinessโ€‹

  • โœ… Compatible with Terraform 1.0+
  • โœ… Requires AWS Provider 5.x+
  • ๐Ÿ” Requires iam:CreateSAMLProvider permission

๐Ÿ› ๏ธ Example Usageโ€‹

module "saml_provider_deployment" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//identity/saml-provider?ref=v1.0.0"

region = "us-east-1"
saml_provider_name = "MyCompanySAML"
metadata_document = file("saml-metadata.xml")
environment = "prod"
}
terraform init
terraform plan
terraform apply

or

tofu init
tofu plan
tofu apply

๐Ÿงน Cleanupโ€‹

Terraform Destroy:

terraform destroy

or

tofu destroy

Manual Deletion:

aws iam delete-saml-provider \
--saml-provider-arn arn:aws:iam::<account-id>:saml-provider/MyCompanySAML

โš ๏ธ Be careful when deleting active SAML providers used in role trust policies.


๐Ÿ›ก๏ธ Notesโ€‹

This is a Level 1 identity federation module.
To fully enable federated access, pair this with one or more IAM roles that trust the SAML provider and assign permissions accordingly.


๐Ÿ”’ Deployment Package Noticeโ€‹

This module is part of the Level 1 AWS License Tier.
To access the full deployment package and source code, subscribe to Archiphire.