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

Support for filtering azurerm_image data resources by tags #8417

Open
simonmcc opened this issue Sep 10, 2020 · 2 comments
Open

Support for filtering azurerm_image data resources by tags #8417

simonmcc opened this issue Sep 10, 2020 · 2 comments

Comments

@simonmcc
Copy link

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

Azure Machine Images can't be renamed, the only option available to mutate an image metadata as it progresses through a validation pipeline are the tags, we use this for marking the state of an image (i.e. RELEASE_STATUS=RC or RELEASE_STATUS=GA). The current regex-on-name filter means that once an image is published, it's available for use, which isn't desirable as it may not have passed testing yet.

New or Affected Resource(s)

  • Data Source: azurerm_image

Potential Terraform Configuration

data "azurerm_image" "search" {
  name                = "search-api"
  resource_group_name = "packerimages"
  tags = {
    RELEASE_STATUS = "GA"
  }
}

References

@ArcturusZhang
Copy link
Contributor

Hi @simonmcc thanks for this issue!

I believe this is a very good idea and we already have some similar functionality for shared image version, see this data source. We could deliver something similar to azurerm_image by introducing a new data source azurerm_images

@ArcturusZhang ArcturusZhang self-assigned this Sep 11, 2020
@Arlington1985
Copy link

I would like also to see the possibility of filtering tags with regular expression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants