Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unicode characters for name fields in cloud logs resources #5698

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ibm/service/logs/data_source_ibm_logs_view_folders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func TestAccIbmLogsViewFoldersDataSourceBasic(t *testing.T) {
viewFolderName := fmt.Sprintf("tf_name_%d", acctest.RandIntRange(10, 100))
viewFolderName := fmt.Sprintf("TF_LOG_アクセスログ_%d", acctest.RandIntRange(10, 100))

resource.Test(t, resource.TestCase{
PreCheck: func() { acc.TestAccPreCheckCloudLogs(t) },
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ func ResourceIbmLogsAlertValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_alert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func TestAccIbmLogsAlertBasic(t *testing.T) {
var conf logsv0.Alert
name := fmt.Sprintf("tf_name_%d", acctest.RandIntRange(10, 100))
name := fmt.Sprintf("tf_name_応答時間モニター!_%d", acctest.RandIntRange(10, 100))
isActive := "false"
severity := "info_or_unspecified"
nameUpdate := fmt.Sprintf("tf_name_%d", acctest.RandIntRange(10, 100))
Expand Down
4 changes: 2 additions & 2 deletions ibm/service/logs/resource_ibm_logs_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -6564,7 +6564,7 @@ func ResourceIbmLogsDashboardValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 100,
},
Expand All @@ -6573,7 +6573,7 @@ func ResourceIbmLogsDashboardValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Optional: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 200,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_dashboard_folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ResourceIbmLogsDashboardFolderValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_data_access_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func ResourceIbmLogsDataAccessRuleValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_e2m.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func ResourceIbmLogsE2mValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_enrichment.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func ResourceIbmLogsEnrichmentValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
4 changes: 2 additions & 2 deletions ibm/service/logs/resource_ibm_logs_outgoing_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ResourceIbmLogsOutgoingWebhookValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand All @@ -126,7 +126,7 @@ func ResourceIbmLogsOutgoingWebhookValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Optional: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func ResourceIbmLogsPolicyValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_rule_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func ResourceIbmLogsRuleGroupValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 255,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func ResourceIbmLogsViewValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_view_folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ResourceIbmLogsViewFolderValidator() *validate.ResourceValidator {
ValidateFunctionIdentifier: validate.ValidateRegexpLen,
Type: validate.TypeString,
Required: true,
Regexp: `^[A-Za-z0-9_\.,\-"{}()\[\]=!:#\/$|' ]+$`,
Regexp: `^[\p{L}\p{N}\p{P}\p{Z}\p{S}\p{M}]+$`,
MinValueLength: 1,
MaxValueLength: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion ibm/service/logs/resource_ibm_logs_view_folder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

func TestAccIbmLogsViewFolderBasic(t *testing.T) {
var conf logsv0.ViewFolder
name := fmt.Sprintf("tf_name_%d", acctest.RandIntRange(10, 100))
name := fmt.Sprintf("tf_name_応答時間モニター_%d", acctest.RandIntRange(10, 100))
// nameUpdate := fmt.Sprintf("tf_name_%d", acctest.RandIntRange(10, 100))

resource.Test(t, resource.TestCase{
Expand Down
Loading
Loading