Skip to content

Commit 9d7f392

Browse files
committed
Add a commented configuration file
1 parent 2afa274 commit 9d7f392

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

scw/config.go

+35
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,41 @@ const (
1616
defaultConfigPermission = 0600
1717
)
1818

19+
const config_file_template = `
20+
# Scaleway configuration file
21+
#
22+
# You need a Access Key and a Token to connect to Scaleway API.
23+
# Generate your token at the following address: https://console.scaleway.com/account/credentials
24+
#
25+
# An Access Key is a token identifier.
26+
{{ if .AccessKey }}access_key: {{.AccessKey}}{{ else }}# access_key: SCW11111111111111111{{ end }}
27+
#
28+
# The Secret Key is the value that can be used to authenticate against the API (the value used in X-Auth-Token HTTP-header).
29+
# The secret MUST stay secret and not given to anyone or publish online.
30+
{{ if .SecretKey }}secret_key: {{ .SecretKey }}{{ else }}# secret_key: 11111111-1111-1111-1111-111111111111{{ end }}
31+
32+
# Your organization ID is the identifier of your account inside Scaleway infrastructure
33+
{{ if .DefaultOrganizationID }}default_organization_id: {{ .DefaultOrganizationID }}{{ else }}# default_organization_id: 11111111-1111-1111-1111-111111111111{{ end }}
34+
35+
# A Region is represented as a Geographical area such as France (Paris) or the Netherlands (Amsterdam).
36+
# It can contain multiple Availability Zones.
37+
# Example of Region: fr-par, nl-ams
38+
{{ if .DefaultRegion }}default_region: {{ .DefaultRegion }}{{ else }}# default_region: fr-par{{ end }}
39+
40+
# A region can be split in many Availability Zones (AZ).
41+
# Latency between multiple AZ of the same region are low as they have a common network layer.
42+
# Example of Zones: fr-par-1, nl-ams-1
43+
{{ if .DefaultZone }}default_zone: {{.DefaultZone}}{{ else }}# default_zone: fr-par-1{{ end }}
44+
45+
# Scaleway CLI also supports profiles that will have a different set of credentials.
46+
# You can define a CLI profile using the following syntax:
47+
# myProfile:
48+
# access_key: 11111111-1111-1111-1111-111111111111
49+
# organization_id: 11111111-1111-1111-1111-111111111111
50+
# default_zone: fr-par-1
51+
# default_region: fr-par
52+
`
53+
1954
type Config struct {
2055
Profile `yaml:",inline"`
2156
ActiveProfile *string `yaml:"active_profile,omitempty"`

0 commit comments

Comments
 (0)