Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for IAM role and isntance profile creation #194

Conversation

bryantbiggs
Copy link
Member

Description

  • Add support for creating IAM role and IAM instance profile
  • Fix target tracking policy which was missing the resource_label attribute defintion

Motivation and Context

Breaking Changes

  • No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

iam_role_tags = {
CustomIamRole = "Yes"
}
iam_role_policies = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carrying over format from IAM so even generated IAM policies will work

@@ -338,6 +348,17 @@ module "complete" {
}
}
}
request-count-per-target = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding test case from #192

@@ -695,6 +701,7 @@ resource "aws_autoscaling_policy" "this" {
for_each = try([target_tracking_configuration.value.predefined_metric_specification], [])
content {
predefined_metric_type = predefined_metric_specification.value.predefined_metric_type
resource_label = try(predefined_metric_specification.value.resource_label, null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #192

@@ -229,12 +229,6 @@ variable "ebs_optimized" {
default = null
}

variable "iam_instance_profile_name" {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is just moved down to the IAM role/profile section

@@ -401,12 +395,6 @@ variable "hibernation_options" {
default = {}
}

variable "iam_instance_profile_arn" {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is just moved down to the IAM role/profile section

Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good. Comments on specific blocks helped to understand the changes while reviewing on mobile (using github mobile app).

@bryantbiggs bryantbiggs merged commit 2a9983f into terraform-aws-modules:master Jun 3, 2022
@bryantbiggs bryantbiggs deleted the feat/instance-role-profile branch June 3, 2022 12:26
antonbabenko pushed a commit that referenced this pull request Jun 3, 2022
## [6.5.0](v6.4.0...v6.5.0) (2022-06-03)

### Features

* Add support for IAM role and isntance profile creation ([#194](#194)) ([2a9983f](2a9983f))
@antonbabenko
Copy link
Member

This PR is included in version 6.5.0 🎉

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource label should be specified for predefined metric type ALBRequestCountPerTarget
2 participants