terraform-aws-eventbridge icon indicating copy to clipboard operation
terraform-aws-eventbridge copied to clipboard

fix: Problems found when importing resources previously already created

Open alisson276 opened this issue 1 year ago β€’ 0 comments

Description

Fixing two issues found:

  1. The role_path is the same for role and policy if created by the AWS Console "/service-role/", but when importing and trying do a plan, the plan wants to change the policy path to "/" (default)
  2. When importing aws_cloudwatch_event_rule (if you have more than one), the second import fails, because terraform cannot find the resource (yet).

Motivation and Context

To be able to import the EventBridge rules (and dependencies) that has been created before.

Breaking Changes

N/A

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

Since this is hard to test (because depends on real resources to import) I tested locally

  • [ ] I have executed pre-commit run -a on my pull request

alisson276 avatar Aug 14 '22 10:08 alisson276