-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add a data source for storage accounts #785
Comments
Fixes #785 Tests pass: ``` $ acctests azurerm TestAccAzureRMPublicIpStatic_basic === RUN TestAccAzureRMPublicIpStatic_basic --- PASS: TestAccAzureRMPublicIpStatic_basic (83.19s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 83.219s ```
Fixes #785 Tests pass: ``` $ acctests azurerm TestAccDataSourceAzureRMStorageAccount_ === RUN TestAccDataSourceAzureRMStorageAccount_basic --- PASS: TestAccDataSourceAzureRMStorageAccount_basic (86.65s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 86.675s ```
hey @eefi Thanks for opening this issue :)
Totally agree a Data Source for Storage Accounts could be really useful - as such I've opened PR #794 which adds support for this. Historically Data Sources have been added as the demand for them arises, rather than adding them ahead of time. There's a longer term task to go through and backfill some of the existing Resources as Data Sources here (e.g. Storage Accounts) - but for new Resources we're adding a Data Source shortly after the Resource is supported if it makes sense (for instance, Network Security Groups probably will get a Data Source, but I don't believe we need one for Network Security Rules [since you're not likely to reference it elsewhere]). Thanks! |
Thank you for the explanation and the quick implementation! Looking forward to using the new data source soon! |
@eefi just to let you know that this has been released in v1.1.1 :) |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
We have a use case that could really make use of a storage account data source. Is there a philosophical reason why that doesn't exist right now? (Or why the current set of data sources are the data sources that do exist?)
We have our infrastructure deployed through a collection of modules, and one of our patterns has been to define a shared resource in one module, and then use a data source in another module to do things to it. For example, a core module might define a virtual network resource, and then we'd make a data source for that virtual network in a different module that might want to add a subnet to it.
I understand the data source isn't strictly necessary, since you can generally just refer to things by name, which you need to get the data source in the first place anyway. But it's a little peace of mind (and easier debugging?) when the data source object fails first during a Terraform run if the referenced resource isn't there.
The text was updated successfully, but these errors were encountered: