Skip to content

Commit c62d426

Browse files
wata727github-actions[bot]
authored andcommitted
Update Magic Modules
1 parent 2c72d48 commit c62d426

12 files changed

+762
-2
lines changed

rules/magicmodules/api_definition.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ var APIDefinition = map[string]string{
126126
"google_certificate_manager_certificate_map_entry": "certificatemanager.googleapis.com",
127127
"google_certificate_manager_dns_authorization": "certificatemanager.googleapis.com",
128128
"google_certificate_manager_trust_config": "certificatemanager.googleapis.com",
129+
"google_ces_agent": "ces.googleapis.com",
130+
"google_ces_app": "ces.googleapis.com",
131+
"google_ces_app_version": "ces.googleapis.com",
132+
"google_ces_deployment": "ces.googleapis.com",
133+
"google_ces_example": "ces.googleapis.com",
134+
"google_ces_guardrail": "ces.googleapis.com",
135+
"google_ces_tool": "ces.googleapis.com",
136+
"google_ces_toolset": "ces.googleapis.com",
129137
"google_cloud_asset_folder_feed": "cloudasset.googleapis.com",
130138
"google_cloud_asset_organization_feed": "cloudasset.googleapis.com",
131139
"google_cloud_asset_project_feed": "cloudasset.googleapis.com",
@@ -139,6 +147,7 @@ var APIDefinition = map[string]string{
139147
"google_cloud_scheduler_job": "cloudscheduler.googleapis.com",
140148
"google_cloud_security_compliance_cloud_control": "cloudsecuritycompliance.googleapis.com",
141149
"google_cloud_security_compliance_framework": "cloudsecuritycompliance.googleapis.com",
150+
"google_cloud_security_compliance_framework_deployment": "cloudsecuritycompliance.googleapis.com",
142151
"google_cloud_tasks_queue": "cloudtasks.googleapis.com",
143152
"google_cloudbuild_bitbucket_server_config": "cloudbuild.googleapis.com",
144153
"google_cloudbuild_trigger": "cloudbuild.googleapis.com",
@@ -195,6 +204,7 @@ var APIDefinition = map[string]string{
195204
"google_compute_network_peering_routes_config": "compute.googleapis.com",
196205
"google_compute_node_group": "compute.googleapis.com",
197206
"google_compute_node_template": "compute.googleapis.com",
207+
"google_compute_organization_security_policy": "compute.googleapis.com",
198208
"google_compute_packet_mirroring": "compute.googleapis.com",
199209
"google_compute_per_instance_config": "compute.googleapis.com",
200210
"google_compute_preview_feature": "compute.googleapis.com",
@@ -300,6 +310,7 @@ var APIDefinition = map[string]string{
300310
"google_dialogflow_entity_type": "dialogflow.googleapis.com",
301311
"google_dialogflow_fulfillment": "dialogflow.googleapis.com",
302312
"google_dialogflow_intent": "dialogflow.googleapis.com",
313+
"google_dialogflow_version": "dialogflow.googleapis.com",
303314
"google_dns_managed_zone": "dns.googleapis.com",
304315
"google_dns_policy": "dns.googleapis.com",
305316
"google_dns_response_policy": "dns.googleapis.com",
@@ -391,6 +402,7 @@ var APIDefinition = map[string]string{
391402
"google_iam_workforce_pool_provider": "iam.googleapis.com",
392403
"google_iam_workforce_pool_provider_key": "iam.googleapis.com",
393404
"google_iam_workforce_pool_provider_scim_tenant": "iam.googleapis.com",
405+
"google_iam_workforce_pool_provider_scim_token": "iam.googleapis.com",
394406
"google_iam_workload_identity_pool": "iam.googleapis.com",
395407
"google_iam_workload_identity_pool_provider": "iam.googleapis.com",
396408
"google_iap_brand": "iap.googleapis.com",
@@ -451,6 +463,7 @@ var APIDefinition = map[string]string{
451463
"google_netapp_backup": "netapp.googleapis.com",
452464
"google_netapp_backup_policy": "netapp.googleapis.com",
453465
"google_netapp_backup_vault": "netapp.googleapis.com",
466+
"google_netapp_host_group": "netapp.googleapis.com",
454467
"google_netapp_kmsconfig": "netapp.googleapis.com",
455468
"google_netapp_storage_pool": "netapp.googleapis.com",
456469
"google_netapp_volume": "netapp.googleapis.com",
@@ -465,6 +478,7 @@ var APIDefinition = map[string]string{
465478
"google_network_connectivity_service_connection_policy": "networkconnectivity.googleapis.com",
466479
"google_network_connectivity_spoke": "networkconnectivity.googleapis.com",
467480
"google_network_management_connectivity_test": "networkmanagement.googleapis.com",
481+
"google_network_management_organization_vpc_flow_logs_config": "networkmanagement.googleapis.com",
468482
"google_network_management_vpc_flow_logs_config": "networkmanagement.googleapis.com",
469483
"google_network_security_address_group": "networksecurity.googleapis.com",
470484
"google_network_security_authz_policy": "networksecurity.googleapis.com",
@@ -495,9 +509,15 @@ var APIDefinition = map[string]string{
495509
"google_network_services_gateway": "networkservices.googleapis.com",
496510
"google_network_services_grpc_route": "networkservices.googleapis.com",
497511
"google_network_services_http_route": "networkservices.googleapis.com",
512+
"google_network_services_lb_edge_extension": "networkservices.googleapis.com",
498513
"google_network_services_lb_route_extension": "networkservices.googleapis.com",
499514
"google_network_services_lb_traffic_extension": "networkservices.googleapis.com",
500515
"google_network_services_mesh": "networkservices.googleapis.com",
516+
"google_network_services_multicast_consumer_association": "networkservices.googleapis.com",
517+
"google_network_services_multicast_domain": "networkservices.googleapis.com",
518+
"google_network_services_multicast_domain_activation": "networkservices.googleapis.com",
519+
"google_network_services_multicast_domain_group": "networkservices.googleapis.com",
520+
"google_network_services_multicast_producer_association": "networkservices.googleapis.com",
501521
"google_network_services_service_binding": "networkservices.googleapis.com",
502522
"google_network_services_tcp_route": "networkservices.googleapis.com",
503523
"google_network_services_tls_route": "networkservices.googleapis.com",
@@ -509,6 +529,7 @@ var APIDefinition = map[string]string{
509529
"google_oracle_database_cloud_exadata_infrastructure": "oracledatabase.googleapis.com",
510530
"google_oracle_database_cloud_vm_cluster": "oracledatabase.googleapis.com",
511531
"google_oracle_database_db_system": "oracledatabase.googleapis.com",
532+
"google_oracle_database_exascale_db_storage_vault": "oracledatabase.googleapis.com",
512533
"google_oracle_database_odb_network": "oracledatabase.googleapis.com",
513534
"google_oracle_database_odb_subnet": "oracledatabase.googleapis.com",
514535
"google_org_policy_custom_constraint": "orgpolicy.googleapis.com",
@@ -572,6 +593,9 @@ var APIDefinition = map[string]string{
572593
"google_secure_source_manager_repository": "securesourcemanager.googleapis.com",
573594
"google_securityposture_posture": "securityposture.googleapis.com",
574595
"google_securityposture_posture_deployment": "securityposture.googleapis.com",
596+
"google_service_directory_endpoint": "servicedirectory.googleapis.com",
597+
"google_service_directory_namespace": "servicedirectory.googleapis.com",
598+
"google_service_directory_service": "servicedirectory.googleapis.com",
575599
"google_service_networking_vpc_service_controls": "servicenetworking.googleapis.com",
576600
"google_site_verification_web_resource": "www.googleapis.com",
577601
"google_sourcerepo_repository": "sourcerepo.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+
// GoogleComputeOrganizationSecurityPolicyInvalidTypeRule checks the pattern is valid
24+
type GoogleComputeOrganizationSecurityPolicyInvalidTypeRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleComputeOrganizationSecurityPolicyInvalidTypeRule returns new rule with default attributes
32+
func NewGoogleComputeOrganizationSecurityPolicyInvalidTypeRule() *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule {
33+
return &GoogleComputeOrganizationSecurityPolicyInvalidTypeRule{
34+
resourceType: "google_compute_organization_security_policy",
35+
attributeName: "type",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule) Name() string {
41+
return "google_compute_organization_security_policy_invalid_type"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleComputeOrganizationSecurityPolicyInvalidTypeRule) 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{"FIREWALL", "CLOUD_ARMOR", "CLOUD_ARMOR_EDGE", "CLOUD_ARMOR_INTERNAL_SERVICE", "CLOUD_ARMOR_NETWORK", ""}, 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+
// GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule checks the pattern is valid
24+
type GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule returns new rule with default attributes
32+
func NewGoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule() *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule {
33+
return &GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule{
34+
resourceType: "google_compute_public_advertised_prefix",
35+
attributeName: "ipv6_access_type",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule) Name() string {
41+
return "google_compute_public_advertised_prefix_invalid_ipv6_access_type"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleComputePublicAdvertisedPrefixInvalidIpv6AccessTypeRule) 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{"EXTERNAL", "INTERNAL", ""}, 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_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", "EXTERNAL_IPV6_SUBNETWORK_CREATION", ""}, false)
75+
validateFunc := validation.StringInSlice([]string{"DELEGATION", "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", "EXTERNAL_IPV6_SUBNETWORK_CREATION", "INTERNAL_IPV6_SUBNETWORK_CREATION", ""}, 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+
// GoogleDiscoveryEngineControlInvalidSolutionTypeRule checks the pattern is valid
24+
type GoogleDiscoveryEngineControlInvalidSolutionTypeRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleDiscoveryEngineControlInvalidSolutionTypeRule returns new rule with default attributes
32+
func NewGoogleDiscoveryEngineControlInvalidSolutionTypeRule() *GoogleDiscoveryEngineControlInvalidSolutionTypeRule {
33+
return &GoogleDiscoveryEngineControlInvalidSolutionTypeRule{
34+
resourceType: "google_discovery_engine_control",
35+
attributeName: "solution_type",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleDiscoveryEngineControlInvalidSolutionTypeRule) Name() string {
41+
return "google_discovery_engine_control_invalid_solution_type"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleDiscoveryEngineControlInvalidSolutionTypeRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleDiscoveryEngineControlInvalidSolutionTypeRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleDiscoveryEngineControlInvalidSolutionTypeRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleDiscoveryEngineControlInvalidSolutionTypeRule) 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{"SOLUTION_TYPE_RECOMMENDATION", "SOLUTION_TYPE_SEARCH", "SOLUTION_TYPE_CHAT", "SOLUTION_TYPE_GENERATIVE_CHAT"}, 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+
}

0 commit comments

Comments
 (0)