AWS single sign-on with Okta using Terraform

Using Terraform to configure AWS SSO using the IAM identity provider and Okta Saml app

Akhilesh Mishra
6 min readNov 16, 2023

When you integrate your AWS instance with Okta, users can authenticate to one or more AWS accounts with specific IAM roles using single sign-on with SAML.

You can import roles from one or more AWS accounts into Okta, assign them to users, and set the duration of the authenticated sessions.

Photo by Brendan Church on Unsplash

In the last blog post, I explained the complete process of setting up AWS single sign-on with Okta using AWS and Okta console.

In this blog, we will do the complete setup thing using Terraform.
You can find the code used in this blog here.

Initial setup

  • Create one folder called `terraform-aws-okta` create basic terraform files, and do a basic setup.
touch providers.tf backend.tf versions.tf variables.tf iam.tf okta.tf

--

--

Akhilesh Mishra

DevOps engineer with expertise in multi-cloud, and various DevOps tools.