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

Data source aws_api_gateway_api_key lookup on name (not id) #8033

Open
runesl opened this issue Mar 21, 2019 · 6 comments · May be fixed by #39335
Open

Data source aws_api_gateway_api_key lookup on name (not id) #8033

runesl opened this issue Mar 21, 2019 · 6 comments · May be fixed by #39335
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway service.

Comments

@runesl
Copy link

runesl commented Mar 21, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

It should be possible to lookup aws_api_gateway_api_key by name.
For example:

data "aws_api_gateway_api_key" "my-api-key" {
  name = "my_api_key_name"
}

Currently only id is supported, so this happens:

Error: data.aws_api_gateway_api_key.api-key: "id": required field is not set

@runesl runesl added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 21, 2019
@bflad bflad added the service/apigateway Issues and PRs that pertain to the apigateway service. label Mar 21, 2019
@RomanGlova
Copy link

Looks like cannot be implemented since you can have same name on different keys

@runesl
Copy link
Author

runesl commented Mar 26, 2019

A lot of Terraform data sources work like I propose. They fail only when multiple instances matching the criteria are actually found. Looking up EBS volumes by tag for instance.

@JulienBlancher
Copy link

+1 for this! looking up by id is not very useful.

@mikiisz
Copy link

mikiisz commented Jun 9, 2021

+1, are there any new updates about that feature request?

@jhourque
Copy link

+1, this is a nice feature but I think it would need to create a new data source : aws_api_gateway_api_keys
aws_api_gateway_api_key is based on AWS API get-api-key which only allow api key id as parameter.
aws_api_gateway_api_keys could be based on get-api-keys API which could request on name.

Anyway this is a must have feature.

@d8aninja
Copy link

Many AWS resources can have identical names and differing IDs/ARNs; why is this one special? This is a must have feature, still, going into 2024...

@wirkijowski wirkijowski linked a pull request Sep 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants