Skip to content

Commit 806f25b

Browse files
wata727github-actions[bot]
authored andcommitted
Update Magic Modules
1 parent 0b5ed2f commit 806f25b

9 files changed

+377
-3
lines changed

rules/magicmodules/api_definition.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var APIDefinition = map[string]string{
4343
"google_apigee_app_group": "apigee.googleapis.com",
4444
"google_apigee_control_plane_access": "apigee.googleapis.com",
4545
"google_apigee_developer": "apigee.googleapis.com",
46+
"google_apigee_developer_app": "apigee.googleapis.com",
4647
"google_apigee_dns_zone": "apigee.googleapis.com",
4748
"google_apigee_endpoint_attachment": "apigee.googleapis.com",
4849
"google_apigee_env_keystore": "apigee.googleapis.com",
@@ -51,6 +52,7 @@ var APIDefinition = map[string]string{
5152
"google_apigee_envgroup_attachment": "apigee.googleapis.com",
5253
"google_apigee_environment": "apigee.googleapis.com",
5354
"google_apigee_environment_addons_config": "apigee.googleapis.com",
55+
"google_apigee_environment_api_revision_deployment": "apigee.googleapis.com",
5456
"google_apigee_environment_keyvaluemaps": "apigee.googleapis.com",
5557
"google_apigee_environment_keyvaluemaps_entries": "apigee.googleapis.com",
5658
"google_apigee_instance": "apigee.googleapis.com",
@@ -193,6 +195,7 @@ var APIDefinition = map[string]string{
193195
"google_compute_node_template": "compute.googleapis.com",
194196
"google_compute_packet_mirroring": "compute.googleapis.com",
195197
"google_compute_per_instance_config": "compute.googleapis.com",
198+
"google_compute_preview_feature": "compute.googleapis.com",
196199
"google_compute_project_cloud_armor_tier": "compute.googleapis.com",
197200
"google_compute_public_advertised_prefix": "compute.googleapis.com",
198201
"google_compute_public_delegated_prefix": "compute.googleapis.com",
@@ -267,6 +270,7 @@ var APIDefinition = map[string]string{
267270
"google_dataplex_datascan": "dataplex.googleapis.com",
268271
"google_dataplex_entry": "dataplex.googleapis.com",
269272
"google_dataplex_entry_group": "dataplex.googleapis.com",
273+
"google_dataplex_entry_link": "dataplex.googleapis.com",
270274
"google_dataplex_entry_type": "dataplex.googleapis.com",
271275
"google_dataplex_glossary": "dataplex.googleapis.com",
272276
"google_dataplex_glossary_category": "dataplex.googleapis.com",
@@ -383,6 +387,7 @@ var APIDefinition = map[string]string{
383387
"google_iam_workforce_pool": "iam.googleapis.com",
384388
"google_iam_workforce_pool_provider": "iam.googleapis.com",
385389
"google_iam_workforce_pool_provider_key": "iam.googleapis.com",
390+
"google_iam_workforce_pool_provider_scim_tenant": "iam.googleapis.com",
386391
"google_iam_workload_identity_pool": "iam.googleapis.com",
387392
"google_iam_workload_identity_pool_provider": "iam.googleapis.com",
388393
"google_iap_brand": "iap.googleapis.com",
@@ -500,6 +505,7 @@ var APIDefinition = map[string]string{
500505
"google_oracle_database_autonomous_database": "oracledatabase.googleapis.com",
501506
"google_oracle_database_cloud_exadata_infrastructure": "oracledatabase.googleapis.com",
502507
"google_oracle_database_cloud_vm_cluster": "oracledatabase.googleapis.com",
508+
"google_oracle_database_db_system": "oracledatabase.googleapis.com",
503509
"google_oracle_database_odb_network": "oracledatabase.googleapis.com",
504510
"google_oracle_database_odb_subnet": "oracledatabase.googleapis.com",
505511
"google_org_policy_custom_constraint": "orgpolicy.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+
// GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule checks the pattern is valid
24+
type GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule returns new rule with default attributes
32+
func NewGoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule() *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule {
33+
return &GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule{
34+
resourceType: "google_beyondcorp_security_gateway_application",
35+
attributeName: "schema",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule) Name() string {
41+
return "google_beyondcorp_security_gateway_application_invalid_schema"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleBeyondcorpSecurityGatewayApplicationInvalidSchemaRule) 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{"PROXY_GATEWAY", "API_GATEWAY", ""}, 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+
// GoogleComputePreviewFeatureInvalidActivationStatusRule checks the pattern is valid
24+
type GoogleComputePreviewFeatureInvalidActivationStatusRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleComputePreviewFeatureInvalidActivationStatusRule returns new rule with default attributes
32+
func NewGoogleComputePreviewFeatureInvalidActivationStatusRule() *GoogleComputePreviewFeatureInvalidActivationStatusRule {
33+
return &GoogleComputePreviewFeatureInvalidActivationStatusRule{
34+
resourceType: "google_compute_preview_feature",
35+
attributeName: "activation_status",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleComputePreviewFeatureInvalidActivationStatusRule) Name() string {
41+
return "google_compute_preview_feature_invalid_activation_status"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleComputePreviewFeatureInvalidActivationStatusRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleComputePreviewFeatureInvalidActivationStatusRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleComputePreviewFeatureInvalidActivationStatusRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleComputePreviewFeatureInvalidActivationStatusRule) 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{"ENABLED", "ACTIVATION_STATE_UNSPECIFIED"}, 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+
// GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule checks the pattern is valid
24+
type GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule struct {
25+
tflint.DefaultRule
26+
27+
resourceType string
28+
attributeName string
29+
}
30+
31+
// NewGoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule returns new rule with default attributes
32+
func NewGoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule() *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule {
33+
return &GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule{
34+
resourceType: "google_discovery_engine_license_config",
35+
attributeName: "subscription_term",
36+
}
37+
}
38+
39+
// Name returns the rule name
40+
func (r *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule) Name() string {
41+
return "google_discovery_engine_license_config_invalid_subscription_term"
42+
}
43+
44+
// Enabled returns whether the rule is enabled by default
45+
func (r *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule) Enabled() bool {
46+
return true
47+
}
48+
49+
// Severity returns the rule severity
50+
func (r *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule) Severity() tflint.Severity {
51+
return tflint.ERROR
52+
}
53+
54+
// Link returns the rule reference link
55+
func (r *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule) Link() string {
56+
return ""
57+
}
58+
59+
// Check checks the pattern is valid
60+
func (r *GoogleDiscoveryEngineLicenseConfigInvalidSubscriptionTermRule) 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{"SUBSCRIPTION_TERM_UNSPECIFIED", "SUBSCRIPTION_TERM_ONE_MONTH", "SUBSCRIPTION_TERM_ONE_YEAR", "SUBSCRIPTION_TERM_THREE_YEARS", "SUBSCRIPTION_TERM_THREE_MONTHS", "SUBSCRIPTION_TERM_FOURTEEN_DAYS", "SUBSCRIPTION_TERM_CUSTOM"}, 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)