Skip to content

feat: Add var.task_execution_session_duration for task execution role #251

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

Conversation

itmustbejj
Copy link
Contributor

@itmustbejj itmustbejj commented Feb 2, 2022

Description

Add var.task_execution_session_duration for task execution role.

image
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role

Motivation and Context

The default max_session_duration for iam roles of 1 hour is insufficient for long-running terraform applies. This leads to runs breaking and failing to persist their state in s3, and often requires painful manual cleanup.

Breaking Changes

None

How Has This Been Tested?

  • I have tested and validated these changes using one or more of the provided examples/* projects

@itmustbejj itmustbejj force-pushed the feat/execution-role-session-duration branch 2 times, most recently from 992702f to b80c922 Compare February 2, 2022 19:05
variables.tf Outdated
@@ -672,3 +672,14 @@ variable "ephemeral_storage_size" {
error_message = "The minimum supported value is 21 GiB and the maximum supported value is 200 GiB."
}
}

variable "task_execution_session_duration" {
Copy link
Member

Choose a reason for hiding this comment

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

lets do the following please:

variable "max_session_duration" {
  description = "Maximum session duration (in seconds) that you want to set for the specified role. Default is 3600"
  type        = number
  default     = null
}

Note - you'll need to rename the variable above in main.tf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bryantbiggs thanks for the prompt feedback. That should be all set.

Copy link
Member

Choose a reason for hiding this comment

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

Also, please fix the docs by running pre-commit run -a and committing the changes.

@itmustbejj itmustbejj force-pushed the feat/execution-role-session-duration branch 4 times, most recently from 501861d to 3c4afd9 Compare February 2, 2022 19:21
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

thanks for the PR @itmustbejj !

@antonbabenko should be good to go 👍🏽

@bryantbiggs
Copy link
Member

sorry to hear your plans take that long - might want to think about splitting up that statefile 😅

@itmustbejj
Copy link
Contributor Author

itmustbejj commented Feb 2, 2022

We use terragrunt so the state files are already split up pretty judiciously. The specific use case here is around long-running sync jobs. I have ideas for the next refactor, but you know how that goes...

@github-actions
Copy link

github-actions bot commented Mar 5, 2022

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Mar 5, 2022
@itmustbejj itmustbejj force-pushed the feat/execution-role-session-duration branch from 3c4afd9 to 105c7ba Compare March 9, 2022 00:30
@itmustbejj
Copy link
Contributor Author

@antonbabenko @bryantbiggs apologies for the delay. I rebased my PR and updated the README via pre-commit run -a.

@github-actions github-actions bot removed the stale label Mar 10, 2022
@itmustbejj itmustbejj force-pushed the feat/execution-role-session-duration branch from 105c7ba to 99ac322 Compare March 31, 2022 15:26
@github-actions
Copy link

github-actions bot commented May 1, 2022

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label May 1, 2022
@github-actions
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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 Nov 8, 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.

3 participants