Repository: sacloud/terraform-provider-sakuracloud
Pull request #981 (2022-11-11 06:01:25)

SDK/Frameworkで共通利用するfunc類をinternal配下に切り出し
今後のTerraform Plugin Framework対応の準備として、SDK/Framework両方で利用するfunc類を切り出す


Patch:
diff --git a/.golangci.yml b/.golangci.yml
index ed61da5d..3609a45d 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -8,7 +8,6 @@ issues:
 linters:
   disable-all: true
   enable:
-    - deadcode
     - errcheck
     - gofmt
     - goimports
@@ -19,11 +18,9 @@ linters:
     - nakedret
     - misspell
     - staticcheck
-    - structcheck
     - typecheck
     - unused
     - unconvert
-    - varcheck
     - vet
     - vetshadow
     - whitespace
diff --git a/.goreleaser.yml b/.goreleaser.yml
index a2bce18a..44ce232e 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -7,6 +7,9 @@ before:
 builds:
   - env:
       - CGO_ENABLED=0
+    ldflags:
+      - -s -w
+      - -X github.com/sacloud/terraform-provider-sakuracloud/version.Revision={{.ShortCommit}}
     goos:
       - freebsd
       - openbsd
diff --git a/internal/defaults/defaults.go b/internal/defaults/defaults.go
new file mode 100644
index 00000000..f89141f4
--- /dev/null
+++ b/internal/defaults/defaults.go
@@ -0,0 +1,22 @@
+// Copyright 2016-2022 The sacloud/terraform-provider-sakuracloud Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package defaults
+
+const (
+	Zone                = "is1b"
+	RetryMax            = 10
+	APIRequestTimeout   = 300
+	APIRequestRateLimit = 10
+)
diff --git a/sakuracloud/description.go b/internal/desc/description.go
similarity index 72%
rename from sakuracloud/description.go
rename to internal/desc/description.go
index 46a64ba4..b0e939ba 100644
--- a/sakuracloud/description.go
+++ b/internal/desc/description.go
@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sakuracloud
+package desc
 
 import (
 	"fmt"
 	"strings"
 )
 
-func quoteAndJoin(a []string, quote, sep string) string {
+func QuoteAndJoin(a []string, quote, sep string) string {
 	if quote == "" {
 		quote = `"`
 	}
@@ -30,7 +30,7 @@ func quoteAndJoin(a []string, quote, sep string) string {
 	return strings.Join(ret, sep)
 }
 
-func quoteAndJoinInt(a []int, quote, sep string) string {
+func QuoteAndJoinInt(a []int, quote, sep string) string {
 	if quote == "" {
 		quote = `"`
 	}
@@ -41,15 +41,15 @@ func quoteAndJoinInt(a []int, quote, sep string) string {
 	return strings.Join(ret, sep)
 }
 
-func descf(format string, a ...interface{}) string {
+func Sprintf(format string, a ...interface{}) string {
 	args := make([]interface{}, len(a))
 	for i, a := range a {
 		var v interface{}
 		switch a := a.(type) {
 		case []string:
-			v = quoteAndJoin(a, "`", "/")
+			v = QuoteAndJoin(a, "`", "/")
 		case []int:
-			v = quoteAndJoinInt(a, "`", "/")
+			v = QuoteAndJoinInt(a, "`", "/")
 		default:
 			v = a
 		}
@@ -58,27 +58,27 @@ func descf(format string, a ...interface{}) string {
 	return fmt.Sprintf(format, args...)
 }
 
-func descRange(min, max int) string {
+func Range(min, max int) string {
 	return fmt.Sprintf("This must be in the range [`%d`-`%d`]", min, max)
 }
 
-func descLength(min, max int) string {
+func Length(min, max int) string {
 	return fmt.Sprintf("The length of this value must be in the range [`%d`-`%d`]", min, max)
 }
 
-func descConflicts(names ...string) string {
-	return descf("This conflicts with [%s]", names)
+func Conflicts(names ...string) string {
+	return Sprintf("This conflicts with [%s]", names)
 }
 
-func descResourcePlan(resourceName string, plans interface{}) string {
-	return descf(
+func ResourcePlan(resourceName string, plans interface{}) string {
+	return Sprintf(
 		"The plan name of the %s. This must be one of [%s]",
 		resourceName, plans,
 	)
 }
 
-func descDataSourcePlan(resourceName string, plans interface{}) string {
-	return descf(
+func DataSourcePlan(resourceName string, plans interface{}) string {
+	return Sprintf(
 		"The plan name of the %s. This will be one of [%s]",
 		resourceName, plans,
 	)
diff --git a/sakuracloud/ftps_client.go b/internal/ftps/ftps.go
similarity index 92%
rename from sakuracloud/ftps_client.go
rename to internal/ftps/ftps.go
index c625c552..90415434 100644
--- a/sakuracloud/ftps_client.go
+++ b/internal/ftps/ftps.go
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sakuracloud
+package ftps
 
 import (
 	"context"
@@ -23,7 +23,7 @@ import (
 	"github.com/sacloud/ftps"
 )
 
-func uploadFileViaFTPS(ctx context.Context, user, pass, host, file string) error {
+func UploadFile(ctx context.Context, user, pass, host, file string) error {
 	f, err := os.Open(file)
 	if err != nil {
 		return fmt.Errorf("opening file[%s] failed: %s", file, err)
diff --git a/sakuracloud/config.go b/sakuracloud/config.go
index d4eb0922..ce5a77f5 100644
--- a/sakuracloud/config.go
+++ b/sakuracloud/config.go
@@ -31,6 +31,8 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/api"
 	"github.com/sacloud/iaas-api-go/helper/query"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/defaults"
+	"github.com/sacloud/terraform-provider-sakuracloud/version"
 	"github.com/sacloud/webaccel-api-go"
 )
 
@@ -109,10 +111,11 @@ func (c *Config) loadFromProfile() error {
 	if c.AccessTokenSecret == "" {
 		c.AccessTokenSecret = pcv.AccessTokenSecret
 	}
-	if (c.Zone == "" || c.Zone == defaultZone) && pcv.Zone != "" {
+	if (c.Zone == "" || c.Zone == defaults.Zone) && pcv.Zone != "" {
 		c.Zone = pcv.Zone
 	}
 
+	defaultZones := iaas.SakuraCloudZones
 	sort.Strings(c.Zones)
 	sort.Strings(defaultZones)
 	if (len(c.Zones) == 0 || reflect.DeepEqual(defaultZones, c.Zones)) && len(pcv.Zones) > 0 {
@@ -133,7 +136,7 @@ func (c *Config) loadFromProfile() error {
 	if c.APIRootURL == "" {
 		c.APIRootURL = pcv.APIRootURL
 	}
-	if (c.RetryMax == 0 || c.RetryMax == defaultRetryMax) && pcv.RetryMax > 0 {
+	if (c.RetryMax == 0 || c.RetryMax == defaults.RetryMax) && pcv.RetryMax > 0 {
 		c.RetryMax = pcv.RetryMax
 	}
 	if c.RetryWaitMax == 0 {
@@ -142,10 +145,10 @@ func (c *Config) loadFromProfile() error {
 	if c.RetryWaitMin == 0 {
 		c.RetryWaitMin = pcv.RetryWaitMin
 	}
-	if (c.APIRequestTimeout == 0 || c.APIRequestTimeout == defaultAPIRequestTimeout) && pcv.HTTPRequestTimeout > 0 {
+	if (c.APIRequestTimeout == 0 || c.APIRequestTimeout == defaults.APIRequestTimeout) && pcv.HTTPRequestTimeout > 0 {
 		c.APIRequestTimeout = pcv.HTTPRequestTimeout
 	}
-	if (c.APIRequestRateLimit == 0 || c.APIRequestRateLimit == defaultAPIRequestRateLimit) && pcv.HTTPRequestRateLimit > 0 {
+	if (c.APIRequestRateLimit == 0 || c.APIRequestRateLimit == defaults.APIRequestRateLimit) && pcv.HTTPRequestRateLimit > 0 {
 		c.APIRequestRateLimit = pcv.HTTPRequestRateLimit
 	}
 	return nil
@@ -172,7 +175,7 @@ func (c *Config) NewClient() (*APIClient, error) {
 	}
 
 	tfUserAgent := terraformUserAgent(c.terraformVersion)
-	providerUserAgent := fmt.Sprintf("%s/v%s", "terraform-provider-sakuracloud", Version)
+	providerUserAgent := fmt.Sprintf("%s/v%s", "terraform-provider-sakuracloud", version.Version)
 	ua := fmt.Sprintf("%s %s", tfUserAgent, providerUserAgent)
 	if add := os.Getenv(uaEnvVar); add != "" {
 		ua += " " + add
@@ -216,7 +219,7 @@ func (c *Config) NewClient() (*APIClient, error) {
 
 	zones := c.Zones
 	if len(zones) == 0 {
-		zones = defaultZones
+		zones = iaas.SakuraCloudZones
 	}
 
 	// fakeモード有効時は待ち時間を短くしておく
diff --git a/sakuracloud/data_source_sakuracloud_archive.go b/sakuracloud/data_source_sakuracloud_archive.go
index 4418cccf..5cb9e172 100644
--- a/sakuracloud/data_source_sakuracloud_archive.go
+++ b/sakuracloud/data_source_sakuracloud_archive.go
@@ -23,6 +23,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/query"
 	"github.com/sacloud/iaas-api-go/ostype"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudArchive() *schema.Resource {
@@ -38,7 +39,7 @@ func dataSourceSakuraCloudArchive() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(ostype.OSTypeShortNames, false)),
 				ConflictsWith:    []string{"filter"},
-				Description: descf(
+				Description: desc.Sprintf(
 					"The criteria used to filter SakuraCloud archives. This must be one of following:  \n%s",
 					ostype.OSTypeShortNames,
 				),
diff --git a/sakuracloud/data_source_sakuracloud_auto_scale.go b/sakuracloud/data_source_sakuracloud_auto_scale.go
index 692f4c2d..fe251677 100644
--- a/sakuracloud/data_source_sakuracloud_auto_scale.go
+++ b/sakuracloud/data_source_sakuracloud_auto_scale.go
@@ -20,6 +20,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudAutoScale() *schema.Resource {
@@ -37,7 +38,7 @@ func dataSourceSakuraCloudAutoScale() *schema.Resource {
 				Type:        schema.TypeList,
 				Computed:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("List of zone names where monitored resources are located"),
+				Description: desc.Sprintf("List of zone names where monitored resources are located"),
 			},
 			"config": {
 				Type:        schema.TypeString,
diff --git a/sakuracloud/data_source_sakuracloud_container_registry.go b/sakuracloud/data_source_sakuracloud_container_registry.go
index b9b0738e..acdbb45e 100644
--- a/sakuracloud/data_source_sakuracloud_container_registry.go
+++ b/sakuracloud/data_source_sakuracloud_container_registry.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudContainerRegistry() *schema.Resource {
@@ -34,7 +35,7 @@ func dataSourceSakuraCloudContainerRegistry() *schema.Resource {
 			"access_level": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The level of access that allow to users. This will be one of [%s]",
 					types.ContainerRegistryAccessLevelStrings,
 				),
@@ -67,7 +68,7 @@ func dataSourceSakuraCloudContainerRegistry() *schema.Resource {
 						"permission": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The level of access that allow to the user. This will be one of [%s]",
 								types.ContainerRegistryPermissionStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_database.go b/sakuracloud/data_source_sakuracloud_database.go
index 8eac0af6..57eb8cfe 100644
--- a/sakuracloud/data_source_sakuracloud_database.go
+++ b/sakuracloud/data_source_sakuracloud_database.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudDatabase() *schema.Resource {
@@ -35,7 +36,7 @@ func dataSourceSakuraCloudDatabase() *schema.Resource {
 			"database_type": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The type of the database. This will be one of [%s]",
 					types.RDBMSTypeStrings,
 				),
@@ -92,7 +93,7 @@ func dataSourceSakuraCloudDatabase() *schema.Resource {
 							Computed: true,
 							Elem:     &schema.Schema{Type: schema.TypeString},
 							Set:      schema.HashString,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The list of name of weekday that doing backup. This will be in [%s]",
 								types.DaysOfTheWeekStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_disk.go b/sakuracloud/data_source_sakuracloud_disk.go
index 07bc4401..52438c74 100644
--- a/sakuracloud/data_source_sakuracloud_disk.go
+++ b/sakuracloud/data_source_sakuracloud_disk.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudDisk() *schema.Resource {
@@ -36,7 +37,7 @@ func dataSourceSakuraCloudDisk() *schema.Resource {
 			"connector": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The name of the disk connector. This will be one of [%s]",
 					types.DiskConnectionStrings,
 				),
diff --git a/sakuracloud/data_source_sakuracloud_dns.go b/sakuracloud/data_source_sakuracloud_dns.go
index e5c0ea1b..9a75f7e0 100644
--- a/sakuracloud/data_source_sakuracloud_dns.go
+++ b/sakuracloud/data_source_sakuracloud_dns.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudDNS() *schema.Resource {
@@ -53,7 +54,7 @@ func dataSourceSakuraCloudDNS() *schema.Resource {
 						"type": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The type of DNS Record. This will be one of [%s]",
 								types.DNSRecordTypeStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_gslb.go b/sakuracloud/data_source_sakuracloud_gslb.go
index 47f5af58..582d0b4e 100644
--- a/sakuracloud/data_source_sakuracloud_gslb.go
+++ b/sakuracloud/data_source_sakuracloud_gslb.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudGSLB() *schema.Resource {
@@ -44,7 +45,7 @@ func dataSourceSakuraCloudGSLB() *schema.Resource {
 						"protocol": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This will be one of [%s]",
 								types.GSLBHealthCheckProtocolStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_internet.go b/sakuracloud/data_source_sakuracloud_internet.go
index 3e77d438..771dd964 100644
--- a/sakuracloud/data_source_sakuracloud_internet.go
+++ b/sakuracloud/data_source_sakuracloud_internet.go
@@ -20,6 +20,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudInternet() *schema.Resource {
@@ -44,29 +45,29 @@ func dataSourceSakuraCloudInternet() *schema.Resource {
 				Type:        schema.TypeList,
 				Computed:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("A list of the ID of Servers connected to the %s", resourceName),
+				Description: desc.Sprintf("A list of the ID of Servers connected to the %s", resourceName),
 			},
 			"network_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IPv4 network address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The IPv4 network address assigned to the %s", resourceName),
 			},
 			"gateway": schemaDataSourceGateway(resourceName),
 			"min_ip_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("Minimum IP address in assigned global addresses to the %s", resourceName),
+				Description: desc.Sprintf("Minimum IP address in assigned global addresses to the %s", resourceName),
 			},
 			"max_ip_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("Maximum IP address in assigned global addresses to the %s", resourceName),
+				Description: desc.Sprintf("Maximum IP address in assigned global addresses to the %s", resourceName),
 			},
 			"ip_addresses": {
 				Type:        schema.TypeList,
 				Computed:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("A list of assigned global address to the %s", resourceName),
+				Description: desc.Sprintf("A list of assigned global address to the %s", resourceName),
 			},
 			"enable_ipv6": {
 				Type:        schema.TypeBool,
@@ -76,7 +77,7 @@ func dataSourceSakuraCloudInternet() *schema.Resource {
 			"ipv6_prefix": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The network prefix of assigned IPv6 addresses to the %s", resourceName),
+				Description: desc.Sprintf("The network prefix of assigned IPv6 addresses to the %s", resourceName),
 			},
 			"ipv6_prefix_len": {
 				Type:        schema.TypeInt,
@@ -86,7 +87,7 @@ func dataSourceSakuraCloudInternet() *schema.Resource {
 			"ipv6_network_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IPv6 network address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The IPv6 network address assigned to the %s", resourceName),
 			},
 			"zone": schemaDataSourceZone(resourceName),
 		},
diff --git a/sakuracloud/data_source_sakuracloud_load_balancer.go b/sakuracloud/data_source_sakuracloud_load_balancer.go
index 7ceeaf31..0215b6d0 100644
--- a/sakuracloud/data_source_sakuracloud_load_balancer.go
+++ b/sakuracloud/data_source_sakuracloud_load_balancer.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudLoadBalancer() *schema.Resource {
@@ -88,7 +89,7 @@ func dataSourceSakuraCloudLoadBalancer() *schema.Resource {
 									"protocol": {
 										Type:     schema.TypeString,
 										Computed: true,
-										Description: descf(
+										Description: desc.Sprintf(
 											"The protocol used for health checks. This will be one of [%s]",
 											types.LoadBalancerHealthCheckProtocolStrings,
 										),
diff --git a/sakuracloud/data_source_sakuracloud_packet_filter.go b/sakuracloud/data_source_sakuracloud_packet_filter.go
index 4222b7a6..9d7346f3 100644
--- a/sakuracloud/data_source_sakuracloud_packet_filter.go
+++ b/sakuracloud/data_source_sakuracloud_packet_filter.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudPacketFilter() *schema.Resource {
@@ -40,7 +41,7 @@ func dataSourceSakuraCloudPacketFilter() *schema.Resource {
 						"protocol": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for filtering. This will be one of [%s]",
 								types.PacketFilterProtocolStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_proxylb.go b/sakuracloud/data_source_sakuracloud_proxylb.go
index b14d3582..fcb7b430 100644
--- a/sakuracloud/data_source_sakuracloud_proxylb.go
+++ b/sakuracloud/data_source_sakuracloud_proxylb.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudProxyLB() *schema.Resource {
@@ -60,7 +61,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 			"region": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The name of region that the proxy LB is in. This will be one of [%s]",
 					types.ProxyLBRegionStrings,
 				),
@@ -91,7 +92,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"proxy_mode": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The proxy mode. This will be one of [%s]",
 								types.ProxyLBProxyModeStrings,
 							),
@@ -124,12 +125,12 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 									"header": {
 										Type:        schema.TypeString,
 										Computed:    true,
-										Description: descf("The field name of HTTP header added to response by the %s", resourceName),
+										Description: desc.Sprintf("The field name of HTTP header added to response by the %s", resourceName),
 									},
 									"value": {
 										Type:        schema.TypeString,
 										Computed:    true,
-										Description: descf("The field value of HTTP header added to response by the %s", resourceName),
+										Description: desc.Sprintf("The field value of HTTP header added to response by the %s", resourceName),
 									},
 								},
 							},
@@ -145,7 +146,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"protocol": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This will be one of [%s]",
 								types.ProxyLBProtocolStrings,
 							),
@@ -298,7 +299,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"action": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The type of action to be performed when requests matches the rule. This will be one of [%s]",
 								types.ProxyLBRuleActionStrings(),
 							),
@@ -311,7 +312,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"redirect_status_code": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"HTTP status code for redirects sent when requests matches the rule. This will be one of [%s]",
 								types.ProxyLBRedirectStatusCodeStrings(),
 							),
@@ -319,7 +320,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"fixed_status_code": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"HTTP status code for fixed response sent when requests matches the rule. This will be one of [%s]",
 								types.ProxyLBFixedStatusCodeStrings(),
 							),
@@ -327,7 +328,7 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 						"fixed_content_type": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"Content-Type header value for fixed response sent when requests matches the rule. This will be one of [%s]",
 								types.ProxyLBFixedContentTypeStrings(),
 							),
@@ -346,18 +347,18 @@ func dataSourceSakuraCloudProxyLB() *schema.Resource {
 			"fqdn": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The FQDN for accessing to the %s. This is typically used as value of CNAME record", resourceName),
+				Description: desc.Sprintf("The FQDN for accessing to the %s. This is typically used as value of CNAME record", resourceName),
 			},
 			"vip": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The virtual IP address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The virtual IP address assigned to the %s", resourceName),
 			},
 			"proxy_networks": {
 				Type:        schema.TypeList,
 				Elem:        &schema.Schema{Type: schema.TypeString},
 				Computed:    true,
-				Description: descf("A list of CIDR block used by the %s to access the server", resourceName),
+				Description: desc.Sprintf("A list of CIDR block used by the %s to access the server", resourceName),
 			},
 		},
 	}
diff --git a/sakuracloud/data_source_sakuracloud_server.go b/sakuracloud/data_source_sakuracloud_server.go
index fa85bb25..41abb543 100644
--- a/sakuracloud/data_source_sakuracloud_server.go
+++ b/sakuracloud/data_source_sakuracloud_server.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudServer() *schema.Resource {
@@ -50,7 +51,7 @@ func dataSourceSakuraCloudServer() *schema.Resource {
 			"commitment": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The policy of how to allocate virtual CPUs to the server. This will be one of [%s]",
 					types.CommitmentStrings,
 				),
@@ -64,7 +65,7 @@ func dataSourceSakuraCloudServer() *schema.Resource {
 			"interface_driver": {
 				Type:     schema.TypeString,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The driver name of network interface. This will be one of [%s]",
 					types.InterfaceDriverStrings,
 				),
@@ -77,7 +78,7 @@ func dataSourceSakuraCloudServer() *schema.Resource {
 						"upstream": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The upstream type or upstream switch id. This will be one of [%s]",
 								[]string{"shared", "disconnect", "<switch id>"},
 							),
diff --git a/sakuracloud/data_source_sakuracloud_simple_monitor.go b/sakuracloud/data_source_sakuracloud_simple_monitor.go
index 132db190..130dc60c 100644
--- a/sakuracloud/data_source_sakuracloud_simple_monitor.go
+++ b/sakuracloud/data_source_sakuracloud_simple_monitor.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudSimpleMonitor() *schema.Resource {
@@ -43,14 +44,14 @@ func dataSourceSakuraCloudSimpleMonitor() *schema.Resource {
 			"max_check_attempts": {
 				Type:     schema.TypeInt,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The number of retry",
 				),
 			},
 			"retry_interval": {
 				Type:     schema.TypeInt,
 				Computed: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The interval in seconds between retries",
 				),
 			},
@@ -67,7 +68,7 @@ func dataSourceSakuraCloudSimpleMonitor() *schema.Resource {
 						"protocol": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This will be one of [%s]",
 								types.SimpleMonitorProtocolStrings,
 							),
@@ -150,7 +151,7 @@ func dataSourceSakuraCloudSimpleMonitor() *schema.Resource {
 						"ftps": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The methods of invoking security for monitoring with FTPS. This will be one of [%s]",
 								types.SimpleMonitorFTPSStrings,
 							),
diff --git a/sakuracloud/data_source_sakuracloud_vpc_router.go b/sakuracloud/data_source_sakuracloud_vpc_router.go
index b0e0725f..a8c81482 100644
--- a/sakuracloud/data_source_sakuracloud_vpc_router.go
+++ b/sakuracloud/data_source_sakuracloud_vpc_router.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func dataSourceSakuraCloudVPCRouter() *schema.Resource {
@@ -206,7 +207,7 @@ func dataSourceSakuraCloudVPCRouter() *schema.Resource {
 						"direction": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The direction to apply the firewall. This will be one of [%s]",
 								[]string{"send", "receive"},
 							),
@@ -219,7 +220,7 @@ func dataSourceSakuraCloudVPCRouter() *schema.Resource {
 									"protocol": {
 										Type:     schema.TypeString,
 										Computed: true,
-										Description: descf(
+										Description: desc.Sprintf(
 											"The protocol used for filtering. This will be one of [%s]",
 											types.VPCRouterFirewallProtocolStrings,
 										),
@@ -294,7 +295,7 @@ func dataSourceSakuraCloudVPCRouter() *schema.Resource {
 						"protocol": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for port forwarding. This will be one of [%s]",
 								[]string{"tcp", "udp"},
 							),
@@ -517,7 +518,7 @@ func dataSourceSakuraCloudVPCRouter() *schema.Resource {
 						"day_of_week": {
 							Type:     schema.TypeString,
 							Computed: true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The value must be in [%s]",
 								types.DaysOfTheWeekStrings,
 							),
diff --git a/sakuracloud/filter.go b/sakuracloud/filter.go
index e2106130..300129e3 100644
--- a/sakuracloud/filter.go
+++ b/sakuracloud/filter.go
@@ -22,6 +22,7 @@ import (
 	"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"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 const filterAttrName = "filter"
@@ -101,7 +102,7 @@ func filterSchema(opt *filterSchemaOption) *schema.Schema {
 						Optional:         true,
 						ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(filteringOperators, false)),
 						Default:          filteringOperatorPartialMatchAnd,
-						Description: descf(
+						Description: desc.Sprintf(
 							"The filtering operator. This must be one of following:  \n%s",
 							filteringOperators,
 						),
diff --git a/sakuracloud/provider.go b/sakuracloud/provider.go
index 470e8894..05d90072 100644
--- a/sakuracloud/provider.go
+++ b/sakuracloud/provider.go
@@ -21,17 +21,10 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/api-client-go/profile"
-	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/packages-go/envvar"
 	"github.com/sacloud/packages-go/mutexkv"
-)
-
-var (
-	defaultZone                = "is1b"
-	defaultRetryMax            = 10
-	defaultZones               = iaas.SakuraCloudZones
-	defaultAPIRequestTimeout   = 300
-	defaultAPIRequestRateLimit = 10
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/defaults"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 // Provider returns a terraform.ResourceProvider.
@@ -59,7 +52,7 @@ func Provider() *schema.Provider {
 			"zone": {
 				Type:        schema.TypeString,
 				Optional:    true,
-				DefaultFunc: schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_ZONE"}, defaultZone),
+				DefaultFunc: schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_ZONE"}, defaults.Zone),
 				Description: "The name of zone to use as default. It must be provided, but it can also be sourced from the `SAKURACLOUD_ZONE` environment variables, or via a shared credentials file if `profile` is specified",
 			},
 			"zones": {
@@ -89,7 +82,7 @@ func Provider() *schema.Provider {
 			"retry_max": {
 				Type:             schema.TypeInt,
 				Optional:         true,
-				DefaultFunc:      schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_RETRY_MAX"}, defaultRetryMax),
+				DefaultFunc:      schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_RETRY_MAX"}, defaults.RetryMax),
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 100)),
 				Description:      "The maximum number of API call retries used when SakuraCloud API returns status code `423` or `503`. It can also be sourced from the `SAKURACLOUD_RETRY_MAX` environment variables, or via a shared credentials file if `profile` is specified. Default:`100`",
 			},
@@ -108,20 +101,20 @@ func Provider() *schema.Provider {
 			"api_request_timeout": {
 				Type:        schema.TypeInt,
 				Optional:    true,
-				DefaultFunc: schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_API_REQUEST_TIMEOUT"}, defaultAPIRequestTimeout),
-				Description: descf(
+				DefaultFunc: schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_API_REQUEST_TIMEOUT"}, defaults.APIRequestTimeout),
+				Description: desc.Sprintf(
 					"The timeout seconds for each SakuraCloud API call. It can also be sourced from the `SAKURACLOUD_API_REQUEST_TIMEOUT` environment variables, or via a shared credentials file if `profile` is specified. Default:`%d`",
-					defaultAPIRequestTimeout,
+					defaults.APIRequestTimeout,
 				),
 			},
 			"api_request_rate_limit": {
 				Type:             schema.TypeInt,
 				Optional:         true,
-				DefaultFunc:      schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_RATE_LIMIT"}, defaultAPIRequestRateLimit),
+				DefaultFunc:      schema.MultiEnvDefaultFunc([]string{"SAKURACLOUD_RATE_LIMIT"}, defaults.APIRequestRateLimit),
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 10)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The maximum number of SakuraCloud API calls per second. It can also be sourced from the `SAKURACLOUD_RATE_LIMIT` environment variables, or via a shared credentials file if `profile` is specified. Default:`%d`",
-					defaultAPIRequestRateLimit,
+					defaults.APIRequestRateLimit,
 				),
 			},
 			"trace": {
diff --git a/sakuracloud/resource_sakuracloud_archive.go b/sakuracloud/resource_sakuracloud_archive.go
index 7698f5dc..2c28d681 100644
--- a/sakuracloud/resource_sakuracloud_archive.go
+++ b/sakuracloud/resource_sakuracloud_archive.go
@@ -24,6 +24,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudArchive() *schema.Resource {
@@ -55,7 +56,7 @@ func resourceSakuraCloudArchive() *schema.Resource {
 				ForceNew:         true,
 				Computed:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice(types.ArchiveSizes)),
-				Description:      descf("The size of %s in GiB. This must be one of [%s]", resourceName, types.ArchiveSizes),
+				Description:      desc.Sprintf("The size of %s in GiB. This must be one of [%s]", resourceName, types.ArchiveSizes),
 				ConflictsWith:    []string{"source_disk_id", "source_archive_id", "source_shared_key", "source_archive_zone"},
 			},
 			"archive_file": {
@@ -77,9 +78,9 @@ func resourceSakuraCloudArchive() *schema.Resource {
 				Optional:         true,
 				ConflictsWith:    []string{"source_disk_id", "size", "source_shared_key"},
 				ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The id of the source archive. %s",
-					descConflicts("source_disk_id"),
+					desc.Conflicts("source_disk_id"),
 				),
 			},
 			"source_archive_zone": {
@@ -95,9 +96,9 @@ func resourceSakuraCloudArchive() *schema.Resource {
 				Optional:         true,
 				ConflictsWith:    []string{"source_archive_id", "size", "source_shared_key", "source_archive_zone"},
 				ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The id of the source disk. %s",
-					descConflicts("source_archive_id"),
+					desc.Conflicts("source_archive_id"),
 				),
 			},
 			"source_shared_key": {
diff --git a/sakuracloud/resource_sakuracloud_auto_backup.go b/sakuracloud/resource_sakuracloud_auto_backup.go
index 23f83993..8054da9c 100644
--- a/sakuracloud/resource_sakuracloud_auto_backup.go
+++ b/sakuracloud/resource_sakuracloud_auto_backup.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudAutoBackup() *schema.Resource {
@@ -56,7 +57,7 @@ func resourceSakuraCloudAutoBackup() *schema.Resource {
 				Required: true,
 				Elem:     &schema.Schema{Type: schema.TypeString},
 				Set:      schema.HashString,
-				Description: descf(
+				Description: desc.Sprintf(
 					"A list of weekdays to backed up. The values in the list must be in [%s]",
 					types.DaysOfTheWeekStrings,
 				),
@@ -66,7 +67,7 @@ func resourceSakuraCloudAutoBackup() *schema.Resource {
 				Optional:         true,
 				Default:          1,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 10)),
-				Description:      descf("The number backup files to keep. %s", descRange(1, 10)),
+				Description:      desc.Sprintf("The number backup files to keep. %s", desc.Range(1, 10)),
 			},
 			"icon_id":     schemaResourceIconID(resourceName),
 			"description": schemaResourceDescription(resourceName),
diff --git a/sakuracloud/resource_sakuracloud_auto_scale.go b/sakuracloud/resource_sakuracloud_auto_scale.go
index 99254f5f..6720558c 100644
--- a/sakuracloud/resource_sakuracloud_auto_scale.go
+++ b/sakuracloud/resource_sakuracloud_auto_scale.go
@@ -22,6 +22,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudAutoScale() *schema.Resource {
@@ -47,7 +48,7 @@ func resourceSakuraCloudAutoScale() *schema.Resource {
 				Type:        schema.TypeList,
 				Required:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("List of zone names where monitored resources are located"),
+				Description: desc.Sprintf("List of zone names where monitored resources are located"),
 			},
 			"config": {
 				Type:             schema.TypeString,
diff --git a/sakuracloud/resource_sakuracloud_cdrom.go b/sakuracloud/resource_sakuracloud_cdrom.go
index 7548a071..f7767bc6 100644
--- a/sakuracloud/resource_sakuracloud_cdrom.go
+++ b/sakuracloud/resource_sakuracloud_cdrom.go
@@ -28,6 +28,8 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/types"
 	"github.com/sacloud/iso9660wrap"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/ftps"
 )
 
 func resourceSakuraCloudCDROM() *schema.Resource {
@@ -57,18 +59,18 @@ func resourceSakuraCloudCDROM() *schema.Resource {
 				Type:          schema.TypeString,
 				Optional:      true,
 				ConflictsWith: []string{"content"},
-				Description: descf(
+				Description: desc.Sprintf(
 					"The file path to upload to as the CD-ROM. %s",
-					descConflicts("content"),
+					desc.Conflicts("content"),
 				),
 			},
 			"content": {
 				Type:          schema.TypeString,
 				Optional:      true,
 				ConflictsWith: []string{"iso_image_file"},
-				Description: descf(
+				Description: desc.Sprintf(
 					"The content to upload to as the CD-ROM. %s",
-					descConflicts("iso_image_file"),
+					desc.Conflicts("iso_image_file"),
 				),
 			},
 			"content_file_name": {
@@ -76,9 +78,9 @@ func resourceSakuraCloudCDROM() *schema.Resource {
 				Optional:      true,
 				Default:       cdromDefaultISOLabel,
 				ConflictsWith: []string{"iso_image_file"},
-				Description: descf(
+				Description: desc.Sprintf(
 					"The name of content file to upload to as the CD-ROM. This is only used when `content` is specified. %s",
-					descConflicts("iso_image_file"),
+					desc.Conflicts("iso_image_file"),
 				),
 			},
 			"hash": {
@@ -250,7 +252,7 @@ func uploadCDROMFile(ctx *uploadCDROMContext, d *schema.ResourceData) error {
 	}
 
 	// upload
-	if err := uploadFileViaFTPS(ctx, ftpServer.User, ftpServer.Password, ftpServer.HostName, filePath); err != nil {
+	if err := ftps.UploadFile(ctx, ftpServer.User, ftpServer.Password, ftpServer.HostName, filePath); err != nil {
 		return fmt.Errorf("upload CD-ROM contents is failed: %s", err)
 	}
 
diff --git a/sakuracloud/resource_sakuracloud_container_registry.go b/sakuracloud/resource_sakuracloud_container_registry.go
index c496bd62..263eb4b2 100644
--- a/sakuracloud/resource_sakuracloud_container_registry.go
+++ b/sakuracloud/resource_sakuracloud_container_registry.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudContainerRegistry() *schema.Resource {
@@ -45,7 +46,7 @@ func resourceSakuraCloudContainerRegistry() *schema.Resource {
 				Type:             schema.TypeString,
 				Required:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ContainerRegistryAccessLevelStrings, false)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The level of access that allow to users. This must be one of [%s]",
 					types.ContainerRegistryAccessLevelStrings,
 				),
@@ -60,9 +61,9 @@ func resourceSakuraCloudContainerRegistry() *schema.Resource {
 				Required:         true,
 				ForceNew:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 64)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The label at the lowest of the FQDN used when be accessed from users. %s",
-					descLength(1, 64),
+					desc.Length(1, 64),
 				),
 			},
 			"fqdn": {
@@ -93,7 +94,7 @@ func resourceSakuraCloudContainerRegistry() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ContainerRegistryPermissionStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The level of access that allow to the user. This must be one of [%s]",
 								types.ContainerRegistryPermissionStrings,
 							),
diff --git a/sakuracloud/resource_sakuracloud_database.go b/sakuracloud/resource_sakuracloud_database.go
index 42fe2745..c140cdec 100644
--- a/sakuracloud/resource_sakuracloud_database.go
+++ b/sakuracloud/resource_sakuracloud_database.go
@@ -25,6 +25,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/power"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudDatabase() *schema.Resource {
@@ -52,7 +53,7 @@ func resourceSakuraCloudDatabase() *schema.Resource {
 				ForceNew:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.RDBMSTypeStrings, false)),
 				Default:          "postgres",
-				Description: descf(
+				Description: desc.Sprintf(
 					"The type of the database. This must be one of [%s]",
 					types.RDBMSTypeStrings,
 				),
@@ -70,7 +71,7 @@ func resourceSakuraCloudDatabase() *schema.Resource {
 				ForceNew:         true,
 				Required:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(3, 20)),
-				Description:      descf("The name of default user on the database. %s", descLength(3, 20)),
+				Description:      desc.Sprintf("The name of default user on the database. %s", desc.Length(3, 20)),
 			},
 			"password": {
 				Type:        schema.TypeString,
@@ -102,40 +103,40 @@ func resourceSakuraCloudDatabase() *schema.Resource {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Required:    true,
-							Description: descf("The IP address to assign to the %s", resourceName),
+							Description: desc.Sprintf("The IP address to assign to the %s", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
 							ForceNew:         true,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet to assign to the %s. %s",
 								resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 						"gateway": {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Required:    true,
-							Description: descf("The IP address of the gateway used by %s", resourceName),
+							Description: desc.Sprintf("The IP address of the gateway used by %s", resourceName),
 						},
 						"port": {
 							Type:             schema.TypeInt,
 							Optional:         true,
 							Default:          5432,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1024, 65535)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The number of the listening port. %s",
-								descRange(1024, 65535),
+								desc.Range(1024, 65535),
 							),
 						},
 						"source_ranges": {
 							Type:     schema.TypeList,
 							Optional: true,
 							Elem:     &schema.Schema{Type: schema.TypeString},
-							Description: descf(
+							Description: desc.Sprintf(
 								"The range of source IP addresses that allow to access to the %s via network",
 								resourceName,
 							),
@@ -155,7 +156,7 @@ func resourceSakuraCloudDatabase() *schema.Resource {
 							Optional: true,
 							Elem:     &schema.Schema{Type: schema.TypeString},
 							Set:      schema.HashString,
-							Description: descf(
+							Description: desc.Sprintf(
 								"A list of weekdays to backed up. The values in the list must be in [%s]",
 								types.DaysOfTheWeekStrings,
 							),
diff --git a/sakuracloud/resource_sakuracloud_database_read_replica.go b/sakuracloud/resource_sakuracloud_database_read_replica.go
index 61642c0c..9660af28 100644
--- a/sakuracloud/resource_sakuracloud_database_read_replica.go
+++ b/sakuracloud/resource_sakuracloud_database_read_replica.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/power"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudDatabaseReadReplica() *schema.Resource {
@@ -64,13 +65,13 @@ func resourceSakuraCloudDatabaseReadReplica() *schema.Resource {
 							Optional:         true,
 							Computed:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-							Description:      descf("The id of the switch to which the %s connects. If `switch_id` isn't specified, it will be set to the same value of the master database", resourceName),
+							Description:      desc.Sprintf("The id of the switch to which the %s connects. If `switch_id` isn't specified, it will be set to the same value of the master database", resourceName),
 						},
 						"ip_address": {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Required:    true,
-							Description: descf("The IP address to assign to the %s", resourceName),
+							Description: desc.Sprintf("The IP address to assign to the %s", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
@@ -78,10 +79,10 @@ func resourceSakuraCloudDatabaseReadReplica() *schema.Resource {
 							Optional:         true,
 							Computed:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet to assign to the %s. %s. If `netmask` isn't specified, it will be set to the same value of the master database",
 								resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 						"gateway": {
@@ -89,13 +90,13 @@ func resourceSakuraCloudDatabaseReadReplica() *schema.Resource {
 							ForceNew:    true,
 							Optional:    true,
 							Computed:    true,
-							Description: descf("The IP address of the gateway used by %s. If `gateway` isn't specified, it will be set to the same value of the master database", resourceName),
+							Description: desc.Sprintf("The IP address of the gateway used by %s. If `gateway` isn't specified, it will be set to the same value of the master database", resourceName),
 						},
 						"source_ranges": {
 							Type:     schema.TypeList,
 							Optional: true,
 							Elem:     &schema.Schema{Type: schema.TypeString},
-							Description: descf(
+							Description: desc.Sprintf(
 								"The range of source IP addresses that allow to access to the %s via network",
 								resourceName,
 							),
diff --git a/sakuracloud/resource_sakuracloud_disk.go b/sakuracloud/resource_sakuracloud_disk.go
index 0b6d69df..4879a787 100644
--- a/sakuracloud/resource_sakuracloud_disk.go
+++ b/sakuracloud/resource_sakuracloud_disk.go
@@ -26,6 +26,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/types"
 	"github.com/sacloud/iaas-service-go/setup"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudDisk() *schema.Resource {
@@ -54,7 +55,7 @@ func resourceSakuraCloudDisk() *schema.Resource {
 				ForceNew:         true,
 				Default:          types.DiskConnections.VirtIO,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.DiskConnectionStrings, false)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The name of the disk connector. This must be one of [%s]",
 					types.DiskConnectionStrings,
 				),
@@ -65,9 +66,9 @@ func resourceSakuraCloudDisk() *schema.Resource {
 				Optional:         true,
 				ConflictsWith:    []string{"source_disk_id"},
 				ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The id of the source archive. %s",
-					descConflicts("source_disk_id"),
+					desc.Conflicts("source_disk_id"),
 				),
 			},
 			"source_disk_id": {
@@ -76,9 +77,9 @@ func resourceSakuraCloudDisk() *schema.Resource {
 				Optional:         true,
 				ConflictsWith:    []string{"source_archive_id"},
 				ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The id of the source disk. %s",
-					descConflicts("source_archive_id"),
+					desc.Conflicts("source_archive_id"),
 				),
 			},
 			"size": schemaResourceSize(resourceName, 20),
diff --git a/sakuracloud/resource_sakuracloud_dns.go b/sakuracloud/resource_sakuracloud_dns.go
index e6375ffc..fcd42c44 100644
--- a/sakuracloud/resource_sakuracloud_dns.go
+++ b/sakuracloud/resource_sakuracloud_dns.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudDNS() *schema.Resource {
@@ -67,7 +68,7 @@ func resourceSakuraCloudDNS() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.DNSRecordTypeStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The type of DNS Record. This must be one of [%s]",
 								types.DNSRecordTypeStrings,
 							),
@@ -87,19 +88,19 @@ func resourceSakuraCloudDNS() *schema.Resource {
 							Type:             schema.TypeInt,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 65535)),
-							Description:      descf("The priority of target DNS Record. %s", descRange(0, 65535)),
+							Description:      desc.Sprintf("The priority of target DNS Record. %s", desc.Range(0, 65535)),
 						},
 						"weight": {
 							Type:             schema.TypeInt,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 65535)),
-							Description:      descf("The weight of target DNS Record. %s", descRange(0, 65535)),
+							Description:      desc.Sprintf("The weight of target DNS Record. %s", desc.Range(0, 65535)),
 						},
 						"port": {
 							Type:             schema.TypeInt,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 65535)),
-							Description:      descf("The number of port. %s", descRange(1, 65535)),
+							Description:      desc.Sprintf("The number of port. %s", desc.Range(1, 65535)),
 						},
 					},
 				},
diff --git a/sakuracloud/resource_sakuracloud_dns_record.go b/sakuracloud/resource_sakuracloud_dns_record.go
index d989fd5a..d3224de0 100644
--- a/sakuracloud/resource_sakuracloud_dns_record.go
+++ b/sakuracloud/resource_sakuracloud_dns_record.go
@@ -26,6 +26,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 const defaultTTL = 3600
@@ -60,7 +61,7 @@ func resourceSakuraCloudDNSRecord() *schema.Resource {
 				Required:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.DNSRecordTypeStrings, false)),
 				ForceNew:         true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The type of DNS Record. This must be one of [%s]",
 					types.DNSRecordTypeStrings,
 				),
@@ -83,21 +84,21 @@ func resourceSakuraCloudDNSRecord() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 65535)),
 				ForceNew:         true,
-				Description:      descf("The priority of target DNS Record. %s", descRange(0, 65535)),
+				Description:      desc.Sprintf("The priority of target DNS Record. %s", desc.Range(0, 65535)),
 			},
 			"weight": {
 				Type:             schema.TypeInt,
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 65535)),
 				ForceNew:         true,
-				Description:      descf("The weight of target DNS Record. %s", descRange(0, 65535)),
+				Description:      desc.Sprintf("The weight of target DNS Record. %s", desc.Range(0, 65535)),
 			},
 			"port": {
 				Type:             schema.TypeInt,
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 65535)),
 				ForceNew:         true,
-				Description:      descf("The number of port. %s", descRange(1, 65535)),
+				Description:      desc.Sprintf("The number of port. %s", desc.Range(1, 65535)),
 			},
 		},
 	}
diff --git a/sakuracloud/resource_sakuracloud_gslb.go b/sakuracloud/resource_sakuracloud_gslb.go
index 08db3632..c9604445 100644
--- a/sakuracloud/resource_sakuracloud_gslb.go
+++ b/sakuracloud/resource_sakuracloud_gslb.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudGSLB() *schema.Resource {
@@ -61,7 +62,7 @@ func resourceSakuraCloudGSLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.GSLBHealthCheckProtocolStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This must be one of [%s]",
 								types.GSLBHealthCheckProtocolStrings,
 							),
@@ -71,7 +72,7 @@ func resourceSakuraCloudGSLB() *schema.Resource {
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 60)),
 							Default:          10,
-							Description:      descf("The interval in seconds between checks. %s", descRange(10, 60)),
+							Description:      desc.Sprintf("The interval in seconds between checks. %s", desc.Range(10, 60)),
 						},
 						"host_header": {
 							Type:        schema.TypeString,
@@ -129,9 +130,9 @@ func resourceSakuraCloudGSLB() *schema.Resource {
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 10000)),
 							Default:          1,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The weight used when weighted load balancing is enabled. %s",
-								descRange(1, 10000),
+								desc.Range(1, 10000),
 							),
 						},
 					},
diff --git a/sakuracloud/resource_sakuracloud_icon.go b/sakuracloud/resource_sakuracloud_icon.go
index 98f3d007..6597aa7d 100644
--- a/sakuracloud/resource_sakuracloud_icon.go
+++ b/sakuracloud/resource_sakuracloud_icon.go
@@ -21,6 +21,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudIcon() *schema.Resource {
@@ -44,9 +45,9 @@ func resourceSakuraCloudIcon() *schema.Resource {
 				Optional:      true,
 				ConflictsWith: []string{"base64content"},
 				ForceNew:      true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The file path to upload to as the Icon. %s",
-					descConflicts("base64content"),
+					desc.Conflicts("base64content"),
 				),
 			},
 			"base64content": {
@@ -54,9 +55,9 @@ func resourceSakuraCloudIcon() *schema.Resource {
 				Optional:      true,
 				ConflictsWith: []string{"source"},
 				ForceNew:      true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The base64 encoded content to upload to as the Icon. %s",
-					descConflicts("source"),
+					desc.Conflicts("source"),
 				),
 			},
 			"tags": schemaResourceTags(resourceName),
diff --git a/sakuracloud/resource_sakuracloud_internet.go b/sakuracloud/resource_sakuracloud_internet.go
index dbf944e1..44a785c5 100644
--- a/sakuracloud/resource_sakuracloud_internet.go
+++ b/sakuracloud/resource_sakuracloud_internet.go
@@ -26,6 +26,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/helper/query"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudInternet() *schema.Resource {
@@ -57,7 +58,7 @@ func resourceSakuraCloudInternet() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice(types.InternetNetworkMaskLengths)),
 				Default:          28,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The bit length of the subnet assigned to the %s. %s", resourceName,
 					types.InternetNetworkMaskLengths,
 				),
@@ -67,7 +68,7 @@ func resourceSakuraCloudInternet() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice(types.InternetBandWidths)),
 				Default:          100,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The bandwidth of the network connected to the Internet in Mbps. %s",
 					types.InternetBandWidths,
 				),
@@ -80,44 +81,44 @@ func resourceSakuraCloudInternet() *schema.Resource {
 			"switch_id": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The id of the switch"),
+				Description: desc.Sprintf("The id of the switch"),
 			},
 			"server_ids": {
 				Type:        schema.TypeList,
 				Computed:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("A list of the ID of Servers connected to the %s", resourceName),
+				Description: desc.Sprintf("A list of the ID of Servers connected to the %s", resourceName),
 			},
 			"network_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IPv4 network address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The IPv4 network address assigned to the %s", resourceName),
 			},
 			"gateway": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IP address of the gateway used by the %s", resourceName),
+				Description: desc.Sprintf("The IP address of the gateway used by the %s", resourceName),
 			},
 			"min_ip_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("Minimum IP address in assigned global addresses to the %s", resourceName),
+				Description: desc.Sprintf("Minimum IP address in assigned global addresses to the %s", resourceName),
 			},
 			"max_ip_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("Maximum IP address in assigned global addresses to the %s", resourceName),
+				Description: desc.Sprintf("Maximum IP address in assigned global addresses to the %s", resourceName),
 			},
 			"ip_addresses": {
 				Type:        schema.TypeList,
 				Computed:    true,
 				Elem:        &schema.Schema{Type: schema.TypeString},
-				Description: descf("A list of assigned global address to the %s", resourceName),
+				Description: desc.Sprintf("A list of assigned global address to the %s", resourceName),
 			},
 			"ipv6_prefix": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The network prefix of assigned IPv6 addresses to the %s", resourceName),
+				Description: desc.Sprintf("The network prefix of assigned IPv6 addresses to the %s", resourceName),
 			},
 			"ipv6_prefix_len": {
 				Type:        schema.TypeInt,
@@ -127,7 +128,7 @@ func resourceSakuraCloudInternet() *schema.Resource {
 			"ipv6_network_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IPv6 network address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The IPv6 network address assigned to the %s", resourceName),
 			},
 		},
 	}
diff --git a/sakuracloud/resource_sakuracloud_load_balancer.go b/sakuracloud/resource_sakuracloud_load_balancer.go
index 0b142e30..60972e9a 100644
--- a/sakuracloud/resource_sakuracloud_load_balancer.go
+++ b/sakuracloud/resource_sakuracloud_load_balancer.go
@@ -26,6 +26,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/power"
 	"github.com/sacloud/iaas-api-go/types"
 	"github.com/sacloud/iaas-service-go/setup"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudLoadBalancer() *schema.Resource {
@@ -70,23 +71,23 @@ func resourceSakuraCloudLoadBalancer() *schema.Resource {
 							MinItems:    1,
 							MaxItems:    2,
 							Elem:        &schema.Schema{Type: schema.TypeString},
-							Description: descf("A list of IP address to assign to the %s. ", resourceName),
+							Description: desc.Sprintf("A list of IP address to assign to the %s. ", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
 							ForceNew:         true,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet assigned to the %s. %s", resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 						"gateway": {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Optional:    true,
-							Description: descf("The IP address of the gateway used by %s", resourceName),
+							Description: desc.Sprintf("The IP address of the gateway used by %s", resourceName),
 						},
 					},
 				},
@@ -110,9 +111,9 @@ func resourceSakuraCloudLoadBalancer() *schema.Resource {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 65535)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The target port number for load-balancing. %s",
-								descRange(1, 65535),
+								desc.Range(1, 65535),
 							),
 						},
 						"delay_loop": {
@@ -120,9 +121,9 @@ func resourceSakuraCloudLoadBalancer() *schema.Resource {
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 2147483647)),
 							Default:          10,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The interval in seconds between checks. %s",
-								descRange(10, 2147483647),
+								desc.Range(10, 2147483647),
 							),
 						},
 						"sorry_server": {
@@ -146,7 +147,7 @@ func resourceSakuraCloudLoadBalancer() *schema.Resource {
 										Type:             schema.TypeString,
 										Required:         true,
 										ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.LoadBalancerHealthCheckProtocolStrings, false)),
-										Description: descf(
+										Description: desc.Sprintf(
 											"The protocol used for health checks. This must be one of [%s]",
 											types.LoadBalancerHealthCheckProtocolStrings,
 										),
diff --git a/sakuracloud/resource_sakuracloud_local_router.go b/sakuracloud/resource_sakuracloud_local_router.go
index 40b053f4..8184c64c 100644
--- a/sakuracloud/resource_sakuracloud_local_router.go
+++ b/sakuracloud/resource_sakuracloud_local_router.go
@@ -22,6 +22,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudLocalRouter() *schema.Resource {
@@ -89,15 +90,15 @@ func resourceSakuraCloudLocalRouter() *schema.Resource {
 							MinItems:    2,
 							MaxItems:    2,
 							Elem:        &schema.Schema{Type: schema.TypeString},
-							Description: descf("A list of IP address to assign to the %s. ", resourceName),
+							Description: desc.Sprintf("A list of IP address to assign to the %s. ", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet assigned to the %s. %s", resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 						"vrid": {
diff --git a/sakuracloud/resource_sakuracloud_mobile_gateway.go b/sakuracloud/resource_sakuracloud_mobile_gateway.go
index d5bb71a2..c3335b1c 100644
--- a/sakuracloud/resource_sakuracloud_mobile_gateway.go
+++ b/sakuracloud/resource_sakuracloud_mobile_gateway.go
@@ -25,6 +25,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudMobileGateway() *schema.Resource {
@@ -57,22 +58,22 @@ func resourceSakuraCloudMobileGateway() *schema.Resource {
 							Type:             schema.TypeString,
 							ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
 							Required:         true,
-							Description:      descf("The id of the switch to which the %s connects", resourceName),
+							Description:      desc.Sprintf("The id of the switch to which the %s connects", resourceName),
 						},
 						"ip_address": {
 							Type:             schema.TypeString,
 							ValidateDiagFunc: validateIPv4Address(),
 							Required:         true,
-							Description:      descf("The IP address to assign to the %s", resourceName),
+							Description:      desc.Sprintf("The IP address to assign to the %s", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet to assign to the %s. %s",
 								resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 					},
@@ -81,12 +82,12 @@ func resourceSakuraCloudMobileGateway() *schema.Resource {
 			"public_ip": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The public IP address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The public IP address assigned to the %s", resourceName),
 			},
 			"public_netmask": {
 				Type:        schema.TypeInt,
 				Computed:    true,
-				Description: descf("The bit length of the subnet assigned to the %s", resourceName),
+				Description: desc.Sprintf("The bit length of the subnet assigned to the %s", resourceName),
 			},
 			"internet_connection": {
 				Type:        schema.TypeBool,
@@ -178,7 +179,7 @@ func resourceSakuraCloudMobileGateway() *schema.Resource {
 							Type:             schema.TypeString,
 							ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
 							Required:         true,
-							Description:      descf("The id of the Switch connected to the %s", resourceName),
+							Description:      desc.Sprintf("The id of the Switch connected to the %s", resourceName),
 						},
 						"ip_address": {
 							Type:             schema.TypeString,
diff --git a/sakuracloud/resource_sakuracloud_nfs.go b/sakuracloud/resource_sakuracloud_nfs.go
index e189454c..3b687ccf 100644
--- a/sakuracloud/resource_sakuracloud_nfs.go
+++ b/sakuracloud/resource_sakuracloud_nfs.go
@@ -27,6 +27,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/power"
 	"github.com/sacloud/iaas-api-go/types"
 	"github.com/sacloud/iaas-service-go/setup"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudNFS() *schema.Resource {
@@ -62,24 +63,24 @@ func resourceSakuraCloudNFS() *schema.Resource {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Required:    true,
-							Description: descf("The IP address to assign to the %s", resourceName),
+							Description: desc.Sprintf("The IP address to assign to the %s", resourceName),
 						},
 						"netmask": {
 							Type:             schema.TypeInt,
 							ForceNew:         true,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(8, 29)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The bit length of the subnet to assign to the %s. %s",
 								resourceName,
-								descRange(8, 29),
+								desc.Range(8, 29),
 							),
 						},
 						"gateway": {
 							Type:        schema.TypeString,
 							ForceNew:    true,
 							Optional:    true,
-							Description: descf("The IP address of the gateway used by %s", resourceName),
+							Description: desc.Sprintf("The IP address of the gateway used by %s", resourceName),
 						},
 					},
 				},
diff --git a/sakuracloud/resource_sakuracloud_note.go b/sakuracloud/resource_sakuracloud_note.go
index b1a28de6..5421e4dd 100644
--- a/sakuracloud/resource_sakuracloud_note.go
+++ b/sakuracloud/resource_sakuracloud_note.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudNote() *schema.Resource {
@@ -47,7 +48,7 @@ func resourceSakuraCloudNote() *schema.Resource {
 			"content": {
 				Type:     schema.TypeString,
 				Required: true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The content of the %s. This must be specified as a shell script or as a cloud-config",
 					resourceName,
 				),
@@ -57,14 +58,14 @@ func resourceSakuraCloudNote() *schema.Resource {
 				Optional:         true,
 				Default:          "shell",
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.NoteClassStrings, false)),
-				Description:      descf("The class of the %s. This must be one of %s", resourceName, types.NoteClassStrings),
+				Description:      desc.Sprintf("The class of the %s. This must be one of %s", resourceName, types.NoteClassStrings),
 			},
 			"icon_id": schemaResourceIconID(resourceName),
 			"tags":    schemaResourceTags(resourceName),
 			"description": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The description of the %s. This will be computed from special tags within body of `content`", resourceName),
+				Description: desc.Sprintf("The description of the %s. This will be computed from special tags within body of `content`", resourceName),
 			},
 		},
 	}
diff --git a/sakuracloud/resource_sakuracloud_packet_filter.go b/sakuracloud/resource_sakuracloud_packet_filter.go
index 4087c37e..ec02b2f6 100644
--- a/sakuracloud/resource_sakuracloud_packet_filter.go
+++ b/sakuracloud/resource_sakuracloud_packet_filter.go
@@ -24,6 +24,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudPacketFilter() *schema.Resource {
@@ -58,7 +59,7 @@ func resourceSakuraCloudPacketFilter() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.PacketFilterProtocolStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for filtering. This must be one of [%s]",
 								types.PacketFilterProtocolStrings,
 							),
diff --git a/sakuracloud/resource_sakuracloud_packet_filter_rules.go b/sakuracloud/resource_sakuracloud_packet_filter_rules.go
index 11094ca2..61cc41ee 100644
--- a/sakuracloud/resource_sakuracloud_packet_filter_rules.go
+++ b/sakuracloud/resource_sakuracloud_packet_filter_rules.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudPacketFilterRules() *schema.Resource {
@@ -60,7 +61,7 @@ func resourceSakuraCloudPacketFilterRules() *schema.Resource {
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.PacketFilterProtocolStrings, false)),
 							ForceNew:         true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for filtering. This must be one of [%s]",
 								types.PacketFilterProtocolStrings,
 							),
diff --git a/sakuracloud/resource_sakuracloud_private_host.go b/sakuracloud/resource_sakuracloud_private_host.go
index 5b59307d..16946529 100644
--- a/sakuracloud/resource_sakuracloud_private_host.go
+++ b/sakuracloud/resource_sakuracloud_private_host.go
@@ -24,6 +24,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudPrivateHost() *schema.Resource {
@@ -52,7 +53,7 @@ func resourceSakuraCloudPrivateHost() *schema.Resource {
 				Optional:         true,
 				Default:          types.PrivateHostClassDynamic,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(classes, false)),
-				Description:      descf("The class of the %s. This will be one of [%s]", resourceName, classes),
+				Description:      desc.Sprintf("The class of the %s. This will be one of [%s]", resourceName, classes),
 			},
 			"icon_id":     schemaResourceIconID(resourceName),
 			"description": schemaResourceDescription(resourceName),
diff --git a/sakuracloud/resource_sakuracloud_proxylb.go b/sakuracloud/resource_sakuracloud_proxylb.go
index 13f066e2..0b112c3a 100644
--- a/sakuracloud/resource_sakuracloud_proxylb.go
+++ b/sakuracloud/resource_sakuracloud_proxylb.go
@@ -24,6 +24,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/query"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudProxyLB() *schema.Resource {
@@ -80,7 +81,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 				Default:          types.ProxyLBRegions.IS1.String(),
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBRegionStrings, false)),
 				ForceNew:         true,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The name of region that the proxy LB is in. This must be one of [%s]",
 					types.ProxyLBRegionStrings,
 				),
@@ -119,7 +120,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBProxyModeStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The proxy mode. This must be one of [%s]",
 								types.ProxyLBProxyModeStrings,
 							),
@@ -143,7 +144,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBSSLPolicies, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The ssl policy. This must be one of [%s]",
 								types.ProxyLBSSLPolicies,
 							),
@@ -157,12 +158,12 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 									"header": {
 										Type:        schema.TypeString,
 										Required:    true,
-										Description: descf("The field name of HTTP header added to response by the %s", resourceName),
+										Description: desc.Sprintf("The field name of HTTP header added to response by the %s", resourceName),
 									},
 									"value": {
 										Type:        schema.TypeString,
 										Required:    true,
-										Description: descf("The field value of HTTP header added to response by the %s", resourceName),
+										Description: desc.Sprintf("The field value of HTTP header added to response by the %s", resourceName),
 									},
 								},
 							},
@@ -181,7 +182,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBProtocolStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This must be one of [%s]",
 								types.ProxyLBProtocolStrings,
 							),
@@ -191,9 +192,9 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 60)),
 							Default:          10,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The interval in seconds between checks. %s",
-								descRange(10, 60),
+								desc.Range(10, 60),
 							),
 						},
 						"host_header": {
@@ -310,15 +311,15 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 65535)),
-							Description:      descf("The port number of the destination server. %s", descRange(1, 65535)),
+							Description:      desc.Sprintf("The port number of the destination server. %s", desc.Range(1, 65535)),
 						},
 						"group": {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 10)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The name of load balancing group. This is used when using rule-based load balancing. %s",
-								descLength(1, 10),
+								desc.Length(1, 10),
 							),
 						},
 						"enabled": {
@@ -349,9 +350,9 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 10)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The name of load balancing group. When proxyLB received request which matched to `host` and `path`, proxyLB forwards the request to servers that having same group name. %s",
-								descLength(1, 10),
+								desc.Length(1, 10),
 							),
 						},
 						"action": {
@@ -359,7 +360,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Optional:         true,
 							Default:          types.ProxyLBRuleActions.Forward,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBRuleActionStrings(), false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The type of action to be performed when requests matches the rule. This must be one of [%s]",
 								types.ProxyLBRuleActionStrings(),
 							),
@@ -373,7 +374,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBRedirectStatusCodeStrings(), false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"HTTP status code for redirects sent when requests matches the rule. This must be one of [%s]",
 								types.ProxyLBRedirectStatusCodeStrings(),
 							),
@@ -382,7 +383,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBFixedStatusCodeStrings(), false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"HTTP status code for fixed response sent when requests matches the rule. This must be one of [%s]",
 								types.ProxyLBFixedStatusCodeStrings(),
 							),
@@ -391,7 +392,7 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.ProxyLBFixedContentTypeStrings(), false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"Content-Type header value for fixed response sent when requests matches the rule. This must be one of [%s]",
 								types.ProxyLBFixedContentTypeStrings(),
 							),
@@ -410,18 +411,18 @@ func resourceSakuraCloudProxyLB() *schema.Resource {
 			"fqdn": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The FQDN for accessing to the %s. This is typically used as value of CNAME record", resourceName),
+				Description: desc.Sprintf("The FQDN for accessing to the %s. This is typically used as value of CNAME record", resourceName),
 			},
 			"vip": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The virtual IP address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The virtual IP address assigned to the %s", resourceName),
 			},
 			"proxy_networks": {
 				Type:        schema.TypeList,
 				Elem:        &schema.Schema{Type: schema.TypeString},
 				Computed:    true,
-				Description: descf("A list of CIDR block used by the %s to access the server", resourceName),
+				Description: desc.Sprintf("A list of CIDR block used by the %s to access the server", resourceName),
 			},
 		},
 	}
diff --git a/sakuracloud/resource_sakuracloud_server.go b/sakuracloud/resource_sakuracloud_server.go
index f7e30b9c..e5e1ce23 100644
--- a/sakuracloud/resource_sakuracloud_server.go
+++ b/sakuracloud/resource_sakuracloud_server.go
@@ -26,6 +26,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/power"
 	"github.com/sacloud/iaas-api-go/helper/query"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudServer() *schema.Resource {
@@ -69,7 +70,7 @@ func resourceSakuraCloudServer() *schema.Resource {
 				Optional:         true,
 				Default:          types.Commitments.Standard.String(),
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.CommitmentStrings, false)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The policy of how to allocate virtual CPUs to the server. This must be one of [%s]",
 					types.CommitmentStrings,
 				),
@@ -85,7 +86,7 @@ func resourceSakuraCloudServer() *schema.Resource {
 				Optional:         true,
 				Default:          types.InterfaceDrivers.VirtIO.String(),
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.InterfaceDriverStrings, false)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The driver name of network interface. This must be one of [%s]",
 					types.InterfaceDriverStrings,
 				),
@@ -100,7 +101,7 @@ func resourceSakuraCloudServer() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validateSakuraCloudServerNIC),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The upstream type or upstream switch id. This must be one of [%s]",
 								[]string{"shared", "disconnect", "<switch id>"},
 							),
