Skip to content

Commit f5a3b00

Browse files
wata727github-actions[bot]
authored andcommitted
Update Magic Modules
1 parent e7606a9 commit f5a3b00

24 files changed

+1244
-8
lines changed

rules/magicmodules/api_definition.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var APIDefinition = map[string]string{
4040
"google_apigee_addons_config": "apigee.googleapis.com",
4141
"google_apigee_app_group": "apigee.googleapis.com",
4242
"google_apigee_developer": "apigee.googleapis.com",
43+
"google_apigee_dns_zone": "apigee.googleapis.com",
4344
"google_apigee_endpoint_attachment": "apigee.googleapis.com",
4445
"google_apigee_env_keystore": "apigee.googleapis.com",
4546
"google_apigee_env_references": "apigee.googleapis.com",
@@ -57,6 +58,7 @@ var APIDefinition = map[string]string{
5758
"google_apigee_sync_authorization": "apigee.googleapis.com",
5859
"google_apigee_target_server": "apigee.googleapis.com",
5960
"google_apihub_api_hub_instance": "apihub.googleapis.com",
61+
"google_apihub_host_project_registration": "apihub.googleapis.com",
6062
"google_app_engine_application_url_dispatch_rules": "appengine.googleapis.com",
6163
"google_app_engine_domain_mapping": "appengine.googleapis.com",
6264
"google_app_engine_firewall_rule": "appengine.googleapis.com",
@@ -137,6 +139,7 @@ var APIDefinition = map[string]string{
137139
"google_compute_disk_resource_policy_attachment": "compute.googleapis.com",
138140
"google_compute_external_vpn_gateway": "compute.googleapis.com",
139141
"google_compute_firewall": "compute.googleapis.com",
142+
"google_compute_firewall_policy": "compute.googleapis.com",
140143
"google_compute_firewall_policy_association": "compute.googleapis.com",
141144
"google_compute_firewall_policy_rule": "compute.googleapis.com",
142145
"google_compute_forwarding_rule": "compute.googleapis.com",
@@ -152,6 +155,7 @@ var APIDefinition = map[string]string{
152155
"google_compute_instance_group_membership": "compute.googleapis.com",
153156
"google_compute_instance_group_named_port": "compute.googleapis.com",
154157
"google_compute_instance_settings": "compute.googleapis.com",
158+
"google_compute_instant_snapshot": "compute.googleapis.com",
155159
"google_compute_interconnect": "compute.googleapis.com",
156160
"google_compute_interconnect_attachment": "compute.googleapis.com",
157161
"google_compute_managed_ssl_certificate": "compute.googleapis.com",
@@ -196,6 +200,7 @@ var APIDefinition = map[string]string{
196200
"google_compute_router": "compute.googleapis.com",
197201
"google_compute_router_nat": "compute.googleapis.com",
198202
"google_compute_router_nat_address": "compute.googleapis.com",
203+
"google_compute_router_route_policy": "compute.googleapis.com",
199204
"google_compute_security_policy_rule": "compute.googleapis.com",
200205
"google_compute_service_attachment": "compute.googleapis.com",
201206
"google_compute_snapshot": "compute.googleapis.com",
@@ -264,7 +269,12 @@ var APIDefinition = map[string]string{
264269
"google_edgenetwork_network": "edgenetwork.googleapis.com",
265270
"google_edgenetwork_subnet": "edgenetwork.googleapis.com",
266271
"google_essential_contacts_contact": "essentialcontacts.googleapis.com",
272+
"google_eventarc_channel": "eventarc.googleapis.com",
273+
"google_eventarc_enrollment": "eventarc.googleapis.com",
274+
"google_eventarc_google_api_source": "eventarc.googleapis.com",
267275
"google_eventarc_google_channel_config": "eventarc.googleapis.com",
276+
"google_eventarc_message_bus": "eventarc.googleapis.com",
277+
"google_eventarc_pipeline": "eventarc.googleapis.com",
268278
"google_eventarc_trigger": "eventarc.googleapis.com",
269279
"google_filestore_backup": "file.googleapis.com",
270280
"google_filestore_instance": "file.googleapis.com",
@@ -276,6 +286,8 @@ var APIDefinition = map[string]string{
276286
"google_firebase_app_check_recaptcha_enterprise_config": "firebaseappcheck.googleapis.com",
277287
"google_firebase_app_check_recaptcha_v3_config": "firebaseappcheck.googleapis.com",
278288
"google_firebase_app_check_service_config": "firebaseappcheck.googleapis.com",
289+
"google_firebase_app_hosting_backend": "firebaseapphosting.googleapis.com",
290+
"google_firebase_app_hosting_build": "firebaseapphosting.googleapis.com",
279291
"google_firebase_data_connect_service": "firebasedataconnect.googleapis.com",
280292
"google_firestore_backup_schedule": "firestore.googleapis.com",
281293
"google_firestore_database": "firestore.googleapis.com",
@@ -285,7 +297,9 @@ var APIDefinition = map[string]string{
285297
"google_folder_access_approval_settings": "accessapproval.googleapis.com",
286298
"google_gemini_code_repository_index": "cloudaicompanion.googleapis.com",
287299
"google_gemini_data_sharing_with_google_setting": "cloudaicompanion.googleapis.com",
300+
"google_gemini_data_sharing_with_google_setting_binding": "cloudaicompanion.googleapis.com",
288301
"google_gemini_gemini_gcp_enablement_setting": "cloudaicompanion.googleapis.com",
302+
"google_gemini_gemini_gcp_enablement_setting_binding": "cloudaicompanion.googleapis.com",
289303
"google_gemini_logging_setting": "cloudaicompanion.googleapis.com",
290304
"google_gemini_logging_setting_binding": "cloudaicompanion.googleapis.com",
291305
"google_gemini_release_channel_setting": "cloudaicompanion.googleapis.com",
@@ -315,6 +329,8 @@ var APIDefinition = map[string]string{
315329
"google_iam_access_boundary_policy": "iam.googleapis.com",
316330
"google_iam_deny_policy": "iam.googleapis.com",
317331
"google_iam_folders_policy_binding": "iam.googleapis.com",
332+
"google_iam_oauth_client": "iam.googleapis.com",
333+
"google_iam_oauth_client_credential": "iam.googleapis.com",
318334
"google_iam_organizations_policy_binding": "iam.googleapis.com",
319335
"google_iam_principal_access_boundary_policy": "iam.googleapis.com",
320336
"google_iam_projects_policy_binding": "iam.googleapis.com",
@@ -352,10 +368,12 @@ var APIDefinition = map[string]string{
352368
"google_logging_metric": "logging.googleapis.com",
353369
"google_logging_organization_settings": "logging.googleapis.com",
354370
"google_looker_instance": "looker.googleapis.com",
371+
"google_lustre_instance": "lustre.googleapis.com",
355372
"google_managed_kafka_cluster": "managedkafka.googleapis.com",
356373
"google_managed_kafka_topic": "managedkafka.googleapis.com",
357374
"google_memcache_instance": "memcache.googleapis.com",
358375
"google_memorystore_instance": "memorystore.googleapis.com",
376+
"google_memorystore_instance_desired_user_created_endpoints": "memorystore.googleapis.com",
359377
"google_migration_center_group": "migrationcenter.googleapis.com",
360378
"google_migration_center_preference_set": "migrationcenter.googleapis.com",
361379
"google_ml_engine_model": "ml.googleapis.com",
@@ -394,6 +412,10 @@ var APIDefinition = map[string]string{
394412
"google_network_security_firewall_endpoint_association": "networksecurity.googleapis.com",
395413
"google_network_security_gateway_security_policy": "networksecurity.googleapis.com",
396414
"google_network_security_gateway_security_policy_rule": "networksecurity.googleapis.com",
415+
"google_network_security_mirroring_deployment": "networksecurity.googleapis.com",
416+
"google_network_security_mirroring_deployment_group": "networksecurity.googleapis.com",
417+
"google_network_security_mirroring_endpoint_group": "networksecurity.googleapis.com",
418+
"google_network_security_mirroring_endpoint_group_association": "networksecurity.googleapis.com",
397419
"google_network_security_security_profile": "networksecurity.googleapis.com",
398420
"google_network_security_security_profile_group": "networksecurity.googleapis.com",
399421
"google_network_security_server_tls_policy": "networksecurity.googleapis.com",
@@ -403,9 +425,16 @@ var APIDefinition = map[string]string{
403425
"google_network_services_edge_cache_keyset": "networkservices.googleapis.com",
404426
"google_network_services_edge_cache_origin": "networkservices.googleapis.com",
405427
"google_network_services_edge_cache_service": "networkservices.googleapis.com",
428+
"google_network_services_endpoint_policy": "networkservices.googleapis.com",
406429
"google_network_services_gateway": "networkservices.googleapis.com",
430+
"google_network_services_grpc_route": "networkservices.googleapis.com",
431+
"google_network_services_http_route": "networkservices.googleapis.com",
407432
"google_network_services_lb_route_extension": "networkservices.googleapis.com",
408433
"google_network_services_lb_traffic_extension": "networkservices.googleapis.com",
434+
"google_network_services_mesh": "networkservices.googleapis.com",
435+
"google_network_services_service_binding": "networkservices.googleapis.com",
436+
"google_network_services_tcp_route": "networkservices.googleapis.com",
437+
"google_network_services_tls_route": "networkservices.googleapis.com",
409438
"google_notebooks_environment": "notebooks.googleapis.com",
410439
"google_notebooks_instance": "notebooks.googleapis.com",
411440
"google_notebooks_location": "notebooks.googleapis.com",
@@ -419,6 +448,8 @@ var APIDefinition = map[string]string{
419448
"google_os_config_patch_deployment": "osconfig.googleapis.com",
420449
"google_os_login_ssh_public_key": "oslogin.googleapis.com",
421450
"google_parallelstore_instance": "parallelstore.googleapis.com",
451+
"google_parameter_manager_parameter": "parametermanager.googleapis.com",
452+
"google_parameter_manager_parameter_version": "parametermanager.googleapis.com",
422453
"google_privateca_ca_pool": "privateca.googleapis.com",
423454
"google_privateca_certificate": "privateca.googleapis.com",
424455
"google_privateca_certificate_authority": "privateca.googleapis.com",
@@ -479,6 +510,9 @@ var APIDefinition = map[string]string{
479510
"google_sql_source_representation_instance": "sqladmin.googleapis.com",
480511
"google_storage_anywhere_cache": "storage.googleapis.com",
481512
"google_storage_bucket_access_control": "storage.googleapis.com",
513+
"google_storage_control_folder_intelligence_config": "storage.googleapis.com",
514+
"google_storage_control_organization_intelligence_config": "storage.googleapis.com",
515+
"google_storage_control_project_intelligence_config": "storage.googleapis.com",
482516
"google_storage_default_object_access_control": "storage.googleapis.com",
483517
"google_storage_folder": "storage.googleapis.com",
484518
"google_storage_hmac_key": "storage.googleapis.com",

rules/magicmodules/google_compute_backend_service_invalid_locality_lb_policy.go

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

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV", "WEIGHTED_ROUND_ROBIN", ""}, false)
7676

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

rules/magicmodules/google_compute_interconnect_invalid_link_type.go

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

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"LINK_TYPE_ETHERNET_10G_LR", "LINK_TYPE_ETHERNET_100G_LR"}, false)
75+
validateFunc := validation.StringInSlice([]string{"LINK_TYPE_ETHERNET_10G_LR", "LINK_TYPE_ETHERNET_100G_LR", "LINK_TYPE_ETHERNET_400G_LR4"}, false)
7676

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

rules/magicmodules/google_compute_public_delegated_prefix_invalid_mode.go

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

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"DELEGATION", "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"DELEGATION", "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", "EXTERNAL_IPV6_SUBNETWORK_CREATION", ""}, false)
7676

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

rules/magicmodules/google_compute_region_backend_service_invalid_locality_lb_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (r *GoogleComputeRegionBackendServiceInvalidLocalityLbPolicyRule) Check(run
7272
}
7373

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV", "WEIGHTED_ROUND_ROBIN", ""}, false)
7676

7777
_, errors := validateFunc(val, r.attributeName)
7878
for _, err := range errors {
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+
// GoogleComputeRouterRoutePolicyInvalidTypeRule checks the pattern is valid
24+
type GoogleComputeRouterRoutePolicyInvalidTypeRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleComputeRouterRoutePolicyInvalidTypeRule returns new rule with default attributes
32+
func NewGoogleComputeRouterRoutePolicyInvalidTypeRule() *GoogleComputeRouterRoutePolicyInvalidTypeRule {
33+
return &GoogleComputeRouterRoutePolicyInvalidTypeRule{
34+
resourceType: "google_compute_router_route_policy",
35+
attributeName: "type",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleComputeRouterRoutePolicyInvalidTypeRule) Name() string {
41+
return "google_compute_router_route_policy_invalid_type"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleComputeRouterRoutePolicyInvalidTypeRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleComputeRouterRoutePolicyInvalidTypeRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleComputeRouterRoutePolicyInvalidTypeRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleComputeRouterRoutePolicyInvalidTypeRule) 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{"ROUTE_POLICY_TYPE_IMPORT", "ROUTE_POLICY_TYPE_EXPORT", ""}, 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_target_https_proxy_invalid_tls_early_data.go

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

7474
err := runner.EvaluateExpr(attribute.Expr, func(val string) error {
75-
validateFunc := validation.StringInSlice([]string{"STRICT", "PERMISSIVE", "DISABLED", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"STRICT", "PERMISSIVE", "UNRESTRICTED", "DISABLED", ""}, false)
7676

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

0 commit comments

Comments
 (0)