44 lines
883 B
Plaintext
Raw Normal View History

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
resource "azurerm_role_assignment" "example" {
scope = data.azurerm_subscription.primary.id # Sensitive
role_definition_name = "Reader"
principal_id = data.azuread_user.user.object_id
}
----
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,terraform]
----
resource "azurerm_role_assignment" "example" {
scope = azurerm_resource_group.example.id
role_definition_name = "Reader"
principal_id = data.azuread_user.user.object_id
}
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
=== Highlighting
Highlight the `scope` property from the `azurerm_role_assignment` block
endif::env-github,rspecator-view[]