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

Small typo in example provided for container_registry_cache_rule, missing acr #26170

Closed
1 task done
stephanerenou opened this issue May 31, 2024 · 2 comments · Fixed by #26174
Closed
1 task done

Small typo in example provided for container_registry_cache_rule, missing acr #26170

stephanerenou opened this issue May 31, 2024 · 2 comments · Fixed by #26174

Comments

@stephanerenou
Copy link

stephanerenou commented May 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.2.9

AzureRM Provider Version

3.106.0

Affected Resource(s)/Data Source(s)

azurerm_container_registry_cache_rule

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_container_registry" "acr" {
  name                = "containerRegistry1"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku                 = "Basic"
}

resource "azurerm_container_registry_cache_rule" "cache_rule" {
  name                  = "cacherule"
  container_registry_id = azurerm_container_registry.acr.id
  target_repo           = "target"
  source_repo           = "docker.io/hello-world"
  credential_set_id     = "${azurerm_container_registry.id}/credentialSets/example"
}

Debug Output/Panic Output

No panic

Expected Behaviour

should create the rule
The fix is just to add acr to the credential id as:
credential_set_id = "${azurerm_container_registry.acr.id}/credentialSets/example"

Actual Behaviour

│ Error: Reference to undeclared resource

│ on ../sharedModules/sharedenv/registries.tf line 76, in resource "azurerm_container_registry_cache_rule" "cache_rule":
│ 76: credential_set_id = "${azurerm_container_registry.id}/credentialSets/example"

│ A managed resource "azurerm_container_registry" "id" has not been declared in module.xxx.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@Chambras
Copy link
Contributor

Hi @stephanerenou good catch. A PR is coming soon :)

@github-actions github-actions bot added this to the v3.107.0 milestone Jun 3, 2024
Copy link

github-actions bot commented Jul 4, 2024

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants