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

[Bug]: aws_appautoscaling_scheduled_action pulling incorrect values on read from api #33873

Closed
kevincormier-toast opened this issue Oct 10, 2023 · 5 comments · Fixed by #34382
Labels
bug Addresses a defect in current functionality. service/appautoscaling Issues and PRs that pertain to the appautoscaling service.

Comments

@kevincormier-toast
Copy link
Contributor

kevincormier-toast commented Oct 10, 2023

Terraform Core Version

1.2.9

AWS Provider Version

3.22.0

Affected Resource(s)

  • aws_appautoscaling_scheduled_action

Expected Behavior

  • Set up scheduled actions with the same name on the same dynamodb table for both table read and write.
  • The subsequent plan, terraform should show no changes required.

Actual Behavior

  • Set up scheduled actions with the same name on the same dynamodb table for both table read and write.
  • The subsequent plan, terraform show's a diff on the scheduled action for "ScalableDimension": "dynamodb:index:WriteCapacityUnits"
    • Old value matches whatever was set for the ReadCapacityUnits scalable dimension.

Relevant Error/Panic Output Snippet

none

Terraform Configuration Files

Will upload later.

Steps to Reproduce

terraform apply, terraform plan, see diffs.

Debug Output

n/a

Panic Output

n/a

Important Factoids

No response

References

Each scalable target is identified by a service namespace, resource ID, and scalable dimension.
https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/put-scheduled-action.html#:~:text=Each%20scalable%20target%20is%20identified%20by%20a%20service%20namespace%2C%20resource%20ID%2C%20and%20scalable%20dimension.

When pulling the data from the API, we can see that the call is only querying on name, namespace, and resource_id, but not scalable dimension.

scheduledAction, err := FindScheduledAction(ctx, conn, d.Get("name").(string), d.Get("service_namespace").(string), d.Get("resource_id").(string))

https:/hashicorp/terraform-provider-aws/blob/main/internal/service/appautoscaling/scheduled_action.go#L211

Would you like to implement a fix?

None

@kevincormier-toast kevincormier-toast added the bug Addresses a defect in current functionality. label Oct 10, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/appautoscaling Issues and PRs that pertain to the appautoscaling service. label Oct 10, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 10, 2023
@kevincormier-toast
Copy link
Contributor Author

sorry I didn't include any examples in the original report. I'll work on putting some together and adding them if folks feel like we need it. I think the AWS docs and the linked code pretty clearly highlight the discrepancy though.

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Oct 25, 2023
@justinretzolk
Copy link
Member

Hey @kevincormier-toast 👋 Thank you for taking the time to raise this! I see that you're using a relatively old version of the AWS Provider. Are you able to test on a more recent version to verify if the issue persists?

@justinretzolk justinretzolk added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 25, 2023
@justinretzolk
Copy link
Member

Since we haven't heard back, I'm going to close this issue. If you're still having trouble, please feel free to open a new issue, referencing this one for context as needed.

@terraform-aws-provider terraform-aws-provider bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jan 8, 2024
Copy link

github-actions bot commented Feb 8, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/appautoscaling Issues and PRs that pertain to the appautoscaling service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants