Terraform module Provides an IAM role policy attachment resource in AWS cloud provider.
Terraform module Provides an IAM Role Policy Attachment resources in AWS cloud provider...
This module needs Terraform 0.12.18 or newer. You can download the latest Terraform version from here.
This module deploys aws services details are in respective feature branches.
Below we are able to check the resources that are being created as part of this module call:
- IAM Role Policy Attachment
To use this module, add the following call to your code:
module "iam_role_policy_attachment" {
source = "git::https://github.com/nitinda/terraform-module-aws-iam-role-policy-attachment.git?ref=master"
providers = {
aws = aws.services
}
## IAM Role Policy
role = var.role
policy_arn = var.policy_arn
}
module "iam_role_policy_attachment" {
source = "git::https://github.com/nitinda/terraform-module-aws-iam-role-policy-attachment.git?ref=master"
providers = {
aws = aws.services
}
## IAM Role Policy
role = module.iam_role.name
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM"
}
The variables required in order for the module to be successfully called from the deployment repository are the following:
Variable | Description | Type | Argument Status |
---|---|---|---|
role | The role name the policy should be applied to | string | Required |
policy_arn | The ARN of the policy you want to apply | string | Required |
This module has the following outputs:
- N/A
In order for the variables to be accessed at module level please use the syntax below:
module.<module_name>.<output_variable_name>
The output variable is able to be accessed through terraform state file using the syntax below:
data.terraform_remote_state.<layer_name>.<output_variable_name>
Module maintained by Module maintained by the - Nitin Das