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

RDS: Enhanced monitoring feature are not updated #8721

Closed
scheffield opened this issue Sep 7, 2016 · 2 comments
Closed

RDS: Enhanced monitoring feature are not updated #8721

scheffield opened this issue Sep 7, 2016 · 2 comments
Assignees
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community

Comments

@scheffield
Copy link

A terraform refresh does not update the monitoring interval and role in the state file.

Terraform Version

v0.6.16

Affected Resource(s)

  • aws_db_instance

Terraform Configuration Files

resource "aws_db_instance" "db" {
  identifier = "db"
  storage_type = "gp2"
  allocated_storage = "200"
  engine = "mysql"
  engine_version = "5.6.19a"
  instance_class = "db.m4.large"
  name = "db"
  username = "db0987654321"
  password = "db1234567890"
  db_subnet_group_name = "db"
  vpc_security_group_ids = ["..."]
  parameter_group_name = "..."
  option_group_name = "default:mysql-5-6"
  multi_az = true
  auto_minor_version_upgrade = true
  backup_retention_period = 1
  backup_window = "06:45-07:15"
  maintenance_window = "sat:06:00-sat:06:30"
  monitoring_interval = 60
  monitoring_role_arn = "arn:aws:iam::123456789012:role/rds-monitoring-role"
}

State File

"aws_db_instance.db": {
    "type": "aws_db_instance",
    "primary": {
        "id": "db",
        "attributes": {
            "address": "...",
            "allocated_storage": "200",
            "arn": "...",
            "auto_minor_version_upgrade": "true",
            "availability_zone": "us-east-1d",
            "backup_retention_period": "1",
            "backup_window": "06:45-07:15",
            "copy_tags_to_snapshot": "false",
            "db_subnet_group_name": "db",
            "endpoint": "...",
            "engine": "mysql",
            "engine_version": "5.6.19a",
            "id": "db",
            "identifier": "db",
            "instance_class": "db.m4.large",
            "license_model": "general-public-license",
            "maintenance_window": "sat:06:00-sat:06:30",
            "monitoring_interval": "60",
            "monitoring_role_arn": "arn:aws:iam::123456789012:role/rds-monitoring-role",
            "multi_az": "true",
            "name": "db",
            "option_group_name": "default:mysql-5-6",
            "parameter_group_name": "...",
            "password": "db1234567890",
            "port": "3306",
            "publicly_accessible": "false",
            "replicas.#": "0",
            "replicate_source_db": "",
            "security_group_names.#": "0",
            "skip_final_snapshot": "true",
            "status": "available",
            "storage_encrypted": "false",
            "storage_type": "gp2",
            "tags.#": "0",
            "username": "db0987654321",
            "vpc_security_group_ids.#": "1",
            "vpc_security_group_ids.55330976": "..."
        }
    }
}

AWS cli result

aws rds describe-db-instances --db-instance-identifier db --query "DBInstances[*].{MonitoringInterval:MonitoringInterval,MonitoringRoleArn:MonitoringRoleArn}"
[
    {
        "MonitoringRoleArn": null,
        "MonitoringInterval": 0
    }
]

terraform plan result

~ aws_db_instance.db
    monitoring_interval:               "0" => "60"

Expected Behavior

The state file and the reality clearly differ. A terraform refresh should update the state file to the reflect that.

Actual Behavior

A terraform refresh does not pick up the most recent state from AWS regarding monitoring interval and role ARN.

Steps to Reproduce

  1. terraform apply
  2. fail - due to a timeout or some other issue (RDS: unexpected state 'configuring-enhanced-monitoring' #8699)
  3. terraform refresh

Important Factoids

The initial run of terraform apply failed.

References

@stack72
Copy link
Contributor

stack72 commented Sep 26, 2016

Hi @scheffield

Apologies for the issue here. In #8707 we fixed an issue with regards to EnhancedMonitoring and the state change that was failing - that was released in Terraform 0.7.4

I cannot recreate the issue above since that #8707 has been merged and released. Can you tell me if this is still an issue for you since 0.7.4?

Paul

@stack72 stack72 added the waiting-response An issue/pull request is waiting for a response from the community label Sep 26, 2016
@stack72 stack72 self-assigned this Sep 26, 2016
@catsby catsby closed this as completed Nov 3, 2016
@ghost
Copy link

ghost commented Apr 20, 2020

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

3 participants