Skip to content

Commit 5efdf8d

Browse files
wata727github-actions[bot]
authored andcommitted
Update Magic Modules
1 parent fffa2e5 commit 5efdf8d

14 files changed

+852
-3
lines changed

rules/magicmodules/api_definition.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var APIDefinition = map[string]string{
5656
"google_apigee_keystores_aliases_self_signed_cert": "apigee.googleapis.com",
5757
"google_apigee_nat_address": "apigee.googleapis.com",
5858
"google_apigee_organization": "apigee.googleapis.com",
59+
"google_apigee_security_profile_v2": "apigee.googleapis.com",
5960
"google_apigee_sync_authorization": "apigee.googleapis.com",
6061
"google_apigee_target_server": "apigee.googleapis.com",
6162
"google_apihub_api_hub_instance": "apihub.googleapis.com",
@@ -98,7 +99,10 @@ var APIDefinition = map[string]string{
9899
"google_bigquery_reservation": "bigqueryreservation.googleapis.com",
99100
"google_bigquery_reservation_assignment": "bigqueryreservation.googleapis.com",
100101
"google_bigquery_routine": "bigquery.googleapis.com",
102+
"google_bigquery_row_access_policy": "bigquery.googleapis.com",
101103
"google_bigtable_app_profile": "bigtableadmin.googleapis.com",
104+
"google_bigtable_logical_view": "bigtableadmin.googleapis.com",
105+
"google_bigtable_materialized_view": "bigtableadmin.googleapis.com",
102106
"google_billing_budget": "billingbudgets.googleapis.com",
103107
"google_billing_project_info": "cloudbilling.googleapis.com",
104108
"google_binary_authorization_attestor": "binaryauthorization.googleapis.com",
@@ -189,6 +193,8 @@ var APIDefinition = map[string]string{
189193
"google_compute_region_network_firewall_policy_association": "compute.googleapis.com",
190194
"google_compute_region_network_firewall_policy_rule": "compute.googleapis.com",
191195
"google_compute_region_per_instance_config": "compute.googleapis.com",
196+
"google_compute_region_security_policy": "compute.googleapis.com",
197+
"google_compute_region_security_policy_rule": "compute.googleapis.com",
192198
"google_compute_region_ssl_certificate": "compute.googleapis.com",
193199
"google_compute_region_ssl_policy": "compute.googleapis.com",
194200
"google_compute_region_target_http_proxy": "compute.googleapis.com",
@@ -198,6 +204,7 @@ var APIDefinition = map[string]string{
198204
"google_compute_reservation": "compute.googleapis.com",
199205
"google_compute_resize_request": "compute.googleapis.com",
200206
"google_compute_resource_policy": "compute.googleapis.com",
207+
"google_compute_resource_policy_attachment": "compute.googleapis.com",
201208
"google_compute_route": "compute.googleapis.com",
202209
"google_compute_router": "compute.googleapis.com",
203210
"google_compute_router_nat": "compute.googleapis.com",
@@ -208,6 +215,7 @@ var APIDefinition = map[string]string{
208215
"google_compute_snapshot": "compute.googleapis.com",
209216
"google_compute_ssl_certificate": "compute.googleapis.com",
210217
"google_compute_ssl_policy": "compute.googleapis.com",
218+
"google_compute_storage_pool": "compute.googleapis.com",
211219
"google_compute_subnetwork": "compute.googleapis.com",
212220
"google_compute_target_grpc_proxy": "compute.googleapis.com",
213221
"google_compute_target_http_proxy": "compute.googleapis.com",
@@ -240,6 +248,9 @@ var APIDefinition = map[string]string{
240248
"google_dataplex_datascan": "dataplex.googleapis.com",
241249
"google_dataplex_entry_group": "dataplex.googleapis.com",
242250
"google_dataplex_entry_type": "dataplex.googleapis.com",
251+
"google_dataplex_glossary": "dataplex.googleapis.com",
252+
"google_dataplex_glossary_category": "dataplex.googleapis.com",
253+
"google_dataplex_glossary_term": "dataplex.googleapis.com",
243254
"google_dataplex_task": "dataplex.googleapis.com",
244255
"google_dataproc_autoscaling_policy": "dataproc.googleapis.com",
245256
"google_dataproc_batch": "dataproc.googleapis.com",
@@ -291,6 +302,9 @@ var APIDefinition = map[string]string{
291302
"google_firebase_app_check_service_config": "firebaseappcheck.googleapis.com",
292303
"google_firebase_app_hosting_backend": "firebaseapphosting.googleapis.com",
293304
"google_firebase_app_hosting_build": "firebaseapphosting.googleapis.com",
305+
"google_firebase_app_hosting_default_domain": "firebaseapphosting.googleapis.com",
306+
"google_firebase_app_hosting_domain": "firebaseapphosting.googleapis.com",
307+
"google_firebase_app_hosting_traffic": "firebaseapphosting.googleapis.com",
294308
"google_firebase_data_connect_service": "firebasedataconnect.googleapis.com",
295309
"google_firestore_backup_schedule": "firestore.googleapis.com",
296310
"google_firestore_database": "firestore.googleapis.com",
@@ -310,7 +324,9 @@ var APIDefinition = map[string]string{
310324
"google_gemini_release_channel_setting": "cloudaicompanion.googleapis.com",
311325
"google_gemini_release_channel_setting_binding": "cloudaicompanion.googleapis.com",
312326
"google_gemini_repository_group": "cloudaicompanion.googleapis.com",
327+
"google_gke_backup_backup_channel": "gkebackup.googleapis.com",
313328
"google_gke_backup_backup_plan": "gkebackup.googleapis.com",
329+
"google_gke_backup_restore_channel": "gkebackup.googleapis.com",
314330
"google_gke_backup_restore_plan": "gkebackup.googleapis.com",
315331
"google_gke_hub_feature": "gkehub.googleapis.com",
316332
"google_gke_hub_fleet": "gkehub.googleapis.com",
@@ -417,6 +433,10 @@ var APIDefinition = map[string]string{
417433
"google_network_security_firewall_endpoint_association": "networksecurity.googleapis.com",
418434
"google_network_security_gateway_security_policy": "networksecurity.googleapis.com",
419435
"google_network_security_gateway_security_policy_rule": "networksecurity.googleapis.com",
436+
"google_network_security_intercept_deployment": "networksecurity.googleapis.com",
437+
"google_network_security_intercept_deployment_group": "networksecurity.googleapis.com",
438+
"google_network_security_intercept_endpoint_group": "networksecurity.googleapis.com",
439+
"google_network_security_intercept_endpoint_group_association": "networksecurity.googleapis.com",
420440
"google_network_security_mirroring_deployment": "networksecurity.googleapis.com",
421441
"google_network_security_mirroring_deployment_group": "networksecurity.googleapis.com",
422442
"google_network_security_mirroring_endpoint_group": "networksecurity.googleapis.com",
@@ -452,6 +472,7 @@ var APIDefinition = map[string]string{
452472
"google_organization_access_approval_settings": "accessapproval.googleapis.com",
453473
"google_os_config_patch_deployment": "osconfig.googleapis.com",
454474
"google_os_config_v2_policy_orchestrator": "osconfig.googleapis.com",
475+
"google_os_config_v2_policy_orchestrator_for_folder": "osconfig.googleapis.com",
455476
"google_os_config_v2_policy_orchestrator_for_organization": "osconfig.googleapis.com",
456477
"google_os_login_ssh_public_key": "oslogin.googleapis.com",
457478
"google_parallelstore_instance": "parallelstore.googleapis.com",
@@ -516,6 +537,7 @@ var APIDefinition = map[string]string{
516537
"google_sql_database": "sqladmin.googleapis.com",
517538
"google_sql_source_representation_instance": "sqladmin.googleapis.com",
518539
"google_storage_anywhere_cache": "storage.googleapis.com",
540+
"google_storage_batch_operations_job": "storagebatchoperations.googleapis.com",
519541
"google_storage_bucket_access_control": "storage.googleapis.com",
520542
"google_storage_control_folder_intelligence_config": "storage.googleapis.com",
521543
"google_storage_control_organization_intelligence_config": "storage.googleapis.com",
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// ----------------------------------------------------------------------------
2+
//
3+
// *** AUTO GENERATED CODE *** Type: MMv1 ***
4+
//
5+
// ----------------------------------------------------------------------------
6+
//
7+
// This file is automatically generated by Magic Modules and manual
8+
// changes will be clobbered when the file is regenerated.
9+
//
10+
// Please read more about how to change this file in
11+
// .github/CONTRIBUTING.md.
12+
//
13+
// ----------------------------------------------------------------------------
14+
15+
package magicmodules
16+
17+
import (
18+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
19+
"github.com/terraform-linters/tflint-plugin-sdk/hclext"
20+
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
21+
)
22+
23+
// GoogleAlloydbInstanceInvalidActivationPolicyRule checks the pattern is valid
24+
type GoogleAlloydbInstanceInvalidActivationPolicyRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleAlloydbInstanceInvalidActivationPolicyRule returns new rule with default attributes
32+
func NewGoogleAlloydbInstanceInvalidActivationPolicyRule() *GoogleAlloydbInstanceInvalidActivationPolicyRule {
33+
return &GoogleAlloydbInstanceInvalidActivationPolicyRule{
34+
resourceType: "google_alloydb_instance",
35+
attributeName: "activation_policy",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleAlloydbInstanceInvalidActivationPolicyRule) Name() string {
41+
return "google_alloydb_instance_invalid_activation_policy"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleAlloydbInstanceInvalidActivationPolicyRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleAlloydbInstanceInvalidActivationPolicyRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleAlloydbInstanceInvalidActivationPolicyRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleAlloydbInstanceInvalidActivationPolicyRule) Check(runner tflint.Runner) error {
61+
resources, err := runner.GetResourceContent(r.resourceType, &hclext.BodySchema{
62+
Attributes: []hclext.AttributeSchema{{Name: r.attributeName}},
63+
}, nil)
64+
if err != nil {
65+
return err
66+
}
67+
68+
for _, resource := range resources.Blocks {
69+
attribute, exists := resource.Body.Attributes[r.attributeName]
70+
if !exists {
71+
continue
72+
}
73+
74+
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75+
validateFunc := validation.StringInSlice([]string{"ACTIVATION_POLICY_UNSPECIFIED", "ALWAYS", "NEVER", ""}, false)
76+
77+
_, errors := validateFunc(val, r.attributeName)
78+
for _, err := range errors {
79+
if err := runner.EmitIssue(r, err.Error(), attribute.Expr.Range()); err != nil {
80+
return err
81+
}
82+
}
83+
return nil
84+
}, nil)
85+
if err != nil {
86+
return err
87+
}
88+
}
89+
90+
return nil
91+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// ----------------------------------------------------------------------------
2+
//
3+
// *** AUTO GENERATED CODE *** Type: MMv1 ***
4+
//
5+
// ----------------------------------------------------------------------------
6+
//
7+
// This file is automatically generated by Magic Modules and manual
8+
// changes will be clobbered when the file is regenerated.
9+
//
10+
// Please read more about how to change this file in
11+
// .github/CONTRIBUTING.md.
12+
//
13+
// ----------------------------------------------------------------------------
14+
15+
package magicmodules
16+
17+
import (
18+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
19+
"github.com/terraform-linters/tflint-plugin-sdk/hclext"
20+
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
21+
)
22+
23+
// GoogleBigqueryRoutineInvalidSecurityModeRule checks the pattern is valid
24+
type GoogleBigqueryRoutineInvalidSecurityModeRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleBigqueryRoutineInvalidSecurityModeRule returns new rule with default attributes
32+
func NewGoogleBigqueryRoutineInvalidSecurityModeRule() *GoogleBigqueryRoutineInvalidSecurityModeRule {
33+
return &GoogleBigqueryRoutineInvalidSecurityModeRule{
34+
resourceType: "google_bigquery_routine",
35+
attributeName: "security_mode",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleBigqueryRoutineInvalidSecurityModeRule) Name() string {
41+
return "google_bigquery_routine_invalid_security_mode"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleBigqueryRoutineInvalidSecurityModeRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleBigqueryRoutineInvalidSecurityModeRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleBigqueryRoutineInvalidSecurityModeRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleBigqueryRoutineInvalidSecurityModeRule) Check(runner tflint.Runner) error {
61+
resources, err := runner.GetResourceContent(r.resourceType, &hclext.BodySchema{
62+
Attributes: []hclext.AttributeSchema{{Name: r.attributeName}},
63+
}, nil)
64+
if err != nil {
65+
return err
66+
}
67+
68+
for _, resource := range resources.Blocks {
69+
attribute, exists := resource.Body.Attributes[r.attributeName]
70+
if !exists {
71+
continue
72+
}
73+
74+
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75+
validateFunc := validation.StringInSlice([]string{"DEFINER", "INVOKER", ""}, false)
76+
77+
_, errors := validateFunc(val, r.attributeName)
78+
for _, err := range errors {
79+
if err := runner.EmitIssue(r, err.Error(), attribute.Expr.Range()); err != nil {
80+
return err
81+
}
82+
}
83+
return nil
84+
}, nil)
85+
if err != nil {
86+
return err
87+
}
88+
}
89+
90+
return nil
91+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// ----------------------------------------------------------------------------
2+
//
3+
// *** AUTO GENERATED CODE *** Type: MMv1 ***
4+
//
5+
// ----------------------------------------------------------------------------
6+
//
7+
// This file is automatically generated by Magic Modules and manual
8+
// changes will be clobbered when the file is regenerated.
9+
//
10+
// Please read more about how to change this file in
11+
// .github/CONTRIBUTING.md.
12+
//
13+
// ----------------------------------------------------------------------------
14+
15+
package magicmodules
16+
17+
import (
18+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
19+
"github.com/terraform-linters/tflint-plugin-sdk/hclext"
20+
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
21+
)
22+
23+
// GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule checks the pattern is valid
24+
type GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule returns new rule with default attributes
32+
func NewGoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule() *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule {
33+
return &GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule{
34+
resourceType: "google_compute_backend_service",
35+
attributeName: "external_managed_migration_state",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule) Name() string {
41+
return "google_compute_backend_service_invalid_external_managed_migration_state"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleComputeBackendServiceInvalidExternalManagedMigrationStateRule) Check(runner tflint.Runner) error {
61+
resources, err := runner.GetResourceContent(r.resourceType, &hclext.BodySchema{
62+
Attributes: []hclext.AttributeSchema{{Name: r.attributeName}},
63+
}, nil)
64+
if err != nil {
65+
return err
66+
}
67+
68+
for _, resource := range resources.Blocks {
69+
attribute, exists := resource.Body.Attributes[r.attributeName]
70+
if !exists {
71+
continue
72+
}
73+
74+
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75+
validateFunc := validation.StringInSlice([]string{"PREPARE", "TEST_BY_PERCENTAGE", "TEST_ALL_TRAFFIC", ""}, false)
76+
77+
_, errors := validateFunc(val, r.attributeName)
78+
for _, err := range errors {
79+
if err := runner.EmitIssue(r, err.Error(), attribute.Expr.Range()); err != nil {
80+
return err
81+
}
82+
}
83+
return nil
84+
}, nil)
85+
if err != nil {
86+
return err
87+
}
88+
}
89+
90+
return nil
91+
}

rules/magicmodules/google_compute_backend_service_invalid_protocol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (r *GoogleComputeBackendServiceInvalidProtocolRule) Check(runner tflint.Run
7272
}
7373

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"HTTP", "HTTPS", "HTTP2", "TCP", "SSL", "GRPC", "UNSPECIFIED", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"HTTP", "HTTPS", "HTTP2", "TCP", "SSL", "UDP", "GRPC", "UNSPECIFIED", "H2C", ""}, false)
7676

7777
_, errors := validateFunc(val, r.attributeName)
7878
for _, err := range errors {

0 commit comments

Comments
 (0)