Skip to content

fix: Cloudwatch Log Group deletion db_instance dependency #423

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

magreenbaum
Copy link
Member

Description

Adding depends_on so that the cloudwatch log groups are created before and destroyed after the db instance if creating cloudwatch log groups with this module.

Fixed example/s3-import-mysql to include updated s3 module.

Motivation and Context

#419

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

@magreenbaum magreenbaum changed the title fix/Cloudwatch Log Group deletion db_instance dependency fix:Cloudwatch Log Group deletion db_instance dependency Jul 25, 2022
@magreenbaum magreenbaum changed the title fix:Cloudwatch Log Group deletion db_instance dependency fix: Cloudwatch Log Group deletion db_instance dependency Jul 25, 2022
@@ -182,13 +174,13 @@ module "db" {

# S3 import https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html
s3_import = {
source_engine_version = "8.0.27"
bucket_name = aws_s3_bucket.import.id
source_engine_version = "8.0.28"
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes this error:
Screen Shot 2022-07-24 at 9 56 45 PM

ingestion_role = aws_iam_role.s3_import.arn
}

multi_az = true
subnet_ids = module.vpc.database_subnets
db_subnet_group_name = module.vpc.database_subnet_group_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.

Fixes this error:
Screen Shot 2022-07-24 at 9 58 58 PM

@@ -80,25 +80,17 @@ module "security_group" {
tags = local.tags
}

# Temporary work around until S3 module is updated to support v4.x
resource "aws_s3_bucket" "import" {
module "import_s3_bucket" {
Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

@bryantbiggs bryantbiggs merged commit e6351a3 into terraform-aws-modules:master Jul 25, 2022
antonbabenko pushed a commit that referenced this pull request Jul 25, 2022
### [5.0.1](v5.0.0...v5.0.1) (2022-07-25)

### Bug Fixes

* Cloudwatch Log Group deletion db_instance dependency ([#423](#423)) ([e6351a3](e6351a3))
@antonbabenko
Copy link
Member

This PR is included in version 5.0.1 🎉

@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 Nov 13, 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