-
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 #9402
Conversation
@Lucretius @tombuildsstuff Any updates on this PR? |
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.
Hi @Lucretius - sorry for the delay in reviewing this, overall it looks good but we'll need to fix up the merge conflicts and move to the new testing framework. Once thats done this should be good to merge!
ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) | ||
defer cancel() | ||
|
||
id, err := azure.ParseAzureResourceID(d.Id()) |
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.
We'll want to use the new generated ID parsers here
MinItems: 1, | ||
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
}, |
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.
could we validate this?
"description": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
}, |
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.
Could we validate this?
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
}, |
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.
could we validate this?
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
}, |
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.
could we validaate this?
@@ -0,0 +1,52 @@ | |||
package tests |
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.
We'll need to change this to the new testing frame work to support binary testing
|
||
# azurerm_container_registry_scope_map | ||
|
||
Manages an Azure Container Registry scope map. Scope Maps are a preview feature only available in Premium SKU Container registries. |
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.
If this is preview is there a feature to enable?
Manages an Azure Container Registry token. Tokens are a preview feature only available in Premium SKU Container registries. | ||
|
||
```hcl | ||
resource "azurerm_resource_group" "rg" { |
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.
could we use example for all names
resource "azurerm_resource_group" "rg" { | |
resource "azurerm_resource_group" "example" { |
|
||
```hcl | ||
resource "azurerm_resource_group" "rg" { | ||
name = "resourceGroup1" |
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.
name = "resourceGroup1" | |
name = "example-resource-group" |
} | ||
|
||
resource "azurerm_container_registry" "acr" { | ||
name = "containerRegistry1" |
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.
name = "containerRegistry1" | |
name = "ExampleRegistry" |
and so forth
closing as this PR has been superseded by #11350 |
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
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. |
azurerm_container_registry_token
azurerm_container_registry_scope_map
azurerm_container_registry_token
azurerm_container_registry_scope_map
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