|
1 |
| -# Module Blueprint |
| 1 | +# ECS instance profile |
2 | 2 |
|
3 |
| -Terraform module blueprint |
| 3 | +For an EC2 instance to connect itself to ECS it needs rights to do so. |
| 4 | + |
| 5 | + |
| 6 | +* [Why do we need ECS instance policies?](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html) |
| 7 | +* [ECS roles explained](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_managed_policies.html) |
| 8 | +* [More ECS policy examples explained](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/IAMPolicyExamples.html) |
4 | 9 |
|
5 | 10 | ---
|
6 | 11 |
|
@@ -51,30 +56,43 @@ module "blueprint" {
|
51 | 56 | | Name | Version |
|
52 | 57 | |------|---------|
|
53 | 58 | | <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1 |
|
| 59 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4 | |
54 | 60 |
|
55 | 61 | ## Providers
|
56 | 62 |
|
57 |
| -No providers. |
| 63 | +| Name | Version | |
| 64 | +|------|---------| |
| 65 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4 | |
58 | 66 |
|
59 | 67 | ## Modules
|
60 | 68 |
|
61 | 69 | No modules.
|
62 | 70 |
|
63 | 71 | ## Resources
|
64 | 72 |
|
65 |
| -No resources. |
| 73 | +| Name | Type | |
| 74 | +|------|------| |
| 75 | +| [aws_iam_instance_profile.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource | |
| 76 | +| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | |
| 77 | +| [aws_iam_role_policy_attachment.amazon_ssm_managed_instance_core](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | |
| 78 | +| [aws_iam_role_policy_attachment.ecs_ec2_cloudwatch_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | |
| 79 | +| [aws_iam_role_policy_attachment.ecs_ec2_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | |
66 | 80 |
|
67 | 81 | ## Inputs
|
68 | 82 |
|
69 | 83 | | Name | Description | Type | Default | Required |
|
70 | 84 | |------|-------------|------|---------|:--------:|
|
71 |
| -| <a name="input_variable"></a> [variable](#input\_variable) | defaul,description,type | `string` | `"variable"` | no | |
| 85 | +| <a name="input_include_ssm"></a> [include\_ssm](#input\_include\_ssm) | Whether to include policies needed for AmazonSSM | `bool` | `false` | no | |
| 86 | +| <a name="input_name"></a> [name](#input\_name) | Name to be used on all the resources as identifier | `string` | n/a | yes | |
| 87 | +| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to instance profile role | `map(string)` | `{}` | no | |
72 | 88 |
|
73 | 89 | ## Outputs
|
74 | 90 |
|
75 | 91 | | Name | Description |
|
76 | 92 | |------|-------------|
|
77 |
| -| <a name="output_used"></a> [used](#output\_used) | used value | |
| 93 | +| <a name="output_iam_instance_profile_arn"></a> [iam\_instance\_profile\_arn](#output\_iam\_instance\_profile\_arn) | ARN of the IAM instance profile | |
| 94 | +| <a name="output_iam_instance_profile_id"></a> [iam\_instance\_profile\_id](#output\_iam\_instance\_profile\_id) | ID of the IAM instance profile | |
| 95 | +| <a name="output_iam_role_id"></a> [iam\_role\_id](#output\_iam\_role\_id) | ID of the IAM role | |
78 | 96 | <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|
79 | 97 |
|
80 | 98 |
|
|
0 commit comments