-
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
New Data Source: azurerm_storage_container
#5374
New Data Source: azurerm_storage_container
#5374
Conversation
46c049c
to
e82256b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @minzhang28
Thanks for this PR :)
I've taken a look through and left some comments inline but this is off to a good start - if we can fix up the comments (and the tests pass) then this otherwise LGTM 👍
Thanks!
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/tests/data_source_storage_container_test.go
Outdated
Show resolved
Hide resolved
azurerm_storage_container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @minzhang28
Thanks for pushing those changes - I've taken a look through and run the tests which led to a few more comments but this is looking good to me; if we can fix up the comments (and the tests pass) then this otherwise looks good to me 👍
Thanks!
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/storage/tests/data_source_storage_container_test.go
Outdated
Show resolved
Hide resolved
resource.TestCheckResourceAttr(data.ResourceName, "name", "containerdstest-"+data.RandomString), | ||
resource.TestCheckResourceAttr(data.ResourceName, "container_access_type", "private"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "has_immutability_policy", "false"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "storage_account_name", "acctestsadsc"+data.RandomString), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we need this field to be set in order to look it up, we can remove this:
resource.TestCheckResourceAttr(data.ResourceName, "storage_account_name", "acctestsadsc"+data.RandomString), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this was missed - can we remove this?
azurerm/internal/services/storage/data_source_storage_container.go
Outdated
Show resolved
Hide resolved
580e06d
to
2f372f7
Compare
Hi @tombuildsstuff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @minzhang28
Thanks for pushing those changes - taking a look through besides one minor comment (which I hope you don't mind but I'm going to push a commit for to get this merged) this otherwise LGTM 👍
Thanks!
resource.TestCheckResourceAttr(data.ResourceName, "name", "containerdstest-"+data.RandomString), | ||
resource.TestCheckResourceAttr(data.ResourceName, "container_access_type", "private"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "has_immutability_policy", "false"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "storage_account_name", "acctestsadsc"+data.RandomString), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this was missed - can we remove this?
this is required to lookup the data source, so if it's omited the test'll fail at another point
This has been released in version 1.41.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.41.0"
}
# ... other configuration ... |
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! |
This is to address the request of support storage account container:
#5310
Test Result