Skip to content

Commit a08b71b

Browse files
wata727github-actions[bot]
authored andcommitted
Update Magic Modules
1 parent 4c0b151 commit a08b71b

21 files changed

+1053
-7
lines changed

rules/magicmodules/api_definition.go

Lines changed: 28 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,11 @@ 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_google_api_source": "eventarc.googleapis.com",
267274
"google_eventarc_google_channel_config": "eventarc.googleapis.com",
275+
"google_eventarc_message_bus": "eventarc.googleapis.com",
276+
"google_eventarc_pipeline": "eventarc.googleapis.com",
268277
"google_eventarc_trigger": "eventarc.googleapis.com",
269278
"google_filestore_backup": "file.googleapis.com",
270279
"google_filestore_instance": "file.googleapis.com",
@@ -276,6 +285,7 @@ var APIDefinition = map[string]string{
276285
"google_firebase_app_check_recaptcha_enterprise_config": "firebaseappcheck.googleapis.com",
277286
"google_firebase_app_check_recaptcha_v3_config": "firebaseappcheck.googleapis.com",
278287
"google_firebase_app_check_service_config": "firebaseappcheck.googleapis.com",
288+
"google_firebase_app_hosting_backend": "firebaseapphosting.googleapis.com",
279289
"google_firebase_data_connect_service": "firebasedataconnect.googleapis.com",
280290
"google_firestore_backup_schedule": "firestore.googleapis.com",
281291
"google_firestore_database": "firestore.googleapis.com",
@@ -285,7 +295,9 @@ var APIDefinition = map[string]string{
285295
"google_folder_access_approval_settings": "accessapproval.googleapis.com",
286296
"google_gemini_code_repository_index": "cloudaicompanion.googleapis.com",
287297
"google_gemini_data_sharing_with_google_setting": "cloudaicompanion.googleapis.com",
298+
"google_gemini_data_sharing_with_google_setting_binding": "cloudaicompanion.googleapis.com",
288299
"google_gemini_gemini_gcp_enablement_setting": "cloudaicompanion.googleapis.com",
300+
"google_gemini_gemini_gcp_enablement_setting_binding": "cloudaicompanion.googleapis.com",
289301
"google_gemini_logging_setting": "cloudaicompanion.googleapis.com",
290302
"google_gemini_logging_setting_binding": "cloudaicompanion.googleapis.com",
291303
"google_gemini_release_channel_setting": "cloudaicompanion.googleapis.com",
@@ -315,6 +327,8 @@ var APIDefinition = map[string]string{
315327
"google_iam_access_boundary_policy": "iam.googleapis.com",
316328
"google_iam_deny_policy": "iam.googleapis.com",
317329
"google_iam_folders_policy_binding": "iam.googleapis.com",
330+
"google_iam_oauth_client": "iam.googleapis.com",
331+
"google_iam_oauth_client_credential": "iam.googleapis.com",
318332
"google_iam_organizations_policy_binding": "iam.googleapis.com",
319333
"google_iam_principal_access_boundary_policy": "iam.googleapis.com",
320334
"google_iam_projects_policy_binding": "iam.googleapis.com",
@@ -352,6 +366,7 @@ var APIDefinition = map[string]string{
352366
"google_logging_metric": "logging.googleapis.com",
353367
"google_logging_organization_settings": "logging.googleapis.com",
354368
"google_looker_instance": "looker.googleapis.com",
369+
"google_lustre_instance": "lustre.googleapis.com",
355370
"google_managed_kafka_cluster": "managedkafka.googleapis.com",
356371
"google_managed_kafka_topic": "managedkafka.googleapis.com",
357372
"google_memcache_instance": "memcache.googleapis.com",
@@ -394,6 +409,10 @@ var APIDefinition = map[string]string{
394409
"google_network_security_firewall_endpoint_association": "networksecurity.googleapis.com",
395410
"google_network_security_gateway_security_policy": "networksecurity.googleapis.com",
396411
"google_network_security_gateway_security_policy_rule": "networksecurity.googleapis.com",
412+
"google_network_security_mirroring_deployment": "networksecurity.googleapis.com",
413+
"google_network_security_mirroring_deployment_group": "networksecurity.googleapis.com",
414+
"google_network_security_mirroring_endpoint_group": "networksecurity.googleapis.com",
415+
"google_network_security_mirroring_endpoint_group_association": "networksecurity.googleapis.com",
397416
"google_network_security_security_profile": "networksecurity.googleapis.com",
398417
"google_network_security_security_profile_group": "networksecurity.googleapis.com",
399418
"google_network_security_server_tls_policy": "networksecurity.googleapis.com",
@@ -403,9 +422,16 @@ var APIDefinition = map[string]string{
403422
"google_network_services_edge_cache_keyset": "networkservices.googleapis.com",
404423
"google_network_services_edge_cache_origin": "networkservices.googleapis.com",
405424
"google_network_services_edge_cache_service": "networkservices.googleapis.com",
425+
"google_network_services_endpoint_policy": "networkservices.googleapis.com",
406426
"google_network_services_gateway": "networkservices.googleapis.com",
427+
"google_network_services_grpc_route": "networkservices.googleapis.com",
428+
"google_network_services_http_route": "networkservices.googleapis.com",
407429
"google_network_services_lb_route_extension": "networkservices.googleapis.com",
408430
"google_network_services_lb_traffic_extension": "networkservices.googleapis.com",
431+
"google_network_services_mesh": "networkservices.googleapis.com",
432+
"google_network_services_service_binding": "networkservices.googleapis.com",
433+
"google_network_services_tcp_route": "networkservices.googleapis.com",
434+
"google_network_services_tls_route": "networkservices.googleapis.com",
409435
"google_notebooks_environment": "notebooks.googleapis.com",
410436
"google_notebooks_instance": "notebooks.googleapis.com",
411437
"google_notebooks_location": "notebooks.googleapis.com",
@@ -479,6 +505,8 @@ var APIDefinition = map[string]string{
479505
"google_sql_source_representation_instance": "sqladmin.googleapis.com",
480506
"google_storage_anywhere_cache": "storage.googleapis.com",
481507
"google_storage_bucket_access_control": "storage.googleapis.com",
508+
"google_storage_control_organization_intelligence_config": "storage.googleapis.com",
509+
"google_storage_control_project_intelligence_config": "storage.googleapis.com",
482510
"google_storage_default_object_access_control": "storage.googleapis.com",
483511
"google_storage_folder": "storage.googleapis.com",
484512
"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_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)