@@ -151,7 +152,7 @@ func resourceSakuraCloudServer() *schema.Resource {
 				Type:          schema.TypeString,
 				Optional:      true,
 				ConflictsWith: []string{"disk_edit_parameter"},
-				Description:   descf("A string representing the user data used by cloud-init. %s", descConflicts("disk_edit_parameter")),
+				Description:   desc.Sprintf("A string representing the user data used by cloud-init. %s", desc.Conflicts("disk_edit_parameter")),
 			},
 			"disk_edit_parameter": {
 				Type:          schema.TypeList,
@@ -165,14 +166,14 @@ func resourceSakuraCloudServer() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 64)),
-							Description:      descf("The hostname of the %s. %s", resourceName, descLength(1, 64)),
+							Description:      desc.Sprintf("The hostname of the %s. %s", resourceName, desc.Length(1, 64)),
 						},
 						"password": {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(8, 64)),
 							Sensitive:        true,
-							Description:      descf("The password of default user. %s", descLength(8, 64)),
+							Description:      desc.Sprintf("The password of default user. %s", desc.Length(8, 64)),
 						},
 						"ssh_key_ids": {
 							Type:        schema.TypeList,
@@ -261,12 +262,12 @@ func resourceSakuraCloudServer() *schema.Resource {
 			"ip_address": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IP address assigned to the %s", resourceName),
+				Description: desc.Sprintf("The IP address assigned to the %s", resourceName),
 			},
 			"gateway": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The IP address of the gateway used by %s", resourceName),
+				Description: desc.Sprintf("The IP address of the gateway used by %s", resourceName),
 			},
 			"network_address": {
 				Type:        schema.TypeString,
@@ -276,7 +277,7 @@ func resourceSakuraCloudServer() *schema.Resource {
 			"netmask": {
 				Type:        schema.TypeInt,
 				Computed:    true,
-				Description: descf("The bit length of the subnet assigned to the %s", resourceName),
+				Description: desc.Sprintf("The bit length of the subnet assigned to the %s", resourceName),
 			},
 			"dns_servers": {
 				Type:        schema.TypeList,
diff --git a/sakuracloud/resource_sakuracloud_sim.go b/sakuracloud/resource_sakuracloud_sim.go
index cf9455dd..1432ddbb 100644
--- a/sakuracloud/resource_sakuracloud_sim.go
+++ b/sakuracloud/resource_sakuracloud_sim.go
@@ -24,6 +24,7 @@ import (
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
 	"github.com/sacloud/iaas-api-go/helper/query"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudSIM() *schema.Resource {
@@ -71,7 +72,7 @@ func resourceSakuraCloudSIM() *schema.Resource {
 				Set:      schema.HashString,
 				MinItems: 1,
 				MaxItems: 3,
-				Description: descf(
+				Description: desc.Sprintf(
 					"A list of a communication company. Each element must be one of %s",
 					types.SIMOperatorShortNames(),
 				),
diff --git a/sakuracloud/resource_sakuracloud_simple_monitor.go b/sakuracloud/resource_sakuracloud_simple_monitor.go
index 8f9702f8..65c0ca08 100644
--- a/sakuracloud/resource_sakuracloud_simple_monitor.go
+++ b/sakuracloud/resource_sakuracloud_simple_monitor.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudSimpleMonitor() *schema.Resource {
@@ -55,9 +56,9 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(60, 3600)),
 				Default:          60,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The interval in seconds between checks. %s",
-					descRange(60, 3600),
+					desc.Range(60, 3600),
 				),
 			},
 			"max_check_attempts": {
@@ -65,9 +66,9 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 				Optional:         true,
 				Computed:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 10)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The number of retry. %s",
-					descRange(1, 10),
+					desc.Range(1, 10),
 				),
 			},
 			"retry_interval": {
@@ -75,9 +76,9 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 				Optional:         true,
 				Computed:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 3600)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The interval in seconds between retries. %s",
-					descRange(10, 3600),
+					desc.Range(10, 3600),
 				),
 			},
 			"timeout": {
@@ -85,9 +86,9 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 				Optional:         true,
 				Computed:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(10, 30)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The timeout in seconds for monitoring. %s",
-					descRange(10, 30),
+					desc.Range(10, 30),
 				),
 			},
 			"health_check": {
@@ -101,7 +102,7 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.SimpleMonitorProtocolStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for health checks. This must be one of [%s]",
 								types.SimpleMonitorProtocolStrings,
 							),
