-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Is there an existing issue for this?
- I have searched the existing issues
Provider Version
v2.3.0
Terraform Version
v1.7.0
Terraform Edition
Terraform Open Source (OSS)
Current Behavior
latest docs seem to support the ability to set an end_hour parameter within the schedule block of the resource, a failure occurs during apply:
error creating MongoDB Atlas Online Archive:: https://cloud.mongodb.com/api/atlas/v2/groups/<REDACTED>/clusters/chalkboard/onlineArchives POST: HTTP 400 Bad Request (Error code: "INVALID_ATTRIBUTE") Detail: Invalid attribute endHour specified. Reason: Bad Request. Params: [endHour], BadRequestDetail:
removing end_hour from the schedule block returns successful apply and I can see the archive is created on the cluster.
Terraform configuration to reproduce the issue
+ resource "mongodbatlas_online_archive" "archive" {
+ archive_id = (known after apply)
+ cluster_name = "<REDACTED>"
+ coll_name = "<REDACTED>"
+ collection_type = (known after apply)
+ db_name = "<REDACTED>"
+ id = (known after apply)
+ paused = false
+ project_id = "<REDACTED>"
+ state = (known after apply)
+ sync_creation = false
+ criteria {
+ date_field = "createdAt"
+ date_format = "ISODATE"
+ expire_after_days = 60
+ type = "DATE"
}
+ data_expiration_rule {
+ expire_after_days = 90
}
+ partition_fields {
+ field_name = "createdAt"
+ field_type = (known after apply)
+ order = 0
}
+ schedule {
+ end_hour = 9
+ end_minute = 0
+ start_hour = 8
+ start_minute = 0
+ type = "DAILY"
}
}Steps To Reproduce
- attempt apply w the terraform provided above, observe error
- remove
end_hourparameter from schedule block - re-attempt apply, observe success
Additional comments:
It appears like the tf resource is accepting end_hour because I can see the provider is transforming it into an attribute named endHour, and that the error is happening between the provider and the mongo atlas API.
Logs
Code of Conduct
- I agree to follow this project's Code of Conduct