Skip to content

Commit

Permalink
Merge pull request #254 from NaverCloudPlatform/feature/acg_protonum_inc
Browse files Browse the repository at this point in the history
feat: increase acg protocol number 252 to 254
  • Loading branch information
youngmn authored Dec 22, 2022
2 parents cc301ea + dc7cc7f commit 09bdc9c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.5.5 h1:HJijRCjpGph/VXR5X4/u8D0++RmugpGg54KlB5CKJ9M=
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.5.5/go.mod h1:KWd9AT+YSM6qgsMzPnE23h2/r0bsPSIdJzZIg3BUcfI=
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.5.6 h1:SKhSNPL4xLLFbh8w+xoHUGl4SvOCX+O7DH9szZx/ywQ=
github.com/NaverCloudPlatform/ncloud-sdk-go-v2 v1.5.6/go.mod h1:KWd9AT+YSM6qgsMzPnE23h2/r0bsPSIdJzZIg3BUcfI=
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ=
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
Expand Down
13 changes: 7 additions & 6 deletions ncloud/resource_ncloud_access_control_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package ncloud

import (
"fmt"
"log"
"regexp"
"strconv"
"time"

"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/ncloud"
"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/vserver"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"log"
"regexp"
"strconv"
"time"
)

func init() {
Expand Down Expand Up @@ -39,7 +40,7 @@ func resourceNcloudAccessControlGroupRule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: ToDiagFunc(validation.All(
validation.StringMatch(regexp.MustCompile(`TCP|UDP|ICMP|\b([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-2])\b`), "only TCP, UDP, ICMP and 1-252 are valid values."),
validation.StringMatch(regexp.MustCompile(`TCP|UDP|ICMP|\b([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-4])\b`), "only TCP, UDP, ICMP and 1-254 are valid values."),
validation.StringNotInSlice([]string{"1", "6", "17"}, false),
)),
},
Expand Down Expand Up @@ -79,7 +80,7 @@ func resourceNcloudAccessControlGroupRule() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: ToDiagFunc(validation.All(
validation.StringMatch(regexp.MustCompile(`TCP|UDP|ICMP|\b([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-2])\b`), "only TCP, UDP, ICMP and 1-252 are valid values."),
validation.StringMatch(regexp.MustCompile(`TCP|UDP|ICMP|\b([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-4])\b`), "only TCP, UDP, ICMP and 1-254 are valid values."),
validation.StringNotInSlice([]string{"1", "6", "17"}, false),
)),
},
Expand Down
18 changes: 9 additions & 9 deletions ncloud/resource_ncloud_sourcepipeline_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ func makeTriggerData(triggerData *PipelineTrigger) []map[string]interface{} {
}
for _, schedule := range triggerData.Schedule {
mapping := map[string]interface{}{
"day": ncloud.StringListValue(schedule.Day),
"time": ncloud.StringValue(schedule.Time),
"timezone": ncloud.StringValue(schedule.TimeZone),
"day": ncloud.StringListValue(schedule.Day),
"time": ncloud.StringValue(schedule.Time),
"timezone": ncloud.StringValue(schedule.TimeZone),
"execute_only_with_change": ncloud.BoolValue(schedule.ExecuteOnlyWithChange),
}
scheduleTrigger = append(scheduleTrigger, mapping)
Expand Down Expand Up @@ -882,9 +882,9 @@ func convertClassicPipelineProject(r *sourcepipeline.GetProjectDetailResponse) *
}
for _, scheduleInfo := range r.Trigger.Schedule {
ri := &PipelineTriggerSchedule{
Day: scheduleInfo.Day,
Time: scheduleInfo.Time,
TimeZone: scheduleInfo.TimeZone,
Day: scheduleInfo.Day,
Time: scheduleInfo.Time,
TimeZone: scheduleInfo.TimeZone,
ExecuteOnlyWithChange: scheduleInfo.ScheduleOnlyWithChange,
}
trigger.Schedule = append(trigger.Schedule, ri)
Expand Down Expand Up @@ -968,9 +968,9 @@ func convertVpcPipelineProject(r *vsourcepipeline.GetProjectDetailResponse) *Pip
}
for _, scheduleInfo := range r.Trigger.Schedule {
ri := &PipelineTriggerSchedule{
Day: scheduleInfo.Day,
Time: scheduleInfo.Time,
TimeZone: scheduleInfo.TimeZone,
Day: scheduleInfo.Day,
Time: scheduleInfo.Time,
TimeZone: scheduleInfo.TimeZone,
ExecuteOnlyWithChange: scheduleInfo.ScheduleOnlyWithChange,
}
trigger.Schedule = append(trigger.Schedule, ri)
Expand Down

0 comments on commit 09bdc9c

Please sign in to comment.