@@ -166,7 +167,7 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 							Type:             schema.TypeString,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"1", "2c"}, false)),
 							Optional:         true,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The SNMP version used when checking by SNMP. This must be one of %s",
 								[]string{"1", "2c"},
 							),
@@ -181,9 +182,9 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 9999)),
 							Default:          30,
-							Description: descf(
+							Description: desc.Sprintf(
 								"The number of remaining days until certificate expiration used when checking SSL certificates. %s",
-								descRange(1, 9999),
+								desc.Range(1, 9999),
 							),
 						},
 						"http2": {
@@ -195,7 +196,7 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.SimpleMonitorFTPSStrings, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The methods of invoking security for monitoring with FTPS. This must be one of [%s]",
 								types.SimpleMonitorFTPSStrings,
 							),
@@ -239,7 +240,7 @@ func resourceSakuraCloudSimpleMonitor() *schema.Resource {
 				Optional:         true,
 				Default:          2,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 72)),
-				Description:      descf("The interval in hours between notification. %s", descRange(1, 72)),
+				Description:      desc.Sprintf("The interval in hours between notification. %s", desc.Range(1, 72)),
 			},
 			"enabled": {
 				Type:        schema.TypeBool,
diff --git a/sakuracloud/resource_sakuracloud_ssh_key_gen.go b/sakuracloud/resource_sakuracloud_ssh_key_gen.go
index 1cad72a6..b4e1e187 100644
--- a/sakuracloud/resource_sakuracloud_ssh_key_gen.go
+++ b/sakuracloud/resource_sakuracloud_ssh_key_gen.go
@@ -22,6 +22,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudSSHKeyGen() *schema.Resource {
@@ -43,23 +44,23 @@ func resourceSakuraCloudSSHKeyGen() *schema.Resource {
 				Required:         true,
 				ForceNew:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 64)),
-				Description:      descf("The name of the %s. %s", resourceName, descLength(1, 64)),
+				Description:      desc.Sprintf("The name of the %s. %s", resourceName, desc.Length(1, 64)),
 			},
 			"description": {
 				Type:             schema.TypeString,
 				Optional:         true,
 				ForceNew:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 512)),
