the parameter day_of_week of maintenance_start_time in aws_storagegateway_gateway source block can't be 0 #26597
Labels
bug
Addresses a defect in current functionality.
good first issue
Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
service/storagegateway
Issues and PRs that pertain to the storagegateway service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.2.8 on darwin_amd64
AWS Provider Version 4.28.0
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
if set parameter day_of_week not zero value (1-6),terraform can apply successfully with correct update on aws.
try run by using aws cli ,it can use zero value. conside can't use zero value via terraform.
aws --profile eng storagegateway update-maintenance-start-time --gateway-arn arn:aws:storagegateway:us-west-2:xxxxxxxxxxxxx:gateway/sgw-XXXXXXXX --day-of-week 0 --hour-of-day 8 --minute-of-hour 30
{
"GatewayARN": "arn:aws:storagegateway:us-west-2:xxxxxxxxxxxx:gateway/sgw-XXXXXXXX"
}
Panic Output
│ Error: error updating Storage Gateway Gateway (arn:aws:storagegateway:us-west-2:xxxxxxxxxxxx:gateway/sgw-XXXXXXXX) maintenance start time: InvalidGatewayRequestException: Either one of DayOfMonth or DayOfWeek must be specified
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "69176e4f-2a7b-4103-a03f-xxxxxxxxxxxx"
│ },
│ Error_: {
│ ErrorCode: "InvalidParameters"
│ },
│ Message_: "Either one of DayOfMonth or DayOfWeek must be specified"
│ }
│
│ with aws_storagegateway_gateway.storage-gateway,
│ on main.tf line 48, in resource "aws_storagegateway_gateway" "storage-gateway":
│ 48: resource "aws_storagegateway_gateway" "storage-gateway" {
│
╵
Releasing state lock. This may take a few moments...
Expected Behavior
based on document, if set parameter day_of_week = 0 , after terraform apply, it should update the maintenance start time of storagegateway to Sunday 08:30.
Actual Behavior
get the panic output with errorCode "InvalidParameters" and massage "Either one of DayOfMonth or DayOfWeek must be specified"
Steps to Reproduce
terraform apply
Important Factoids
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/storagegateway_gateway
The text was updated successfully, but these errors were encountered: