@@ -3,7 +3,6 @@ private import codeql.hcl.Resources
33private import codeql.hcl.Constants
44private import codeql.hcl.Terraform:: Terraform
55
6-
76module AzureStorage {
87 private import codeql.hcl.providers.Azure
98
@@ -65,6 +64,9 @@ module AzureStorage {
6564 Expr getProperty ( string name ) { result = this .getProperties ( ) .getElementByName ( name ) }
6665 }
6766
67+ /**
68+ * Azure Storage Account.
69+ */
6870 class StorageAccount extends Azure:: AzureResource {
6971 StorageAccount ( ) { this .getResourceType ( ) = "azurerm_storage_account" }
7072
@@ -76,7 +78,7 @@ module AzureStorage {
7678 /**
7779 * Get the `allow_blob_public_access` property of the storage account. Only available
7880 * for `azurerm` v2 and not v3 onwards.
79- *
81+ *
8082 * https://github.com/hashicorp/terraform-provider-azurerm/blob/main/CHANGELOG-v3.md
8183 */
8284 Expr getAllowBlobPublicAccess ( ) {
@@ -99,41 +101,37 @@ module AzureStorage {
99101
100102 /**
101103 * Get the `public_network_access_enabled` property of the storage account.
102- *
104+ *
103105 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#public_network_access_enabled
104106 */
105- Expr getEnableHttpsTrafficOnly ( ) {
106- result = this .getAttribute ( "enable_https_traffic_only" )
107- }
107+ Expr getEnableHttpsTrafficOnly ( ) { result = this .getAttribute ( "enable_https_traffic_only" ) }
108108
109109 /**
110110 * Get the `public_network_access_enabled` property of the storage account.
111- *
111+ *
112112 * Defaults to `true`.
113- *
113+ *
114114 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#public_network_access_enabled
115115 */
116116 boolean getEnableHttpsTrafficOnlyValue ( ) {
117- exists ( Expr e | e = this .getEnableHttpsTrafficOnly ( ) | result = e .( BooleanLiteral ) .getBool ( ) )
118- or
117+ exists ( Expr e | e = this .getEnableHttpsTrafficOnly ( ) | result = e .( BooleanLiteral ) .getBool ( ) )
118+ or
119119 not exists ( this .getEnableHttpsTrafficOnly ( ) ) and
120120 result = true
121121 }
122122
123123 /**
124124 * Get the `public_network_access_enabled` property of the storage account.
125- *
125+ *
126126 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#public_network_access_enabled
127127 */
128- Expr getPublicNetworkAccess ( ) {
129- result = this .getAttribute ( "public_network_access_enabled" )
130- }
128+ Expr getPublicNetworkAccess ( ) { result = this .getAttribute ( "public_network_access_enabled" ) }
131129
132130 /**
133131 * Get the `public_network_access_enabled` property of the storage account.
134- *
132+ *
135133 * Defaults to `true`.
136- *
134+ *
137135 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#public_network_access_enabled
138136 */
139137 boolean getPublicNetworkAccessValue ( ) {
@@ -145,9 +143,9 @@ module AzureStorage {
145143
146144 /**
147145 * Get the `allow_nested_items_to_be_public` property of the storage account.
148- *
146+ *
149147 * Defaults to `true`
150- *
148+ *
151149 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#allow_nested_items_to_be_public
152150 */
153151 Expr getAllowNestedItemsToBePublic ( ) {
@@ -156,32 +154,32 @@ module AzureStorage {
156154
157155 /**
158156 * Get the `allow_nested_items_to_be_public` property of the storage account.
159- *
157+ *
160158 * Defaults to `true`
161- *
159+ *
162160 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#allow_nested_items_to_be_public
163161 */
164162 boolean getAllowNestedItemsToBePublicValue ( ) {
165- exists ( Expr e | e = this .getAllowNestedItemsToBePublic ( ) | result = e .( BooleanLiteral ) .getBool ( ) )
163+ exists ( Expr e | e = this .getAllowNestedItemsToBePublic ( ) |
164+ result = e .( BooleanLiteral ) .getBool ( )
165+ )
166166 or
167167 not exists ( this .getAllowNestedItemsToBePublic ( ) ) and
168168 result = true
169169 }
170170
171171 /**
172172 * Get the `https_traffic_only_enabled` property of the storage account.
173- *
173+ *
174174 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#https_traffic_only_enabled
175175 */
176- Expr getHttpsTrafficOnlyEnabled ( ) {
177- result = this .getAttribute ( "https_traffic_only_enabled" )
178- }
176+ Expr getHttpsTrafficOnlyEnabled ( ) { result = this .getAttribute ( "https_traffic_only_enabled" ) }
179177
180178 /**
181179 * Get the `https_traffic_only_enabled` property of the storage account.
182- *
180+ *
183181 * Defaults to `true`
184- *
182+ *
185183 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#https_traffic_only_enabled
186184 */
187185 boolean getHttpsTrafficOnlyEnabledValue ( ) {
@@ -193,25 +191,23 @@ module AzureStorage {
193191
194192 /**
195193 * Get the `min_tls_version` property of the storage account.
196- *
194+ *
197195 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#min_tls_version
198196 */
199- Expr getMinTlsVersion ( ) {
200- result = this .getAttribute ( "min_tls_version" )
201- }
197+ Expr getMinTlsVersion ( ) { result = this .getAttribute ( "min_tls_version" ) }
202198
203199 /**
204200 * Get the `min_tls_version` property of the storage account.
205- *
201+ *
206202 * Defaults to `TLS1_2`
207- *
203+ *
208204 * https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account.html#min_tls_version
209205 */
210- string getMinTlsVersionValue ( ) {
211- exists ( Expr e | e = this .getMinTlsVersion ( ) | result = e .( StringLiteral ) .getValue ( ) )
212- or
213- not exists ( this .getMinTlsVersion ( ) ) and
214- result = "TLS1_2"
215- }
206+ string getMinTlsVersionValue ( ) {
207+ exists ( Expr e | e = this .getMinTlsVersion ( ) | result = e .( StringLiteral ) .getValue ( ) )
208+ or
209+ not exists ( this .getMinTlsVersion ( ) ) and
210+ result = "TLS1_2"
211+ }
216212 }
217213}
0 commit comments