Criando uma role, com relação de confiaça para uma conta externa. Por exemplo, CloudHealth.
O codigo irá prover os seguintes recursos
Example de uso do module
module "iam_role" {
source = "git@github.com:jslopes8/terraform-aws-iam-roles.git?ref=v1.0"
name = "test_role"
description = "role test "
assume_role_policy = [
{
sid = "1"
actions = [
"sts:AssumeRole"
]
principals = {
type = "Service"
identifiers = [
"ec2.amazonaws.com"
]
}
}
]
# Tags
default_tags = {
ApplicationRole = "Portal Web"
Owner = "Tirulipa da Silva"
}
}
Name | Description | Required | Type | Default |
---|---|---|---|---|
name | The name of the role and policy | yes |
string |
|
description | The description of the role | yes |
string |
|
path | The path to the role. See IAM Identifiers for more information. | no |
string |
/ |
force_detach_policies | Specifies to force detaching any policies the role has before destroying it | no |
bool |
false |
max_session_duration | The maximum session duration (in seconds) that you want to set for the specified role | no |
number |
3600 |
assume_role_policy | The policy that grants an entity permission to assume the role. | yes |
map |
[ ] |
iam_policy | The policy document. | yes |
map |
[ ] |
default_tags | Key-value mapping of tags for the IAM role | yes | map(string) |
{ } |
Name | Description |
---|---|
role_arn | The ARN Role created |