Skip to content

Commit eaf32ea

Browse files
authored
Move SKE enable/disable to the Service Enablement API (#413)
* Move SKE enable/disable to the Service Enablement API * move serviceId consts to service-enablement package
1 parent c94a586 commit eaf32ea

File tree

13 files changed

+235
-161
lines changed

13 files changed

+235
-161
lines changed

docs/stackit_config_set.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,28 @@ stackit config set [flags]
2929
### Options
3030

3131
```
32-
--argus-custom-endpoint string Argus API base URL, used in calls to this API
33-
--authorization-custom-endpoint string Authorization API base URL, used in calls to this API
34-
--dns-custom-endpoint string DNS API base URL, used in calls to this API
35-
-h, --help Help for "stackit config set"
36-
--identity-provider-custom-endpoint string Identity Provider base URL, used for user authentication
37-
--load-balancer-custom-endpoint string Load Balancer API base URL, used in calls to this API
38-
--logme-custom-endpoint string LogMe API base URL, used in calls to this API
39-
--mariadb-custom-endpoint string MariaDB API base URL, used in calls to this API
40-
--mongodbflex-custom-endpoint string MongoDB Flex API base URL, used in calls to this API
41-
--object-storage-custom-endpoint string Object Storage API base URL, used in calls to this API
42-
--opensearch-custom-endpoint string OpenSearch API base URL, used in calls to this API
43-
--postgresflex-custom-endpoint string PostgreSQL Flex API base URL, used in calls to this API
44-
--rabbitmq-custom-endpoint string RabbitMQ API base URL, used in calls to this API
45-
--redis-custom-endpoint string Redis API base URL, used in calls to this API
46-
--resource-manager-custom-endpoint string Resource Manager API base URL, used in calls to this API
47-
--secrets-manager-custom-endpoint string Secrets Manager API base URL, used in calls to this API
48-
--serverbackup-custom-endpoint string Server Backup API base URL, used in calls to this API
49-
--service-account-custom-endpoint string Service Account API base URL, used in calls to this API
50-
--session-time-limit string Maximum time before authentication is required again. After this time, you will be prompted to login again to execute commands that require authentication. Can't be larger than 24h. Requires authentication after being set to take effect. Examples: 3h, 5h30m40s (BETA: currently values greater than 2h have no effect)
51-
--ske-custom-endpoint string SKE API base URL, used in calls to this API
52-
--sqlserverflex-custom-endpoint string SQLServer Flex API base URL, used in calls to this API
32+
--argus-custom-endpoint string Argus API base URL, used in calls to this API
33+
--authorization-custom-endpoint string Authorization API base URL, used in calls to this API
34+
--dns-custom-endpoint string DNS API base URL, used in calls to this API
35+
-h, --help Help for "stackit config set"
36+
--identity-provider-custom-endpoint string Identity Provider base URL, used for user authentication
37+
--load-balancer-custom-endpoint string Load Balancer API base URL, used in calls to this API
38+
--logme-custom-endpoint string LogMe API base URL, used in calls to this API
39+
--mariadb-custom-endpoint string MariaDB API base URL, used in calls to this API
40+
--mongodbflex-custom-endpoint string MongoDB Flex API base URL, used in calls to this API
41+
--object-storage-custom-endpoint string Object Storage API base URL, used in calls to this API
42+
--opensearch-custom-endpoint string OpenSearch API base URL, used in calls to this API
43+
--postgresflex-custom-endpoint string PostgreSQL Flex API base URL, used in calls to this API
44+
--rabbitmq-custom-endpoint string RabbitMQ API base URL, used in calls to this API
45+
--redis-custom-endpoint string Redis API base URL, used in calls to this API
46+
--resource-manager-custom-endpoint string Resource Manager API base URL, used in calls to this API
47+
--secrets-manager-custom-endpoint string Secrets Manager API base URL, used in calls to this API
48+
--serverbackup-custom-endpoint string Server Backup API base URL, used in calls to this API
49+
--service-account-custom-endpoint string Service Account API base URL, used in calls to this API
50+
--service-enablement-custom-endpoint string Service Enablement API base URL, used in calls to this API
51+
--session-time-limit string Maximum time before authentication is required again. After this time, you will be prompted to login again to execute commands that require authentication. Can't be larger than 24h. Requires authentication after being set to take effect. Examples: 3h, 5h30m40s (BETA: currently values greater than 2h have no effect)
52+
--ske-custom-endpoint string SKE API base URL, used in calls to this API
53+
--sqlserverflex-custom-endpoint string SQLServer Flex API base URL, used in calls to this API
5354
```
5455

5556
### Options inherited from parent commands

docs/stackit_config_unset.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,32 @@ stackit config unset [flags]
2626
### Options
2727

2828
```
29-
--argus-custom-endpoint Argus API base URL. If unset, uses the default base URL
30-
--async Configuration option to run commands asynchronously
31-
--authorization-custom-endpoint Authorization API base URL. If unset, uses the default base URL
32-
--dns-custom-endpoint DNS API base URL. If unset, uses the default base URL
33-
-h, --help Help for "stackit config unset"
34-
--identity-provider-custom-endpoint Identity Provider base URL. If unset, uses the default base URL
35-
--load-balancer-custom-endpoint Load Balancer API base URL. If unset, uses the default base URL
36-
--logme-custom-endpoint LogMe API base URL. If unset, uses the default base URL
37-
--mariadb-custom-endpoint MariaDB API base URL. If unset, uses the default base URL
38-
--mongodbflex-custom-endpoint MongoDB Flex API base URL. If unset, uses the default base URL
39-
--object-storage-custom-endpoint Object Storage API base URL. If unset, uses the default base URL
40-
--opensearch-custom-endpoint OpenSearch API base URL. If unset, uses the default base URL
41-
--output-format Output format
42-
--postgresflex-custom-endpoint PostgreSQL Flex API base URL. If unset, uses the default base URL
43-
--project-id Project ID
44-
--rabbitmq-custom-endpoint RabbitMQ API base URL. If unset, uses the default base URL
45-
--redis-custom-endpoint Redis API base URL. If unset, uses the default base URL
46-
--resource-manager-custom-endpoint Resource Manager API base URL. If unset, uses the default base URL
47-
--secrets-manager-custom-endpoint Secrets Manager API base URL. If unset, uses the default base URL
48-
--serverbackup-custom-endpoint Server Backup base URL. If unset, uses the default base URL
49-
--service-account-custom-endpoint SKE API base URL. If unset, uses the default base URL
50-
--session-time-limit Maximum time before authentication is required again. If unset, defaults to 2h
51-
--ske-custom-endpoint SKE API base URL. If unset, uses the default base URL
52-
--sqlserverflex-custom-endpoint SQLServer Flex API base URL. If unset, uses the default base URL
53-
--verbosity Verbosity of the CLI
29+
--argus-custom-endpoint Argus API base URL. If unset, uses the default base URL
30+
--async Configuration option to run commands asynchronously
31+
--authorization-custom-endpoint Authorization API base URL. If unset, uses the default base URL
32+
--dns-custom-endpoint DNS API base URL. If unset, uses the default base URL
33+
-h, --help Help for "stackit config unset"
34+
--identity-provider-custom-endpoint Identity Provider base URL. If unset, uses the default base URL
35+
--load-balancer-custom-endpoint Load Balancer API base URL. If unset, uses the default base URL
36+
--logme-custom-endpoint LogMe API base URL. If unset, uses the default base URL
37+
--mariadb-custom-endpoint MariaDB API base URL. If unset, uses the default base URL
38+
--mongodbflex-custom-endpoint MongoDB Flex API base URL. If unset, uses the default base URL
39+
--object-storage-custom-endpoint Object Storage API base URL. If unset, uses the default base URL
40+
--opensearch-custom-endpoint OpenSearch API base URL. If unset, uses the default base URL
41+
--output-format Output format
42+
--postgresflex-custom-endpoint PostgreSQL Flex API base URL. If unset, uses the default base URL
43+
--project-id Project ID
44+
--rabbitmq-custom-endpoint RabbitMQ API base URL. If unset, uses the default base URL
45+
--redis-custom-endpoint Redis API base URL. If unset, uses the default base URL
46+
--resource-manager-custom-endpoint Resource Manager API base URL. If unset, uses the default base URL
47+
--secrets-manager-custom-endpoint Secrets Manager API base URL. If unset, uses the default base URL
48+
--serverbackup-custom-endpoint Server Backup base URL. If unset, uses the default base URL
49+
--service-account-custom-endpoint Service Account API base URL. If unset, uses the default base URL
50+
--service-enablement-custom-endpoint Service Enablement API base URL. If unset, uses the default base URL
51+
--session-time-limit Maximum time before authentication is required again. If unset, defaults to 2h
52+
--ske-custom-endpoint SKE API base URL. If unset, uses the default base URL
53+
--sqlserverflex-custom-endpoint SQLServer Flex API base URL. If unset, uses the default base URL
54+
--verbosity Verbosity of the CLI
5455
```
5556

5657
### Options inherited from parent commands

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ require (
2525
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.8.0
2626
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.1.0
2727
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0
28+
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.2.0
2829
github.com/stackitcloud/stackit-sdk-go/services/ske v0.18.0
2930
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v0.3.0
3031
github.com/zalando/go-keyring v0.2.5

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.1.0 h1:fYCBNvh4t
157157
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.1.0/go.mod h1:ZYI3wj/NnhhWi25ugbdcniwnY/7mF6zN582c5HPe00o=
158158
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0 h1:JB1O0E9+L50ZaO36uz7azurvUuB5JdX5s2ZXuIdb9t8=
159159
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0/go.mod h1:Ni9RBJvcaXRIrDIuQBpJcuQvCQSj27crQSyc+WM4p0c=
160+
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.2.0 h1:HAEFciLgeCY+kIcGcb+/zFUF3zt3z326v6JCen6fSjs=
161+
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v0.2.0/go.mod h1:z6XdA+ndaWzcPW/P0QrUIcTXJzKlajxgGZ5+EwXNS+c=
160162
github.com/stackitcloud/stackit-sdk-go/services/ske v0.18.0 h1:gxbOYBpHBLMuzltbOGz7OwRFtjCZ9X56a2apsPP/8uU=
161163
github.com/stackitcloud/stackit-sdk-go/services/ske v0.18.0/go.mod h1:0fFs4R7kg+gU7FNAIzzFvlCZJz6gyZ8CFhbK3eSrAwQ=
162164
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v0.3.0 h1:M6tcXUMNM6XMfHVQeQzB6IjfPdAxnZar3YD+YstRStc=

internal/cmd/config/set/set.go

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,25 @@ const (
2020
sessionTimeLimitFlag = "session-time-limit"
2121
identityProviderCustomEndpointFlag = "identity-provider-custom-endpoint"
2222

23-
argusCustomEndpointFlag = "argus-custom-endpoint"
24-
authorizationCustomEndpointFlag = "authorization-custom-endpoint"
25-
dnsCustomEndpointFlag = "dns-custom-endpoint"
26-
loadBalancerCustomEndpointFlag = "load-balancer-custom-endpoint"
27-
logMeCustomEndpointFlag = "logme-custom-endpoint"
28-
mariaDBCustomEndpointFlag = "mariadb-custom-endpoint"
29-
mongoDBFlexCustomEndpointFlag = "mongodbflex-custom-endpoint"
30-
objectStorageCustomEndpointFlag = "object-storage-custom-endpoint"
31-
openSearchCustomEndpointFlag = "opensearch-custom-endpoint"
32-
postgresFlexCustomEndpointFlag = "postgresflex-custom-endpoint"
33-
rabbitMQCustomEndpointFlag = "rabbitmq-custom-endpoint"
34-
redisCustomEndpointFlag = "redis-custom-endpoint"
35-
resourceManagerCustomEndpointFlag = "resource-manager-custom-endpoint"
36-
secretsManagerCustomEndpointFlag = "secrets-manager-custom-endpoint"
37-
serverBackupCustomEndpointFlag = "serverbackup-custom-endpoint"
38-
serviceAccountCustomEndpointFlag = "service-account-custom-endpoint"
39-
skeCustomEndpointFlag = "ske-custom-endpoint"
40-
sqlServerFlexCustomEndpointFlag = "sqlserverflex-custom-endpoint"
23+
argusCustomEndpointFlag = "argus-custom-endpoint"
24+
authorizationCustomEndpointFlag = "authorization-custom-endpoint"
25+
dnsCustomEndpointFlag = "dns-custom-endpoint"
26+
loadBalancerCustomEndpointFlag = "load-balancer-custom-endpoint"
27+
logMeCustomEndpointFlag = "logme-custom-endpoint"
28+
mariaDBCustomEndpointFlag = "mariadb-custom-endpoint"
29+
mongoDBFlexCustomEndpointFlag = "mongodbflex-custom-endpoint"
30+
objectStorageCustomEndpointFlag = "object-storage-custom-endpoint"
31+
openSearchCustomEndpointFlag = "opensearch-custom-endpoint"
32+
postgresFlexCustomEndpointFlag = "postgresflex-custom-endpoint"
33+
rabbitMQCustomEndpointFlag = "rabbitmq-custom-endpoint"
34+
redisCustomEndpointFlag = "redis-custom-endpoint"
35+
resourceManagerCustomEndpointFlag = "resource-manager-custom-endpoint"
36+
secretsManagerCustomEndpointFlag = "secrets-manager-custom-endpoint"
37+
serverBackupCustomEndpointFlag = "serverbackup-custom-endpoint"
38+
serviceAccountCustomEndpointFlag = "service-account-custom-endpoint"
39+
serviceEnablementCustomEndpointFlag = "service-enablement-custom-endpoint"
40+
skeCustomEndpointFlag = "ske-custom-endpoint"
41+
sqlServerFlexCustomEndpointFlag = "sqlserverflex-custom-endpoint"
4142
)
4243

4344
type inputModel struct {
@@ -141,6 +142,7 @@ func configureFlags(cmd *cobra.Command) {
141142
cmd.Flags().String(resourceManagerCustomEndpointFlag, "", "Resource Manager API base URL, used in calls to this API")
142143
cmd.Flags().String(secretsManagerCustomEndpointFlag, "", "Secrets Manager API base URL, used in calls to this API")
143144
cmd.Flags().String(serviceAccountCustomEndpointFlag, "", "Service Account API base URL, used in calls to this API")
145+
cmd.Flags().String(serviceEnablementCustomEndpointFlag, "", "Service Enablement API base URL, used in calls to this API")
144146
cmd.Flags().String(serverBackupCustomEndpointFlag, "", "Server Backup API base URL, used in calls to this API")
145147
cmd.Flags().String(skeCustomEndpointFlag, "", "SKE API base URL, used in calls to this API")
146148
cmd.Flags().String(sqlServerFlexCustomEndpointFlag, "", "SQLServer Flex API base URL, used in calls to this API")
@@ -182,6 +184,8 @@ func configureFlags(cmd *cobra.Command) {
182184
cobra.CheckErr(err)
183185
err = viper.BindPFlag(config.ServiceAccountCustomEndpointKey, cmd.Flags().Lookup(serviceAccountCustomEndpointFlag))
184186
cobra.CheckErr(err)
187+
err = viper.BindPFlag(config.ServiceEnablementCustomEndpointKey, cmd.Flags().Lookup(serviceEnablementCustomEndpointFlag))
188+
cobra.CheckErr(err)
185189
err = viper.BindPFlag(config.SKECustomEndpointKey, cmd.Flags().Lookup(skeCustomEndpointFlag))
186190
cobra.CheckErr(err)
187191
err = viper.BindPFlag(config.SQLServerFlexCustomEndpointKey, cmd.Flags().Lookup(sqlServerFlexCustomEndpointFlag))

0 commit comments

Comments
 (0)