-				Description:      descf("The description of the %s. %s", resourceName, descLength(1, 512)),
+				Description:      desc.Sprintf("The description of the %s. %s", resourceName, desc.Length(1, 512)),
 			},
 			"pass_phrase": {
 				Type:             schema.TypeString,
 				Optional:         true,
 				ForceNew:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(8, 64)),
-				Description: descf(
+				Description: desc.Sprintf(
 					"The pass phrase of the private key. %s",
-					descLength(8, 64),
+					desc.Length(8, 64),
 				),
 			},
 			"private_key": {
diff --git a/sakuracloud/resource_sakuracloud_subnet.go b/sakuracloud/resource_sakuracloud_subnet.go
index 758f3aac..dd0c41f8 100644
--- a/sakuracloud/resource_sakuracloud_subnet.go
+++ b/sakuracloud/resource_sakuracloud_subnet.go
@@ -22,6 +22,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudSubnet() *schema.Resource {
@@ -55,9 +56,9 @@ func resourceSakuraCloudSubnet() *schema.Resource {
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice([]int{28, 27, 26})),
 				Default:          28,
-				Description: descf(
+				Description: desc.Sprintf(
 					"The bit length of the subnet to assign to the %s. %s", resourceName,
-					descRange(26, 28),
+					desc.Range(26, 28),
 				),
 			},
 			"next_hop": {
@@ -69,7 +70,7 @@ func resourceSakuraCloudSubnet() *schema.Resource {
 			"switch_id": {
 				Type:        schema.TypeString,
 				Computed:    true,
-				Description: descf("The id of the switch connected from the %s", resourceName),
+				Description: desc.Sprintf("The id of the switch connected from the %s", resourceName),
 			},
 			"network_address": {
 				Type:        schema.TypeString,
diff --git a/sakuracloud/resource_sakuracloud_switch.go b/sakuracloud/resource_sakuracloud_switch.go
index eb291511..6937ee5f 100644
--- a/sakuracloud/resource_sakuracloud_switch.go
+++ b/sakuracloud/resource_sakuracloud_switch.go
@@ -23,6 +23,7 @@ import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/cleanup"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudSwitch() *schema.Resource {
@@ -51,7 +52,7 @@ func resourceSakuraCloudSwitch() *schema.Resource {
 				Type:             schema.TypeString,
 				Optional:         true,
 				ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-				Description:      descf("The bridge id attached to the %s", resourceName),
+				Description:      desc.Sprintf("The bridge id attached to the %s", resourceName),
 			},
 			"server_ids": {
 				Type:        schema.TypeList,
diff --git a/sakuracloud/resource_sakuracloud_vpc_router.go b/sakuracloud/resource_sakuracloud_vpc_router.go
index e70dbbf0..fb8760fc 100644
--- a/sakuracloud/resource_sakuracloud_vpc_router.go
+++ b/sakuracloud/resource_sakuracloud_vpc_router.go
@@ -24,6 +24,7 @@ import (
 	"github.com/sacloud/iaas-api-go"
 	"github.com/sacloud/iaas-api-go/helper/power"
 	"github.com/sacloud/iaas-api-go/types"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func resourceSakuraCloudVPCRouter() *schema.Resource {
@@ -120,7 +121,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 7)),
-							Description:      descf("The index of the network interface. %s", descRange(1, 7)),
+							Description:      desc.Sprintf("The index of the network interface. %s", desc.Range(1, 7)),
 						},
 						"switch_id": {
 							Type:             schema.TypeString,
@@ -159,9 +160,9 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 7)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The index of the network interface on which to enable the DHCP service. %s",
-								descRange(1, 7),
+								desc.Range(1, 7),
 							),
 						},
 						"range_start": {
@@ -213,9 +214,9 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeInt,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(1, 7)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The index of the network interface on which to enable the DNS forwarding service. %s",
-								descRange(1, 7),
+								desc.Range(1, 7),
 							),
 						},
 						"dns_servers": {
@@ -236,16 +237,16 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeInt,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 7)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The index of the network interface on which to enable filtering. %s",
-								descRange(0, 7),
+								desc.Range(0, 7),
 							),
 						},
 						"direction": {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"send", "receive"}, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The direction to apply the firewall. This must be one of [%s]",
 								[]string{"send", "receive"},
 							),
@@ -259,7 +260,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 										Type:             schema.TypeString,
 										Required:         true,
 										ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.VPCRouterFirewallProtocolStrings, false)),
-										Description: descf(
+										Description: desc.Sprintf(
 											"The protocol used for filtering. This must be one of [%s]",
 											types.VPCRouterFirewallProtocolStrings,
 										),
@@ -298,7 +299,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 										Type:             schema.TypeString,
 										Optional:         true,
 										ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(0, 512)),
-										Description:      descf("The description of the expression. %s", descLength(0, 512)),
+										Description:      desc.Sprintf("The description of the expression. %s", desc.Length(0, 512)),
 									},
 								},
 							},
@@ -343,7 +344,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeString,
 							Required:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"tcp", "udp"}, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The protocol used for port forwarding. This must be one of [%s]",
 								[]string{"tcp", "udp"},
 							),
@@ -370,7 +371,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(0, 512)),
-							Description:      descf("The description of the port forwarding. %s", descLength(0, 512)),
+							Description:      desc.Sprintf("The description of the port forwarding. %s", desc.Length(0, 512)),
 						},
 					},
 				},
@@ -458,7 +459,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Required:         true,
 							Sensitive:        true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(0, 40)),
-							Description:      descf("The pre shared secret for the VPN. %s", descLength(0, 40)),
+							Description:      desc.Sprintf("The pre shared secret for the VPN. %s", desc.Length(0, 40)),
 						},
 						"routes": {
 							Type:        schema.TypeSet,
@@ -542,7 +543,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Optional:         true,
 							Computed:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.VPCRouterSiteToSiteVPNEncryptionAlgos, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"This must be one of [%s]",
 								types.VPCRouterSiteToSiteVPNEncryptionAlgos,
 							),
@@ -552,7 +553,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Optional:         true,
 							Computed:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(types.VPCRouterSiteToSiteVPNHashAlgos, false)),
-							Description: descf(
+							Description: desc.Sprintf(
 								"This must be one of [%s]",
 								types.VPCRouterSiteToSiteVPNHashAlgos,
 							),
@@ -581,7 +582,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:             schema.TypeString,
 							Optional:         true,
 							ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(0, 512)),
-							Description:      descf("The description of the static nat. %s", descLength(0, 512)),
+							Description:      desc.Sprintf("The description of the static nat. %s", desc.Length(0, 512)),
 						},
 					},
 				},
@@ -616,7 +617,7 @@ func resourceSakuraCloudVPCRouter() *schema.Resource {
 							Type:     schema.TypeString,
 							Optional: true,
 							Default:  types.DaysOfTheWeek.Monday.String(),
-							Description: descf(
+							Description: desc.Sprintf(
 								"The value must be in [%s]",
 								types.DaysOfTheWeekStrings,
 							),
diff --git a/sakuracloud/schema.go b/sakuracloud/schema.go
index 00e20f09..44ab43cc 100644
--- a/sakuracloud/schema.go
+++ b/sakuracloud/schema.go
@@ -17,13 +17,14 @@ package sakuracloud
 import (
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/desc"
 )
 
 func schemaDataSourceName(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The name of the %s", resourceName),
+		Description: desc.Sprintf("The name of the %s", resourceName),
 	}
 }
 
@@ -32,7 +33,7 @@ func schemaResourceName(resourceName string) *schema.Schema {
 		Type:             schema.TypeString,
 		Required:         true,
 		ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 64)),
-		Description:      descf("The name of the %s. %s", resourceName, descLength(1, 64)),
+		Description:      desc.Sprintf("The name of the %s. %s", resourceName, desc.Length(1, 64)),
 	}
 }
 
@@ -40,7 +41,7 @@ func schemaDataSourceSize(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeInt,
 		Computed:    true,
-		Description: descf("The size of %s in GiB", resourceName),
+		Description: desc.Sprintf("The size of %s in GiB", resourceName),
 	}
 }
 
@@ -49,14 +50,14 @@ func schemaResourceSize(resourceName string, defaultValue int, validSizes ...int
 		Type:        schema.TypeInt,
 		Optional:    true,
 		ForceNew:    true,
-		Description: descf("The size of %s in GiB", resourceName),
+		Description: desc.Sprintf("The size of %s in GiB", resourceName),
 	}
 	if defaultValue > 0 {
 		s.Default = defaultValue
 	}
 	if len(validSizes) > 0 {
 		s.ValidateDiagFunc = validation.ToDiagFunc(validation.IntInSlice(validSizes))
-		s.Description = descf("%s. This must be one of [%s]", s.Description, validSizes)
+		s.Description = desc.Sprintf("%s. This must be one of [%s]", s.Description, validSizes)
 	}
 	return s
 }
@@ -65,7 +66,7 @@ func schemaDataSourceBridgeID(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The bridge id attached to the %s", resourceName),
+		Description: desc.Sprintf("The bridge id attached to the %s", resourceName),
 	}
 }
 
@@ -73,7 +74,7 @@ func schemaDataSourceIconID(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The icon id attached to the %s", resourceName),
+		Description: desc.Sprintf("The icon id attached to the %s", resourceName),
 	}
 }
 
@@ -82,7 +83,7 @@ func schemaResourceIconID(resourceName string) *schema.Schema {
 		Type:             schema.TypeString,
 		Optional:         true,
 		ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-		Description:      descf("The icon id to attach to the %s", resourceName),
+		Description:      desc.Sprintf("The icon id to attach to the %s", resourceName),
 	}
 }
 
@@ -90,7 +91,7 @@ func schemaDataSourceDescription(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The description of the %s", resourceName),
+		Description: desc.Sprintf("The description of the %s", resourceName),
 	}
 }
 
@@ -99,7 +100,7 @@ func schemaResourceDescription(resourceName string) *schema.Schema {
 		Type:             schema.TypeString,
 		Optional:         true,
 		ValidateDiagFunc: validation.ToDiagFunc(validation.StringLenBetween(1, 512)),
-		Description:      descf("The description of the %s. %s", resourceName, descLength(1, 512)),
+		Description:      desc.Sprintf("The description of the %s. %s", resourceName, desc.Length(1, 512)),
 	}
 }
 
@@ -109,7 +110,7 @@ func schemaDataSourceTags(resourceName string) *schema.Schema {
 		Computed:    true,
 		Elem:        &schema.Schema{Type: schema.TypeString},
 		Set:         schema.HashString,
-		Description: descf("Any tags assigned to the %s", resourceName),
+		Description: desc.Sprintf("Any tags assigned to the %s", resourceName),
 	}
 }
 
@@ -119,7 +120,7 @@ func schemaResourceTags(resourceName string) *schema.Schema {
 		Optional:    true,
 		Elem:        &schema.Schema{Type: schema.TypeString},
 		Set:         schema.HashString,
-		Description: descf("Any tags to assign to the %s", resourceName),
+		Description: desc.Sprintf("Any tags to assign to the %s", resourceName),
 	}
 }
 
@@ -129,7 +130,7 @@ func schemaDataSourceZone(resourceName string) *schema.Schema {
 		Optional:    true,
 		Computed:    true,
 		ForceNew:    true,
-		Description: descf("The name of zone that the %s is in (e.g. `is1a`, `tk1a`)", resourceName),
+		Description: desc.Sprintf("The name of zone that the %s is in (e.g. `is1a`, `tk1a`)", resourceName),
 	}
 }
 
@@ -139,7 +140,7 @@ func schemaResourceZone(resourceName string) *schema.Schema {
 		Optional:    true,
 		Computed:    true,
 		ForceNew:    true,
-		Description: descf("The name of zone that the %s will be created (e.g. `is1a`, `tk1a`)", resourceName),
+		Description: desc.Sprintf("The name of zone that the %s will be created (e.g. `is1a`, `tk1a`)", resourceName),
 	}
 }
 
@@ -147,7 +148,7 @@ func schemaDataSourceServerID(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The id of the Server connected to the %s", resourceName),
+		Description: desc.Sprintf("The id of the Server connected to the %s", resourceName),
 	}
 }
 
@@ -155,7 +156,7 @@ func schemaDataSourceSwitchID(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The id of the switch connected from the %s", resourceName),
+		Description: desc.Sprintf("The id of the switch connected from the %s", resourceName),
 	}
 }
 
@@ -165,7 +166,7 @@ func schemaResourceSwitchID(resourceName string) *schema.Schema {
 		ForceNew:         true,
 		Required:         true,
 		ValidateDiagFunc: validation.ToDiagFunc(validateSakuracloudIDType),
-		Description:      descf("The id of the switch to which the %s connects", resourceName),
+		Description:      desc.Sprintf("The id of the switch to which the %s connects", resourceName),
 	}
 }
 
@@ -173,7 +174,7 @@ func schemaDataSourceIPAddress(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The IP address assigned to the %s", resourceName),
+		Description: desc.Sprintf("The IP address assigned to the %s", resourceName),
 	}
 }
 
@@ -182,7 +183,7 @@ func schemaDataSourceIPAddresses(resourceName string) *schema.Schema {
 		Type:        schema.TypeList,
 		Elem:        &schema.Schema{Type: schema.TypeString},
 		Computed:    true,
-		Description: descf("The list of IP address assigned to the %s", resourceName),
+		Description: desc.Sprintf("The list of IP address assigned to the %s", resourceName),
 	}
 }
 
@@ -190,7 +191,7 @@ func schemaDataSourceNetMask(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeInt,
 		Computed:    true,
-		Description: descf("The bit length of the subnet assigned to the %s", resourceName),
+		Description: desc.Sprintf("The bit length of the subnet assigned to the %s", resourceName),
 	}
 }
 
@@ -198,7 +199,7 @@ func schemaDataSourceGateway(resourceName string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descf("The IP address of the gateway used by %s", resourceName),
+		Description: desc.Sprintf("The IP address of the gateway used by %s", resourceName),
 	}
 }
 
@@ -206,7 +207,7 @@ func schemaDataSourcePlan(resourceName string, plans []string) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeString,
 		Computed:    true,
-		Description: descDataSourcePlan(resourceName, plans),
+		Description: desc.DataSourcePlan(resourceName, plans),
 	}
 }
 
@@ -215,7 +216,7 @@ func schemaResourcePlan(resourceName string, defaultValue string, plans []string
 		Type:             schema.TypeString,
 		Optional:         true,
 		ForceNew:         true,
-		Description:      descResourcePlan(resourceName, plans),
+		Description:      desc.ResourcePlan(resourceName, plans),
 		ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(plans, false)),
 	}
 	if defaultValue != "" {
@@ -228,7 +229,7 @@ func schemaDataSourceIntPlan(resourceName string, plans []int) *schema.Schema {
 	return &schema.Schema{
 		Type:        schema.TypeInt,
 		Computed:    true,
-		Description: descDataSourcePlan(resourceName, plans),
+		Description: desc.DataSourcePlan(resourceName, plans),
 	}
 }
 
@@ -237,7 +238,7 @@ func schemaResourceIntPlan(resourceName string, defaultValue int, plans []int) *
 		Type:             schema.TypeInt,
 		Optional:         true,
 		ForceNew:         true,
-		Description:      descResourcePlan(resourceName, plans),
+		Description:      desc.ResourcePlan(resourceName, plans),
 		ValidateDiagFunc: validation.ToDiagFunc(validation.IntInSlice(plans)),
 	}
 	if defaultValue > 0 {
@@ -250,7 +251,7 @@ func schemaDataSourceClass(resourceName string, classes []string) *schema.Schema
 	return &schema.Schema{
 		Type:     schema.TypeString,
 		Computed: true,
-		Description: descf(
+		Description: desc.Sprintf(
 			"The class of the %s. This will be one of [%s]",
 			resourceName, classes,
 		),
@@ -262,7 +263,7 @@ func schemaDataSourceSourceRanges(resourceName string) *schema.Schema {
 		Type:        schema.TypeList,
 		Computed:    true,
 		Elem:        &schema.Schema{Type: schema.TypeString},
-		Description: descf("The range of source IP addresses that allow to access to the %s via network", resourceName),
+		Description: desc.Sprintf("The range of source IP addresses that allow to access to the %s via network", resourceName),
 	}
 }
 
diff --git a/sakuracloud/version.go b/version/version.go
similarity index 97%
rename from sakuracloud/version.go
rename to version/version.go
index f04b63f1..702289b9 100644
--- a/sakuracloud/version.go
+++ b/version/version.go
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sakuracloud
+package version
 
 import "fmt"
 


Test patch:
diff --git a/sakuracloud/config_test.go b/sakuracloud/config_test.go
index f98c27b0..f0d47dac 100644
--- a/sakuracloud/config_test.go
+++ b/sakuracloud/config_test.go
@@ -23,6 +23,8 @@ import (
 	"testing"
 
 	"github.com/sacloud/api-client-go/profile"
+	"github.com/sacloud/iaas-api-go"
+	"github.com/sacloud/terraform-provider-sakuracloud/internal/defaults"
 	"github.com/stretchr/testify/require"
 )
 
@@ -100,31 +102,31 @@ func TestConfig_NewClient_loadFromProfile(t *testing.T) {
 			scenario: "ProfileName is not specified and Profile is not exists",
 			in: &Config{
 				Profile:             "",
-				Zone:                defaultZone,
-				Zones:               defaultZones,
-				RetryMax:            defaultRetryMax,
-				APIRequestTimeout:   defaultAPIRequestTimeout,
-				APIRequestRateLimit: defaultAPIRequestRateLimit,
+				Zone:                defaults.Zone,
+				Zones:               iaas.SakuraCloudZones,
+				RetryMax:            defaults.RetryMax,
+				APIRequestTimeout:   defaults.APIRequestTimeout,
+				APIRequestRateLimit: defaults.APIRequestRateLimit,
 			},
 			profiles: map[string]*profile.ConfigValue{},
 			expect: &Config{
 				Profile:             "default",
-				Zone:                defaultZone,
-				Zones:               defaultZones,
-				RetryMax:            defaultRetryMax,
-				APIRequestTimeout:   defaultAPIRequestTimeout,
-				APIRequestRateLimit: defaultAPIRequestRateLimit,
+				Zone:                defaults.Zone,
+				Zones:               iaas.SakuraCloudZones,
+				RetryMax:            defaults.RetryMax,
+				APIRequestTimeout:   defaults.APIRequestTimeout,
+				APIRequestRateLimit: defaults.APIRequestRateLimit,
 			},
 		},
 		{
 			scenario: "ProfileName is not specified and Profile is exists",
 			in: &Config{
 				Profile:             "",
-				Zone:                defaultZone,
-				Zones:               defaultZones,
-				RetryMax:            defaultRetryMax,
-				APIRequestTimeout:   defaultAPIRequestTimeout,
-				APIRequestRateLimit: defaultAPIRequestRateLimit,
+				Zone:                defaults.Zone,
+				Zones:               iaas.SakuraCloudZones,
+				RetryMax:            defaults.RetryMax,
+				APIRequestTimeout:   defaults.APIRequestTimeout,
+				APIRequestRateLimit: defaults.APIRequestRateLimit,
 			},
 			profiles: map[string]*profile.ConfigValue{
 				"default": defaultProfile,
@@ -204,11 +206,11 @@ func TestConfig_NewClient_loadFromProfile(t *testing.T) {
 			scenario: "Profile name specified with normal profile",
 			in: &Config{
 				Profile:             "test",
-				Zone:                defaultZone,
-				Zones:               defaultZones,
-				RetryMax:            defaultRetryMax,
-				APIRequestTimeout:   defaultAPIRequestTimeout,
-				APIRequestRateLimit: defaultAPIRequestRateLimit,
+				Zone:                defaults.Zone,
+				Zones:               iaas.SakuraCloudZones,
+				RetryMax:            defaults.RetryMax,
+				APIRequestTimeout:   defaults.APIRequestTimeout,
+				APIRequestRateLimit: defaults.APIRequestRateLimit,
 			},
 			profiles: map[string]*profile.ConfigValue{
 				"default": defaultProfile,