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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_data_protection_backup_instance_kubernetes_cluster docs configuration doesn't work #25999

Closed
1 task done
peteroneilljr opened this issue May 16, 2024 · 2 comments 路 Fixed by #26036
Closed
1 task done

Comments

@peteroneilljr
Copy link

peteroneilljr commented May 16, 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 "+1" or "me too" comments, 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.6.0

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_data_protection_backup_instance_kubernetes_cluster

Terraform Configuration Files

The configuration provided in the docs is fill with test resources that don't link to anything.

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_protection_backup_instance_kubernetes_cluster

For example the following references.

  depends_on = [
    azurerm_role_assignment.test_extension_and_storage_account_permission,
    azurerm_role_assignment.test_vault_msi_read_on_cluster,
    azurerm_role_assignment.test_vault_msi_read_on_snap_rg,
    azurerm_role_assignment.test_cluster_msi_contributor_on_snap_rg,
    azurerm_role_assignment.test_vault_msi_snapshot_contributor_on_snap_rg,
    azurerm_role_assignment.test_vault_data_operator_on_snap_rg,
    azurerm_role_assignment.test_vault_data_contributor_on_storage,
  ]

These are pointed at a test resource that doesn't exist.

resource "azurerm_role_assignment" "test_vault_msi_snapshot_contributor_on_snap_rg" {
  scope                = azurerm_resource_group.snap.id
  role_definition_name = "Disk Snapshot Contributor"
  principal_id         = azurerm_data_protection_backup_vault.test.identity[0].principal_id
}

resource "azurerm_role_assignment" "test_vault_data_operator_on_snap_rg" {
  scope                = azurerm_resource_group.snap.id
  role_definition_name = "Data Operator for Managed Disks"
  principal_id         = azurerm_data_protection_backup_vault.test.identity[0].principal_id
}

resource "azurerm_role_assignment" "test_vault_data_contributor_on_storage" {
  scope                = azurerm_storage_account.test.id
  role_definition_name = "Storage Blob Data Contributor"
  principal_id         = azurerm_data_protection_backup_vault.test.identity[0].principal_id
}

Debug Output/Panic Output

You can't reference resources that don't exist.

Expected Behaviour

The example should show a minimal viable configuration to create the resource.

Actual Behaviour

Resource does not create with provided configuration.

Steps to Reproduce

terraform apply

Important Factoids

n/a

References

The following documentation is pretty new, and I believe someone may have uploaded their test configuration instead of a working example. There are many references to test resources that don't exist in this configuration that will cause the configuration to fail to deploy.

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_protection_backup_instance_kubernetes_cluster

This reference should be cleaned up so that it is just the minimum resources needed to create the object.

@Chambras
Copy link
Contributor

@peteroneilljr Nice catch! I will try to submit a PR soon to update the sample in the documentation.

Copy link

This functionality has been released in v3.105.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants