terraform.aws-baseline-infra/modules/security_identity_compliance/sso-permissionsets/main.tf

17 lines
553 B
Terraform
Raw Normal View History

2022-11-24 09:52:27 +08:00
data "aws_ssoadmin_instances" "sso1" {}
resource "aws_ssoadmin_permission_set" "pset" {
name = var.pset-name
description = var.pset-desc
instance_arn = tolist(data.aws_ssoadmin_instances.sso1.arns)[0]
session_duration = var.pset-session-duration
tags = var.default-tags
}
resource "aws_ssoadmin_managed_policy_attachment" "psetatt" {
instance_arn = tolist(data.aws_ssoadmin_instances.sso1.arns)[0]
managed_policy_arn = var.pset-managed-policy-arn
permission_set_arn = aws_ssoadmin_permission_set.pset.arn
}