Skip to content

Commit

Permalink
Document hygiene: Use the standard list indice notation (#25092)
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo authored Feb 29, 2024
1 parent c387e60 commit ec2ecc0
Show file tree
Hide file tree
Showing 66 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion website/docs/d/data_protection_backup_vault.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ output "azurerm_data_protection_backup_vault_id" {
}
output "azurerm_data_protection_backup_vault_principal_id" {
value = data.azurerm_data_protection_backup_vault.example.identity.0.principal_id
value = data.azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data "azurerm_databricks_workspace_private_endpoint_connection" "example" {
}
output "databricks_workspace_private_endpoint_connection_status" {
value = data.azurerm_databricks_workspace_private_endpoint_connection.example.connections.0.status
value = data.azurerm_databricks_workspace_private_endpoint_connection.example.connections[0].status
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/eventgrid_domain.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "azurerm_eventgrid_domain" "example" {
}
output "eventgrid_domain_mapping_topic" {
value = data.azurerm_eventgrid_domain.example.input_mapping_fields.0.topic
value = data.azurerm_eventgrid_domain.example.input_mapping_fields[0].topic
}
```

Expand Down
12 changes: 6 additions & 6 deletions website/docs/d/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ The `kube_admin_config` and `kube_config` blocks export the following:

```hcl
provider "kubernetes" {
host = data.azurerm_kubernetes_cluster.main.kube_config.0.host
username = data.azurerm_kubernetes_cluster.main.kube_config.0.username
password = data.azurerm_kubernetes_cluster.main.kube_config.0.password
client_certificate = base64decode(data.azurerm_kubernetes_cluster.main.kube_config.0.client_certificate)
client_key = base64decode(data.azurerm_kubernetes_cluster.main.kube_config.0.client_key)
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.main.kube_config.0.cluster_ca_certificate)
host = data.azurerm_kubernetes_cluster.main.kube_config[0].host
username = data.azurerm_kubernetes_cluster.main.kube_config[0].username
password = data.azurerm_kubernetes_cluster.main.kube_config[0].password
client_certificate = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].client_certificate)
client_key = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].client_key)
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].cluster_ca_certificate)
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/private_endpoint_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data "azurerm_private_endpoint_connection" "example" {
}
output "private_endpoint_status" {
value = data.azurerm_private_endpoint_connection.example.private_service_connection.0.status
value = data.azurerm_private_endpoint_connection.example.private_service_connection[0].status
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data "azurerm_private_link_service_endpoint_connections" "example" {
}
output "private_endpoint_status" {
value = data.azurerm_private_link_service_endpoint_connections.example.private_endpoint_connections.0.status
value = data.azurerm_private_link_service_endpoint_connections.example.private_endpoint_connections[0].status
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/d/storage_containers.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data "azurerm_storage_containers" "example" {
}
output "container_id" {
value = data.azurerm_storage_containers.example.containers.0.resource_manager_id
value = data.azurerm_storage_containers.example.containers[0].resource_manager_id
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/guides/3.0-upgrade-guide.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ The casing on the values for the `storage_permissions` field have been updated t

### Resource: `azurerm_key_vault_certificate`

The field `x509_certificate_properties.0.key_usage` will be moved from a List to a Set, meaning that the order of these items no longer matters. Note that if you're referencing these nested items within your Terraform Configuration, then this may require some code changes.
The field `x509_certificate_properties[0].key_usage` will be moved from a List to a Set, meaning that the order of these items no longer matters. Note that if you're referencing these nested items within your Terraform Configuration, then this may require some code changes.

### Resource: `azurerm_key_vault_key`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ resource "azurerm_virtual_network_peering" "replica_primary" {
resource "azurerm_virtual_network_dns_servers" "replica" {
virtual_network_id = azurerm_virtual_network.replica.id
dns_servers = azurerm_active_directory_domain_service.example.initial_replica_set.0.domain_controller_ip_addresses
dns_servers = azurerm_active_directory_domain_service.example.initial_replica_set[0].domain_controller_ip_addresses
}
resource "azurerm_active_directory_domain_service_replica_set" "replica" {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/api_management_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ resource "azurerm_key_vault" "example" {
resource "azurerm_key_vault_access_policy" "example" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_api_management.example.identity.0.tenant_id
object_id = azurerm_api_management.example.identity.0.principal_id
tenant_id = azurerm_api_management.example.identity[0].tenant_id
object_id = azurerm_api_management.example.identity[0].principal_id
secret_permissions = [
"Get",
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/app_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ A `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

-> You can access the Principal ID via `azurerm_app_service.example.identity.0.principal_id` and the Tenant ID via `azurerm_app_service.example.identity.0.tenant_id`
-> You can access the Principal ID via `azurerm_app_service.example.identity[0].principal_id` and the Tenant ID via `azurerm_app_service.example.identity[0].tenant_id`

---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/app_service_slot.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ A `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.

-> You can access the Principal ID via `azurerm_app_service_slot.example.identity.0.principal_id` and the Tenant ID via `azurerm_app_service_slot.example.identity.0.tenant_id`
-> You can access the Principal ID via `azurerm_app_service_slot.example.identity[0].principal_id` and the Tenant ID via `azurerm_app_service_slot.example.identity[0].tenant_id`

---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/application_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ A `request_routing_rule` block supports the following:

* `priority` - (Optional) Rule evaluation order can be dictated by specifying an integer value from `1` to `20000` with `1` being the highest priority and `20000` being the lowest priority.

-> **NOTE:** `priority` is required when `sku.0.tier` is set to `*_v2`.
-> **NOTE:** `priority` is required when `sku[0].tier` is set to `*_v2`.

---

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cdn_frontdoor_origin.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ resource "azurerm_private_link_service" "example" {
location = azurerm_resource_group.example.location
visibility_subscription_ids = [data.azurerm_client_config.current.subscription_id]
load_balancer_frontend_ip_configuration_ids = [azurerm_lb.example.frontend_ip_configuration.0.id]
load_balancer_frontend_ip_configuration_ids = [azurerm_lb.example.frontend_ip_configuration[0].id]
nat_ip_configuration {
name = "primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ resource "azurerm_key_vault" "example" {
purge_protection_enabled = true
access_policy {
tenant_id = azurerm_cognitive_account.example.identity.0.tenant_id
object_id = azurerm_cognitive_account.example.identity.0.principal_id
tenant_id = azurerm_cognitive_account.example.identity[0].tenant_id
object_id = azurerm_cognitive_account.example.identity[0].principal_id
key_permissions = [
"Get", "Create", "List", "Restore", "Recover", "UnwrapKey", "WrapKey", "Purge", "Encrypt", "Decrypt", "Sign", "Verify"
]
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/container_registry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ An `identity` block exports the following:

* `tenant_id` - The Tenant ID associated with this Managed Service Identity.

-> You can access the Principal ID via `azurerm_container_registry.example.identity.0.principal_id` and the Tenant ID via `azurerm_container_registry.example.identity.0.tenant_id`
-> You can access the Principal ID via `azurerm_container_registry.example.identity[0].principal_id` and the Tenant ID via `azurerm_container_registry.example.identity[0].tenant_id`

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ resource "azurerm_kusto_database_principal_assignment" "example" {
cluster_name = azurerm_kusto_cluster.example.name
database_name = azurerm_kusto_database.example.name
tenant_id = azurerm_data_factory.example.identity.0.tenant_id
principal_id = azurerm_data_factory.example.identity.0.principal_id
tenant_id = azurerm_data_factory.example.identity[0].tenant_id
principal_id = azurerm_data_factory.example.identity[0].principal_id
principal_type = "App"
role = "Viewer"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ resource "azurerm_key_vault" "example" {
}
access_policy {
tenant_id = azurerm_data_protection_backup_vault.example.identity.0.tenant_id
object_id = azurerm_data_protection_backup_vault.example.identity.0.principal_id
tenant_id = azurerm_data_protection_backup_vault.example.identity[0].tenant_id
object_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
key_permissions = ["Create", "Get"]
Expand Down Expand Up @@ -124,7 +124,7 @@ resource "azurerm_data_protection_backup_policy_postgresql" "example" {
resource "azurerm_role_assignment" "example" {
scope = azurerm_postgresql_server.example.id
role_definition_name = "Reader"
principal_id = azurerm_data_protection_backup_vault.example.identity.0.principal_id
principal_id = azurerm_data_protection_backup_vault.example.identity[0].principal_id
}
resource "azurerm_data_protection_backup_instance_postgresql" "example" {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/data_protection_backup_vault.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ An `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.

-> You can access the Principal ID via `${azurerm_data_protection_backup_vault.example.identity.0.principal_id}` and the Tenant ID via `${azurerm_data_protection_backup_vault.example.identity.0.tenant_id}`
-> You can access the Principal ID via `${azurerm_data_protection_backup_vault.example.identity[0].principal_id}` and the Tenant ID via `${azurerm_data_protection_backup_vault.example.identity[0].tenant_id}`

## Timeouts

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/data_share_account.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ An `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this Data Share Account.

-> You can access the Principal ID via `${azurerm_data_share_account.example.identity.0.principal_id}` and the Tenant ID via `${azurerm_data_share_account.example.identity.0.tenant_id}`
-> You can access the Principal ID via `${azurerm_data_share_account.example.identity[0].principal_id}` and the Tenant ID via `${azurerm_data_share_account.example.identity[0].tenant_id}`

## Timeouts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "azurerm_kusto_cluster" "example" {
resource "azurerm_role_assignment" "example" {
scope = azurerm_kusto_cluster.example.id
role_definition_name = "Contributor"
principal_id = azurerm_data_share_account.example.identity.0.principal_id
principal_id = azurerm_data_share_account.example.identity[0].principal_id
}
resource "azurerm_data_share_dataset_kusto_cluster" "example" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resource "azurerm_kusto_database" "example" {
resource "azurerm_role_assignment" "example" {
scope = azurerm_kusto_cluster.example.id
role_definition_name = "Contributor"
principal_id = azurerm_data_share_account.example.identity.0.principal_id
principal_id = azurerm_data_share_account.example.identity[0].principal_id
}
resource "azurerm_data_share_dataset_kusto_database" "example" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ resource "azurerm_key_vault_access_policy" "databricks" {
depends_on = [azurerm_databricks_workspace.example]
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_databricks_workspace.example.storage_account_identity.0.tenant_id
object_id = azurerm_databricks_workspace.example.storage_account_identity.0.principal_id
tenant_id = azurerm_databricks_workspace.example.storage_account_identity[0].tenant_id
object_id = azurerm_databricks_workspace.example.storage_account_identity[0].principal_id
key_permissions = [
"Create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ resource "azurerm_key_vault_access_policy" "databricks" {
depends_on = [azurerm_databricks_workspace.example]
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_databricks_workspace.example.storage_account_identity.0.tenant_id
object_id = azurerm_databricks_workspace.example.storage_account_identity.0.principal_id
tenant_id = azurerm_databricks_workspace.example.storage_account_identity[0].tenant_id
object_id = azurerm_databricks_workspace.example.storage_account_identity[0].principal_id
key_permissions = [
"Create",
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/datadog_monitors.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ An `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor.

-> You can access the Principal ID via `${azurerm_datadog_monitor.example.identity.0.principal_id}` and the Tenant ID via `${azurerm_datadog_monitor.example.identity.0.tenant_id}`
-> You can access the Principal ID via `${azurerm_datadog_monitor.example.identity[0].principal_id}` and the Tenant ID via `${azurerm_datadog_monitor.example.identity[0].tenant_id}`

## Role Assignment

Expand All @@ -129,7 +129,7 @@ data "azurerm_role_definition" "monitoring_reader" {
resource "azurerm_role_assignment" "example" {
scope = data.azurerm_subscription.primary.id
role_definition_id = data.azurerm_role_definition.monitoring_reader.role_definition_id
principal_id = azurerm_datadog_monitor.example.identity.0.principal_id
principal_id = azurerm_datadog_monitor.example.identity[0].principal_id
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ resource "azurerm_kusto_database" "example" {
resource "azurerm_role_assignment" "database_contributor" {
scope = azurerm_kusto_database.example.id
principal_id = azurerm_digital_twins_instance.example.identity.0.principal_id
principal_id = azurerm_digital_twins_instance.example.identity[0].principal_id
role_definition_name = "Contributor"
}
resource "azurerm_role_assignment" "eventhub_data_owner" {
scope = azurerm_eventhub.example.id
principal_id = azurerm_digital_twins_instance.example.identity.0.principal_id
principal_id = azurerm_digital_twins_instance.example.identity[0].principal_id
role_definition_name = "Azure Event Hubs Data Owner"
}
Expand All @@ -86,8 +86,8 @@ resource "azurerm_kusto_database_principal_assignment" "example" {
cluster_name = azurerm_kusto_cluster.example.name
database_name = azurerm_kusto_database.example.name
tenant_id = azurerm_digital_twins_instance.example.identity.0.tenant_id
principal_id = azurerm_digital_twins_instance.example.identity.0.principal_id
tenant_id = azurerm_digital_twins_instance.example.identity[0].tenant_id
principal_id = azurerm_digital_twins_instance.example.identity[0].principal_id
principal_type = "App"
role = "Admin"
}
Expand Down
12 changes: 6 additions & 6 deletions website/docs/r/disk_encryption_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ resource "azurerm_disk_encryption_set" "example" {
resource "azurerm_key_vault_access_policy" "example-disk" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_disk_encryption_set.example.identity.0.tenant_id
object_id = azurerm_disk_encryption_set.example.identity.0.principal_id
tenant_id = azurerm_disk_encryption_set.example.identity[0].tenant_id
object_id = azurerm_disk_encryption_set.example.identity[0].principal_id
key_permissions = [
"Create",
Expand Down Expand Up @@ -103,7 +103,7 @@ resource "azurerm_key_vault_access_policy" "example-user" {
resource "azurerm_role_assignment" "example-disk" {
scope = azurerm_key_vault.example.id
role_definition_name = "Key Vault Crypto Service Encryption User"
principal_id = azurerm_disk_encryption_set.example.identity.0.principal_id
principal_id = azurerm_disk_encryption_set.example.identity[0].principal_id
}
```
Expand Down Expand Up @@ -164,8 +164,8 @@ resource "azurerm_disk_encryption_set" "example" {
resource "azurerm_key_vault_access_policy" "example-disk" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_disk_encryption_set.example.identity.0.tenant_id
object_id = azurerm_disk_encryption_set.example.identity.0.principal_id
tenant_id = azurerm_disk_encryption_set.example.identity[0].tenant_id
object_id = azurerm_disk_encryption_set.example.identity[0].principal_id
key_permissions = [
"Create",
Expand Down Expand Up @@ -203,7 +203,7 @@ resource "azurerm_key_vault_access_policy" "example-user" {
resource "azurerm_role_assignment" "example-disk" {
scope = azurerm_key_vault.example.id
role_definition_name = "Key Vault Crypto Service Encryption User"
principal_id = azurerm_disk_encryption_set.example.identity.0.principal_id
principal_id = azurerm_disk_encryption_set.example.identity[0].principal_id
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ resource "azurerm_key_vault" "example" {
resource "azurerm_key_vault_access_policy" "example" {
key_vault_id = azurerm_key_vault.example.id
tenant_id = azurerm_eventhub_namespace.example.identity.0.tenant_id
object_id = azurerm_eventhub_namespace.example.identity.0.principal_id
tenant_id = azurerm_eventhub_namespace.example.identity[0].tenant_id
object_id = azurerm_eventhub_namespace.example.identity[0].principal_id
key_permissions = ["Get", "UnwrapKey", "WrapKey"]
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/function_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ The `identity` block exports the following:

* `tenant_id` - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service.

-> You can access the Principal ID via `azurerm_app_service.example.identity.0.principal_id` and the Tenant ID via `azurerm_app_service.example.identity.0.tenant_id`
-> You can access the Principal ID via `azurerm_app_service.example.identity[0].principal_id` and the Tenant ID via `azurerm_app_service.example.identity[0].tenant_id`

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ resource "azurerm_iot_time_series_insights_event_source_iothub" "example" {
location = azurerm_resource_group.example.location
environment_id = azurerm_iot_time_series_insights_gen2_environment.example.id
iothub_name = azurerm_iothub.example.name
shared_access_key = azurerm_iothub.example.shared_access_policy.0.primary_key
shared_access_key_name = azurerm_iothub.example.shared_access_policy.0.key_name
shared_access_key = azurerm_iothub.example.shared_access_policy[0].primary_key
shared_access_key_name = azurerm_iothub.example.shared_access_policy[0].key_name
consumer_group_name = azurerm_iothub_consumer_group.example.name
event_source_resource_id = azurerm_iothub.example.id
}
Expand Down
Loading

0 comments on commit ec2ecc0

Please sign in to comment.