AWS SSO Permission Set Inline Policy

This page shows how to write Terraform and CloudFormation for AWS SSO Permission Set Inline Policy and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_ssoadmin_permission_set_inline_policy)

Provides an IAM inline policy for a Single Sign-On (SSO) Permission Set resource

NOTE: AWS Single Sign-On (SSO) only supports one IAM inline policy per aws_ssoadmin_permission_set resource. Creating or updating this resource will automatically Provision the Permission Set to apply the corresponding updates to all assigned accounts.

Parameters

Example Usage (from GitHub)

github-iconglyhood/AWSSSO
resource "aws_ssoadmin_permission_set_inline_policy" "DevOps_DevEnv_Custom_Policy" {
  inline_policy      = data.aws_iam_policy_document.DevOps_DevEnv_Custom_Policy.json
  instance_arn       = aws_ssoadmin_permission_set.DevOps_DevEnv.instance_arn
  permission_set_arn = aws_ssoadmin_permission_set.DevOps_DevEnv.arn
}

github-iconcloud-security-labs/terraform-aws-ssoadmin-permission-set
resource "aws_ssoadmin_permission_set_inline_policy" "this" {
  for_each           = length(var.inline_policy_documents) > 0 ? toset(var.inline_policy_documents) : []
  inline_policy      = each.value
  instance_arn       = var.instance_arn
  permission_set_arn = aws_ssoadmin_permission_set.this.arn
}
github-icongadgetry-io/terraform-aws-sso-permission-set
resource "aws_ssoadmin_permission_set_inline_policy" "main" {
  count = length(var.inline_policy_jsons) > 0 ? 1 : 0

  inline_policy      = data.aws_iam_policy_document.main.json
  instance_arn       = aws_ssoadmin_permission_set.main.instance_arn
  permission_set_arn = aws_ssoadmin_permission_set.main.arn
github-iconasrkata/SebastianUA-terraform
resource "aws_ssoadmin_permission_set_inline_policy" "ssoadmin_permission_set_inline_policy" {
  count = var.enable_ssoadmin_permission_set_inline_policy ? length(var.ssoadmin_permission_set_inline_policy_inline_policies) : 0

  inline_policy      = var.ssoadmin_permission_set_inline_policy_inline_policies[count.index]
  instance_arn       = var.ssoadmin_permission_set_inline_policy_instance_arn != "" ? var.ssoadmin_permission_set_inline_policy_instance_arn : (var.enable_ssoadmin_permission_set ? aws_ssoadmin_permission_set.ssoadmin_permission_set[0].instance_arn : null)
  permission_set_arn = var.ssoadmin_permission_set_inline_policy_permission_set_arn != "" ? var.ssoadmin_permission_set_inline_policy_permission_set_arn : (var.enable_ssoadmin_permission_set ? aws_ssoadmin_permission_set.ssoadmin_permission_set[0].arn : null)
github-iconcloud-security-labs/terraform-aws-sso
resource "aws_ssoadmin_permission_set_inline_policy" "this" {
  count              = length(var.inline_policy) > 0 ? 1 : 0
  inline_policy      = var.inline_policy
  instance_arn       = aws_ssoadmin_permission_set.this.instance_arn
  permission_set_arn = aws_ssoadmin_permission_set.this.arn
}

CloudFormation Example (AWS::SSO::PermissionSet)

Specifies a permission set within a specified SSO instance.

Parameters

Frequently asked questions

What is AWS SSO Permission Set Inline Policy?

AWS SSO Permission Set Inline Policy is a resource for SSO of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS SSO Permission Set Inline Policy?

For Terraform, the glyhood/AWSSSO, cloud-security-labs/terraform-aws-ssoadmin-permission-set and gadgetry-io/terraform-aws-sso-permission-set source code examples are useful. See the Terraform Example section for further details.