Provides an IAM group.
resource "aws_iam_group" "developers" {
name = "developers"
path = "/users/"
}
This resource supports the following arguments:
name
- (Required) The group's name. The name must consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-_.
. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins".path
- (Optional, default "/") Path in which to create the group.This resource exports the following attributes in addition to the arguments above:
id
- The group's name.arn
- The ARN assigned by AWS for this group.name
- The group's name.path
- The path of the group in IAM.unique_id
- The unique ID assigned by AWS.In Terraform v1.5.0 and later, use an import
block to import IAM Groups using the name
. For example:
import {
to = aws_iam_group.developers
id = "developers"
}
Using terraform import
, import IAM Groups using the name
. For example:
% terraform import aws_iam_group.developers developers