-
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
[Resource][Data Source] ACR Scope Map and Tokens #11350
Conversation
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.
Thanks for taking on this pr @MattiasAng - overall this looks great and most of my comments are minor. this should be good to merge once they have been addressed
azurerm/internal/services/containers/container_registry_scope_map_data_source.go
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_data_source.go
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_token_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_token_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_token_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_data_source.go
Outdated
Show resolved
Hide resolved
see my comment reply left inline @MattiasAng |
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.
Thanks, this should be good to merge once the build is fix:
Run GOARCH=386 GOOS=linux go build -o 32bitbuild .
# github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers
azurerm/internal/services/containers/container_registry_scope_map_data_source.go:30:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_scope_map_resource.go:42:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_scope_map_resource.go:57:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_token_data_source.go:27:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_token_data_source.go:33:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_token_resource.go:42:19: undefined: ValidateContainerRegistryName
azurerm/internal/services/containers/container_registry_token_resource.go:51:19: undefined: ValidateContainerRegistryName
Error: Process completed with exit code 2.
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.
Thanks @MattiasAng - aside from 2 comments this looks good 👍
azurerm/internal/services/containers/container_registry_token_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/containers/container_registry_scope_map_data_source_test.go
Outdated
Show resolved
Hide resolved
…map_data_source_test.go
Supersede hashicorp#9402 after email exchange with @Lucretius which didn't have time to complete it currently. I fixed the comments from last review. Data Source for azurerm_container_registry_token Data Source for azurerm_container_registry_scope_map Resource for azurerm_container_registry_token Resource for azurerm_container_registry_scope_map Documentation for each Tests for each, they all pass running against my own Azure environment. There are passwords for the token which I would like to expose but there is no way to delete them once generated so they didn't really fit into the lifecycle management of the token itself. Perhaps they might be better suited as a separate data source, similar to how we handle the SAS tokens? Also note that these are still both preview features. As such I've vendor-included the SDK preview code and only used it in these specific preview features (see client.go) This PR resolves hashicorp#6505
This has been released in version 2.57.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 = "~> 2.57.0"
}
# ... other configuration ... |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Supersede #9402 after email exchange with @Lucretius which didn't have time to complete it currently.
I fixed the comments from last review.
Data Source for azurerm_container_registry_token
Data Source for azurerm_container_registry_scope_map
Resource for azurerm_container_registry_token
Resource for azurerm_container_registry_scope_map
Documentation for each
Tests for each, they all pass running against my own Azure environment.
There are passwords for the token which I would like to expose but there is no way to delete them once generated so they didn't really fit into the lifecycle management of the token itself. Perhaps they might be better suited as a separate data source, similar to how we handle the SAS tokens?
Also note that these are still both preview features. As such I've vendor-included the SDK preview code and only used it in these specific preview features (see client.go)
This PR resolves #6505