Skip to content

fix: Move default resources for events for AWS Batch service integration #44

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

Merged
merged 1 commit into from
Nov 2, 2022
Merged

fix: Move default resources for events for AWS Batch service integration #44

merged 1 commit into from
Nov 2, 2022

Conversation

fiffeek
Copy link
Contributor

@fiffeek fiffeek commented Nov 1, 2022

Description

default_resources for AWS Batch service integration (events) are not working correctly as in locals.tf
they belong to the outer scope batch_Sync whereas they should belong to the nested
events field.

My workaround for the problem was:

  service_integrations = {
    batch_Sync = {
      batch = true,
      events = [
      "arn:aws:events:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:rule/StepFunctionsGetEventsForBatchJobsRule"],
    }

Which works, but it would be nice to fix and hide the events policy as for other services it works flawlessly. Thus the MR.

Motivation / Context / Breaking Changes

No regression is being introduced as they field is not used currently (as it lies outside of the keys context either way):

image

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

Tested with init and plan, on master plan does not work correctly:
image

After the changes everything is fine, 2 more resources as expected:
image
image

@fiffeek fiffeek changed the title fix: move default resources for events for AWS Batch service integration fix: Move default resources for events for AWS Batch service integration Nov 1, 2022
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.

Good catch!

@antonbabenko antonbabenko merged commit bb2186b into terraform-aws-modules:master Nov 2, 2022
antonbabenko pushed a commit that referenced this pull request Nov 2, 2022
### [2.7.2](v2.7.1...v2.7.2) (2022-11-02)

### Bug Fixes

* Move default resources for events for AWS Batch service integration ([#44](#44)) ([bb2186b](bb2186b))
@antonbabenko
Copy link
Member

This PR is included in version 2.7.2 🎉

@github-actions
Copy link

github-actions bot commented Dec 3, 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 Dec 3, 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.

2 participants