diff --git a/internal/cmd/argus/credentials/list/list.go b/internal/cmd/argus/credentials/list/list.go index 299f8e49..795b4278 100644 --- a/internal/cmd/argus/credentials/list/list.go +++ b/internal/cmd/argus/credentials/list/list.go @@ -134,7 +134,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []argus.Ser return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus credentials list: %w", err) } diff --git a/internal/cmd/argus/grafana/describe/describe.go b/internal/cmd/argus/grafana/describe/describe.go index b689f65f..4c8f930b 100644 --- a/internal/cmd/argus/grafana/describe/describe.go +++ b/internal/cmd/argus/grafana/describe/describe.go @@ -135,7 +135,7 @@ func outputResult(p *print.Printer, inputModel *inputModel, grafanaConfigs *argu return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(grafanaConfigs) + details, err := yaml.MarshalWithOptions(grafanaConfigs, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Grafana configs: %w", err) } diff --git a/internal/cmd/argus/instance/create/create.go b/internal/cmd/argus/instance/create/create.go index a6426faf..b37396bb 100644 --- a/internal/cmd/argus/instance/create/create.go +++ b/internal/cmd/argus/instance/create/create.go @@ -210,7 +210,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus instance: %w", err) } diff --git a/internal/cmd/argus/instance/describe/describe.go b/internal/cmd/argus/instance/describe/describe.go index 4297be6b..c6e8bc19 100644 --- a/internal/cmd/argus/instance/describe/describe.go +++ b/internal/cmd/argus/instance/describe/describe.go @@ -108,7 +108,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *argus.GetInst return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus instance: %w", err) } diff --git a/internal/cmd/argus/instance/list/list.go b/internal/cmd/argus/instance/list/list.go index cc2642b4..98a8e74d 100644 --- a/internal/cmd/argus/instance/list/list.go +++ b/internal/cmd/argus/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []argus.Proje return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus instance list: %w", err) } diff --git a/internal/cmd/argus/plans/plans.go b/internal/cmd/argus/plans/plans.go index 8ebf57fd..a8080017 100644 --- a/internal/cmd/argus/plans/plans.go +++ b/internal/cmd/argus/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []argus.Plan) err return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus plans: %w", err) } diff --git a/internal/cmd/argus/scrape-config/describe/describe.go b/internal/cmd/argus/scrape-config/describe/describe.go index 269c5830..2b9d1fb9 100644 --- a/internal/cmd/argus/scrape-config/describe/describe.go +++ b/internal/cmd/argus/scrape-config/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, config *argus.Job) erro return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(config) + details, err := yaml.MarshalWithOptions(config, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal scrape configuration: %w", err) } diff --git a/internal/cmd/argus/scrape-config/list/list.go b/internal/cmd/argus/scrape-config/list/list.go index 3ed92968..60f6598a 100644 --- a/internal/cmd/argus/scrape-config/list/list.go +++ b/internal/cmd/argus/scrape-config/list/list.go @@ -137,7 +137,7 @@ func outputResult(p *print.Printer, outputFormat string, configs []argus.Job) er return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(configs) + details, err := yaml.MarshalWithOptions(configs, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal scrape configurations list: %w", err) } diff --git a/internal/cmd/config/list/list.go b/internal/cmd/config/list/list.go index dde7ff87..560e1dd8 100644 --- a/internal/cmd/config/list/list.go +++ b/internal/cmd/config/list/list.go @@ -75,7 +75,7 @@ func outputResult(p *print.Printer, outputFormat string, configData map[string]a p.Outputln(string(details)) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(configData) + details, err := yaml.MarshalWithOptions(configData, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal config list: %w", err) } diff --git a/internal/cmd/dns/record-set/create/create.go b/internal/cmd/dns/record-set/create/create.go index af74b704..a6beefdc 100644 --- a/internal/cmd/dns/record-set/create/create.go +++ b/internal/cmd/dns/record-set/create/create.go @@ -177,7 +177,7 @@ func outputResult(p *print.Printer, model *inputModel, zoneLabel string, resp *d return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS record-set: %w", err) } diff --git a/internal/cmd/dns/record-set/describe/describe.go b/internal/cmd/dns/record-set/describe/describe.go index 5f02a6d8..221729d9 100644 --- a/internal/cmd/dns/record-set/describe/describe.go +++ b/internal/cmd/dns/record-set/describe/describe.go @@ -124,7 +124,7 @@ func outputResult(p *print.Printer, outputFormat string, recordSet *dns.RecordSe return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(recordSet) + details, err := yaml.MarshalWithOptions(recordSet, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS record set: %w", err) } diff --git a/internal/cmd/dns/record-set/list/list.go b/internal/cmd/dns/record-set/list/list.go index 4cdf30f4..a3a84283 100644 --- a/internal/cmd/dns/record-set/list/list.go +++ b/internal/cmd/dns/record-set/list/list.go @@ -245,7 +245,7 @@ func outputResult(p *print.Printer, outputFormat string, recordSets []dns.Record return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(recordSets) + details, err := yaml.MarshalWithOptions(recordSets, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS record set list: %w", err) } diff --git a/internal/cmd/dns/zone/create/create.go b/internal/cmd/dns/zone/create/create.go index a9a88a7d..95507e40 100644 --- a/internal/cmd/dns/zone/create/create.go +++ b/internal/cmd/dns/zone/create/create.go @@ -206,7 +206,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS zone: %w", err) } diff --git a/internal/cmd/dns/zone/describe/describe.go b/internal/cmd/dns/zone/describe/describe.go index b56deddb..578dee03 100644 --- a/internal/cmd/dns/zone/describe/describe.go +++ b/internal/cmd/dns/zone/describe/describe.go @@ -109,7 +109,7 @@ func outputResult(p *print.Printer, outputFormat string, zone *dns.Zone) error { return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(zone) + details, err := yaml.MarshalWithOptions(zone, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS zone: %w", err) } diff --git a/internal/cmd/dns/zone/list/list.go b/internal/cmd/dns/zone/list/list.go index 58334870..49e23a0b 100644 --- a/internal/cmd/dns/zone/list/list.go +++ b/internal/cmd/dns/zone/list/list.go @@ -234,7 +234,7 @@ func outputResult(p *print.Printer, outputFormat string, zones []dns.Zone) error return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(zones) + details, err := yaml.MarshalWithOptions(zones, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal DNS zone list: %w", err) } diff --git a/internal/cmd/load-balancer/describe/describe.go b/internal/cmd/load-balancer/describe/describe.go index 1d6de5ab..d5cf4dec 100644 --- a/internal/cmd/load-balancer/describe/describe.go +++ b/internal/cmd/load-balancer/describe/describe.go @@ -108,7 +108,7 @@ func outputResult(p *print.Printer, outputFormat string, loadBalancer *loadbalan return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(loadBalancer) + details, err := yaml.MarshalWithOptions(loadBalancer, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal load balancer: %w", err) } diff --git a/internal/cmd/load-balancer/list/list.go b/internal/cmd/load-balancer/list/list.go index 92727e8d..a82a0384 100644 --- a/internal/cmd/load-balancer/list/list.go +++ b/internal/cmd/load-balancer/list/list.go @@ -141,7 +141,7 @@ func outputResult(p *print.Printer, outputFormat string, loadBalancers []loadbal return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(loadBalancers) + details, err := yaml.MarshalWithOptions(loadBalancers, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal load balancer list: %w", err) } diff --git a/internal/cmd/load-balancer/observability-credentials/add/add.go b/internal/cmd/load-balancer/observability-credentials/add/add.go index 60253c7f..b1213eef 100644 --- a/internal/cmd/load-balancer/observability-credentials/add/add.go +++ b/internal/cmd/load-balancer/observability-credentials/add/add.go @@ -159,7 +159,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Load Balancer observability credentials: %w", err) } diff --git a/internal/cmd/load-balancer/observability-credentials/describe/describe.go b/internal/cmd/load-balancer/observability-credentials/describe/describe.go index e6782269..27d27caf 100644 --- a/internal/cmd/load-balancer/observability-credentials/describe/describe.go +++ b/internal/cmd/load-balancer/observability-credentials/describe/describe.go @@ -105,7 +105,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *loadbalanc return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Load Balancer observability credentials: %w", err) } diff --git a/internal/cmd/load-balancer/observability-credentials/list/list.go b/internal/cmd/load-balancer/observability-credentials/list/list.go index 2158112e..226d9f06 100644 --- a/internal/cmd/load-balancer/observability-credentials/list/list.go +++ b/internal/cmd/load-balancer/observability-credentials/list/list.go @@ -177,7 +177,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []loadbalan return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Load Balancer observability credentials list: %w", err) } diff --git a/internal/cmd/load-balancer/quota/quota.go b/internal/cmd/load-balancer/quota/quota.go index f2c95335..593e117b 100644 --- a/internal/cmd/load-balancer/quota/quota.go +++ b/internal/cmd/load-balancer/quota/quota.go @@ -98,7 +98,7 @@ func outputResult(p *print.Printer, outputFormat string, quota *loadbalancer.Get return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(quota) + details, err := yaml.MarshalWithOptions(quota, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal quota: %w", err) } diff --git a/internal/cmd/load-balancer/target-pool/describe/describe.go b/internal/cmd/load-balancer/target-pool/describe/describe.go index b4a2da47..e3e5921f 100644 --- a/internal/cmd/load-balancer/target-pool/describe/describe.go +++ b/internal/cmd/load-balancer/target-pool/describe/describe.go @@ -138,7 +138,7 @@ func outputResult(p *print.Printer, outputFormat string, targetPool loadbalancer return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(output) + details, err := yaml.MarshalWithOptions(output, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal load balancer: %w", err) } diff --git a/internal/cmd/logme/credentials/create/create.go b/internal/cmd/logme/credentials/create/create.go index 53181d32..76b3b14f 100644 --- a/internal/cmd/logme/credentials/create/create.go +++ b/internal/cmd/logme/credentials/create/create.go @@ -136,7 +136,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe credentials: %w", err) } diff --git a/internal/cmd/logme/credentials/describe/describe.go b/internal/cmd/logme/credentials/describe/describe.go index 384370ca..e2b7551a 100644 --- a/internal/cmd/logme/credentials/describe/describe.go +++ b/internal/cmd/logme/credentials/describe/describe.go @@ -122,7 +122,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *logme.Cred return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe credentials: %w", err) } diff --git a/internal/cmd/logme/credentials/list/list.go b/internal/cmd/logme/credentials/list/list.go index 87a87f06..653902d5 100644 --- a/internal/cmd/logme/credentials/list/list.go +++ b/internal/cmd/logme/credentials/list/list.go @@ -145,7 +145,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []logme.Cre return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe credentials list: %w", err) } diff --git a/internal/cmd/logme/instance/create/create.go b/internal/cmd/logme/instance/create/create.go index 7db6945c..7e2b15e2 100644 --- a/internal/cmd/logme/instance/create/create.go +++ b/internal/cmd/logme/instance/create/create.go @@ -262,7 +262,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe instance: %w", err) } diff --git a/internal/cmd/logme/instance/describe/describe.go b/internal/cmd/logme/instance/describe/describe.go index ee258cda..9e477f16 100644 --- a/internal/cmd/logme/instance/describe/describe.go +++ b/internal/cmd/logme/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *logme.Instanc return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe instance: %w", err) } diff --git a/internal/cmd/logme/instance/list/list.go b/internal/cmd/logme/instance/list/list.go index 278f2ecb..24e3cf99 100644 --- a/internal/cmd/logme/instance/list/list.go +++ b/internal/cmd/logme/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []logme.Insta return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe instance list: %w", err) } diff --git a/internal/cmd/logme/plans/plans.go b/internal/cmd/logme/plans/plans.go index e9424caa..dfa14ed0 100644 --- a/internal/cmd/logme/plans/plans.go +++ b/internal/cmd/logme/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []logme.Offering) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal LogMe plans: %w", err) } diff --git a/internal/cmd/mariadb/credentials/create/create.go b/internal/cmd/mariadb/credentials/create/create.go index 153bff36..4373782e 100644 --- a/internal/cmd/mariadb/credentials/create/create.go +++ b/internal/cmd/mariadb/credentials/create/create.go @@ -137,7 +137,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Argus credentials list: %w", err) } diff --git a/internal/cmd/mariadb/credentials/describe/describe.go b/internal/cmd/mariadb/credentials/describe/describe.go index 2a9af74c..ae5eeece 100644 --- a/internal/cmd/mariadb/credentials/describe/describe.go +++ b/internal/cmd/mariadb/credentials/describe/describe.go @@ -122,7 +122,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *mariadb.Cr return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB credentials: %w", err) } diff --git a/internal/cmd/mariadb/credentials/list/list.go b/internal/cmd/mariadb/credentials/list/list.go index 338f815c..75a43880 100644 --- a/internal/cmd/mariadb/credentials/list/list.go +++ b/internal/cmd/mariadb/credentials/list/list.go @@ -145,7 +145,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []mariadb.C return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB credentials list: %w", err) } diff --git a/internal/cmd/mariadb/instance/create/create.go b/internal/cmd/mariadb/instance/create/create.go index 33ee3945..754b50fc 100644 --- a/internal/cmd/mariadb/instance/create/create.go +++ b/internal/cmd/mariadb/instance/create/create.go @@ -262,7 +262,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB instance: %w", err) } diff --git a/internal/cmd/mariadb/instance/describe/describe.go b/internal/cmd/mariadb/instance/describe/describe.go index 8b515764..94323bc5 100644 --- a/internal/cmd/mariadb/instance/describe/describe.go +++ b/internal/cmd/mariadb/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *mariadb.Insta return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB instance: %w", err) } diff --git a/internal/cmd/mariadb/instance/list/list.go b/internal/cmd/mariadb/instance/list/list.go index b940ac9e..4a3b3167 100644 --- a/internal/cmd/mariadb/instance/list/list.go +++ b/internal/cmd/mariadb/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []mariadb.Ins return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB instance list: %w", err) } diff --git a/internal/cmd/mariadb/plans/plans.go b/internal/cmd/mariadb/plans/plans.go index 719a6091..4fb14c3c 100644 --- a/internal/cmd/mariadb/plans/plans.go +++ b/internal/cmd/mariadb/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []mariadb.Offerin return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MariaDB plans: %w", err) } diff --git a/internal/cmd/mongodbflex/backup/describe/describe.go b/internal/cmd/mongodbflex/backup/describe/describe.go index 7baa58b2..6488c6ee 100644 --- a/internal/cmd/mongodbflex/backup/describe/describe.go +++ b/internal/cmd/mongodbflex/backup/describe/describe.go @@ -136,7 +136,7 @@ func outputResult(p *print.Printer, cmd *cobra.Command, outputFormat, restoreSta return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(backup) + details, err := yaml.MarshalWithOptions(backup, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex backup: %w", err) } diff --git a/internal/cmd/mongodbflex/backup/list/list.go b/internal/cmd/mongodbflex/backup/list/list.go index 7dcba1bf..f1a26ce7 100644 --- a/internal/cmd/mongodbflex/backup/list/list.go +++ b/internal/cmd/mongodbflex/backup/list/list.go @@ -155,7 +155,7 @@ func outputResult(p *print.Printer, outputFormat string, backups []mongodbflex.B return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(backups) + details, err := yaml.MarshalWithOptions(backups, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex backups list: %w", err) } diff --git a/internal/cmd/mongodbflex/backup/restore-jobs/restore_jobs.go b/internal/cmd/mongodbflex/backup/restore-jobs/restore_jobs.go index c9601df9..5d5d0cad 100644 --- a/internal/cmd/mongodbflex/backup/restore-jobs/restore_jobs.go +++ b/internal/cmd/mongodbflex/backup/restore-jobs/restore_jobs.go @@ -149,7 +149,7 @@ func outputResult(p *print.Printer, outputFormat string, restoreJobs []mongodbfl return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(restoreJobs) + details, err := yaml.MarshalWithOptions(restoreJobs, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex restore jobs list: %w", err) } diff --git a/internal/cmd/mongodbflex/backup/schedule/schedule.go b/internal/cmd/mongodbflex/backup/schedule/schedule.go index 58e120c8..ffd84ca3 100644 --- a/internal/cmd/mongodbflex/backup/schedule/schedule.go +++ b/internal/cmd/mongodbflex/backup/schedule/schedule.go @@ -130,7 +130,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *mongodbflex.I return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(output) + details, err := yaml.MarshalWithOptions(output, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex backup schedule: %w", err) } diff --git a/internal/cmd/mongodbflex/instance/create/create.go b/internal/cmd/mongodbflex/instance/create/create.go index 68e0f459..607774a0 100644 --- a/internal/cmd/mongodbflex/instance/create/create.go +++ b/internal/cmd/mongodbflex/instance/create/create.go @@ -284,7 +284,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDBFlex instance: %w", err) } diff --git a/internal/cmd/mongodbflex/instance/describe/describe.go b/internal/cmd/mongodbflex/instance/describe/describe.go index 5616cc2e..1d1bacb9 100644 --- a/internal/cmd/mongodbflex/instance/describe/describe.go +++ b/internal/cmd/mongodbflex/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *mongodbflex.I return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex instance: %w", err) } diff --git a/internal/cmd/mongodbflex/instance/list/list.go b/internal/cmd/mongodbflex/instance/list/list.go index a9cffa92..443c7ef0 100644 --- a/internal/cmd/mongodbflex/instance/list/list.go +++ b/internal/cmd/mongodbflex/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []mongodbflex return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex instance list: %w", err) } diff --git a/internal/cmd/mongodbflex/instance/update/update.go b/internal/cmd/mongodbflex/instance/update/update.go index 31758799..bc3dba63 100644 --- a/internal/cmd/mongodbflex/instance/update/update.go +++ b/internal/cmd/mongodbflex/instance/update/update.go @@ -318,7 +318,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal update MongoDBFlex instance: %w", err) } diff --git a/internal/cmd/mongodbflex/options/options.go b/internal/cmd/mongodbflex/options/options.go index 0e6b571f..2480e5b1 100644 --- a/internal/cmd/mongodbflex/options/options.go +++ b/internal/cmd/mongodbflex/options/options.go @@ -193,7 +193,7 @@ func outputResult(p *print.Printer, model *inputModel, flavors *mongodbflex.List p.Outputln(string(details)) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(options) + details, err := yaml.MarshalWithOptions(options, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex options: %w", err) } diff --git a/internal/cmd/mongodbflex/user/create/create.go b/internal/cmd/mongodbflex/user/create/create.go index 1a985da5..8e8b743c 100644 --- a/internal/cmd/mongodbflex/user/create/create.go +++ b/internal/cmd/mongodbflex/user/create/create.go @@ -159,7 +159,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, use return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex user: %w", err) } diff --git a/internal/cmd/mongodbflex/user/describe/describe.go b/internal/cmd/mongodbflex/user/describe/describe.go index 7c4ea110..55d0e4f0 100644 --- a/internal/cmd/mongodbflex/user/describe/describe.go +++ b/internal/cmd/mongodbflex/user/describe/describe.go @@ -128,7 +128,7 @@ func outputResult(p *print.Printer, outputFormat string, user mongodbflex.Instan return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex user: %w", err) } diff --git a/internal/cmd/mongodbflex/user/list/list.go b/internal/cmd/mongodbflex/user/list/list.go index cfb35989..ada4d0f6 100644 --- a/internal/cmd/mongodbflex/user/list/list.go +++ b/internal/cmd/mongodbflex/user/list/list.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, outputFormat string, users []mongodbflex.Lis return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(users) + details, err := yaml.MarshalWithOptions(users, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex user list: %w", err) } diff --git a/internal/cmd/mongodbflex/user/reset-password/reset_password.go b/internal/cmd/mongodbflex/user/reset-password/reset_password.go index 12f194b5..665ad9b8 100644 --- a/internal/cmd/mongodbflex/user/reset-password/reset_password.go +++ b/internal/cmd/mongodbflex/user/reset-password/reset_password.go @@ -144,7 +144,7 @@ func outputResult(p *print.Printer, model *inputModel, userLabel, instanceLabel return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal MongoDB Flex reset password: %w", err) } diff --git a/internal/cmd/object-storage/bucket/create/create.go b/internal/cmd/object-storage/bucket/create/create.go index d719ee97..5d145819 100644 --- a/internal/cmd/object-storage/bucket/create/create.go +++ b/internal/cmd/object-storage/bucket/create/create.go @@ -125,7 +125,7 @@ func outputResult(p *print.Printer, model *inputModel, resp *objectstorage.Creat return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage bucket: %w", err) } diff --git a/internal/cmd/object-storage/bucket/describe/describe.go b/internal/cmd/object-storage/bucket/describe/describe.go index 9b9a529b..4196de7b 100644 --- a/internal/cmd/object-storage/bucket/describe/describe.go +++ b/internal/cmd/object-storage/bucket/describe/describe.go @@ -107,7 +107,7 @@ func outputResult(p *print.Printer, outputFormat string, bucket *objectstorage.B return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(bucket) + details, err := yaml.MarshalWithOptions(bucket, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage bucket: %w", err) } diff --git a/internal/cmd/object-storage/bucket/list/list.go b/internal/cmd/object-storage/bucket/list/list.go index 771016e2..13367f03 100644 --- a/internal/cmd/object-storage/bucket/list/list.go +++ b/internal/cmd/object-storage/bucket/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, buckets []objectstorage return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(buckets) + details, err := yaml.MarshalWithOptions(buckets, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage bucket list: %w", err) } diff --git a/internal/cmd/object-storage/credentials-group/create/create.go b/internal/cmd/object-storage/credentials-group/create/create.go index 370b4350..d7399e50 100644 --- a/internal/cmd/object-storage/credentials-group/create/create.go +++ b/internal/cmd/object-storage/credentials-group/create/create.go @@ -123,7 +123,7 @@ func outputResult(p *print.Printer, model *inputModel, resp *objectstorage.Creat return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage credentials group: %w", err) } diff --git a/internal/cmd/object-storage/credentials-group/list/list.go b/internal/cmd/object-storage/credentials-group/list/list.go index c3b90e38..073a88a9 100644 --- a/internal/cmd/object-storage/credentials-group/list/list.go +++ b/internal/cmd/object-storage/credentials-group/list/list.go @@ -132,7 +132,7 @@ func outputResult(p *print.Printer, outputFormat string, credentialsGroups []obj return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentialsGroups) + details, err := yaml.MarshalWithOptions(credentialsGroups, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage credentials group list: %w", err) } diff --git a/internal/cmd/object-storage/credentials/create/create.go b/internal/cmd/object-storage/credentials/create/create.go index f92004b9..2d9387cc 100644 --- a/internal/cmd/object-storage/credentials/create/create.go +++ b/internal/cmd/object-storage/credentials/create/create.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, model *inputModel, credentialsGroupLabel str return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage credentials: %w", err) } diff --git a/internal/cmd/object-storage/credentials/list/list.go b/internal/cmd/object-storage/credentials/list/list.go index c7c8d529..3814a046 100644 --- a/internal/cmd/object-storage/credentials/list/list.go +++ b/internal/cmd/object-storage/credentials/list/list.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []objectsto return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Object Storage credentials list: %w", err) } diff --git a/internal/cmd/opensearch/credentials/create/create.go b/internal/cmd/opensearch/credentials/create/create.go index 636488d4..eebf71bb 100644 --- a/internal/cmd/opensearch/credentials/create/create.go +++ b/internal/cmd/opensearch/credentials/create/create.go @@ -137,7 +137,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch credentials: %w", err) } diff --git a/internal/cmd/opensearch/credentials/describe/describe.go b/internal/cmd/opensearch/credentials/describe/describe.go index 0e1c7547..596ffc3e 100644 --- a/internal/cmd/opensearch/credentials/describe/describe.go +++ b/internal/cmd/opensearch/credentials/describe/describe.go @@ -122,7 +122,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *opensearch return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch credentials: %w", err) } diff --git a/internal/cmd/opensearch/credentials/list/list.go b/internal/cmd/opensearch/credentials/list/list.go index 9c76251f..e4baea08 100644 --- a/internal/cmd/opensearch/credentials/list/list.go +++ b/internal/cmd/opensearch/credentials/list/list.go @@ -145,7 +145,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []opensearc return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch credentials list: %w", err) } diff --git a/internal/cmd/opensearch/instance/create/create.go b/internal/cmd/opensearch/instance/create/create.go index 7e9038a2..0433ce41 100644 --- a/internal/cmd/opensearch/instance/create/create.go +++ b/internal/cmd/opensearch/instance/create/create.go @@ -267,7 +267,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch instance: %w", err) } diff --git a/internal/cmd/opensearch/instance/describe/describe.go b/internal/cmd/opensearch/instance/describe/describe.go index 27cdbfe9..b1f06faf 100644 --- a/internal/cmd/opensearch/instance/describe/describe.go +++ b/internal/cmd/opensearch/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *opensearch.In return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch instance: %w", err) } diff --git a/internal/cmd/opensearch/instance/list/list.go b/internal/cmd/opensearch/instance/list/list.go index 59c6e011..a08b7ed1 100644 --- a/internal/cmd/opensearch/instance/list/list.go +++ b/internal/cmd/opensearch/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []opensearch. return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch instance list: %w", err) } diff --git a/internal/cmd/opensearch/plans/plans.go b/internal/cmd/opensearch/plans/plans.go index 7aef92ca..6f8a4ab7 100644 --- a/internal/cmd/opensearch/plans/plans.go +++ b/internal/cmd/opensearch/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []opensearch.Offe return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal OpenSearch plans: %w", err) } diff --git a/internal/cmd/organization/member/list/list.go b/internal/cmd/organization/member/list/list.go index 995bdc06..8b68411c 100644 --- a/internal/cmd/organization/member/list/list.go +++ b/internal/cmd/organization/member/list/list.go @@ -167,7 +167,7 @@ func outputResult(p *print.Printer, model *inputModel, members []authorization.M return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(members) + details, err := yaml.MarshalWithOptions(members, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal members: %w", err) } diff --git a/internal/cmd/organization/role/list/list.go b/internal/cmd/organization/role/list/list.go index c07ecd4e..68352bff 100644 --- a/internal/cmd/organization/role/list/list.go +++ b/internal/cmd/organization/role/list/list.go @@ -140,7 +140,7 @@ func outputRolesResult(p *print.Printer, outputFormat string, roles []authorizat return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(roles) + details, err := yaml.MarshalWithOptions(roles, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal roles: %w", err) } diff --git a/internal/cmd/postgresflex/backup/describe/describe.go b/internal/cmd/postgresflex/backup/describe/describe.go index 580817c5..9e306e2b 100644 --- a/internal/cmd/postgresflex/backup/describe/describe.go +++ b/internal/cmd/postgresflex/backup/describe/describe.go @@ -124,7 +124,7 @@ func outputResult(p *print.Printer, cmd *cobra.Command, outputFormat string, bac return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(backup) + details, err := yaml.MarshalWithOptions(backup, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal backup for PostgreSQL Flex backup: %w", err) } diff --git a/internal/cmd/postgresflex/backup/list/list.go b/internal/cmd/postgresflex/backup/list/list.go index 4dfea3f4..0ed9a515 100644 --- a/internal/cmd/postgresflex/backup/list/list.go +++ b/internal/cmd/postgresflex/backup/list/list.go @@ -144,7 +144,7 @@ func outputResult(p *print.Printer, outputFormat string, backups []postgresflex. return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(backups) + details, err := yaml.MarshalWithOptions(backups, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex backup list: %w", err) } diff --git a/internal/cmd/postgresflex/instance/clone/clone.go b/internal/cmd/postgresflex/instance/clone/clone.go index 8ef0778b..b9d10e78 100644 --- a/internal/cmd/postgresflex/instance/clone/clone.go +++ b/internal/cmd/postgresflex/instance/clone/clone.go @@ -216,7 +216,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgresFlex instance clone: %w", err) } diff --git a/internal/cmd/postgresflex/instance/create/create.go b/internal/cmd/postgresflex/instance/create/create.go index 9c33194f..ed7cec87 100644 --- a/internal/cmd/postgresflex/instance/create/create.go +++ b/internal/cmd/postgresflex/instance/create/create.go @@ -284,7 +284,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgresFlex instance: %w", err) } diff --git a/internal/cmd/postgresflex/instance/describe/describe.go b/internal/cmd/postgresflex/instance/describe/describe.go index bcea7509..b47dbc02 100644 --- a/internal/cmd/postgresflex/instance/describe/describe.go +++ b/internal/cmd/postgresflex/instance/describe/describe.go @@ -112,7 +112,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *postgresflex. return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex instance: %w", err) } diff --git a/internal/cmd/postgresflex/instance/list/list.go b/internal/cmd/postgresflex/instance/list/list.go index 4215fab5..3759061e 100644 --- a/internal/cmd/postgresflex/instance/list/list.go +++ b/internal/cmd/postgresflex/instance/list/list.go @@ -142,7 +142,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []postgresfle return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex instance list: %w", err) } diff --git a/internal/cmd/postgresflex/instance/update/update.go b/internal/cmd/postgresflex/instance/update/update.go index 2b79cad9..975c7c86 100644 --- a/internal/cmd/postgresflex/instance/update/update.go +++ b/internal/cmd/postgresflex/instance/update/update.go @@ -318,7 +318,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgresFlex instance: %w", err) } diff --git a/internal/cmd/postgresflex/options/options.go b/internal/cmd/postgresflex/options/options.go index 2280af78..ba94aea0 100644 --- a/internal/cmd/postgresflex/options/options.go +++ b/internal/cmd/postgresflex/options/options.go @@ -193,7 +193,7 @@ func outputResult(p *print.Printer, model *inputModel, flavors *postgresflex.Lis p.Outputln(string(details)) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(options) + details, err := yaml.MarshalWithOptions(options, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex options: %w", err) } diff --git a/internal/cmd/postgresflex/user/create/create.go b/internal/cmd/postgresflex/user/create/create.go index 5cd2e94b..6a0d1f10 100644 --- a/internal/cmd/postgresflex/user/create/create.go +++ b/internal/cmd/postgresflex/user/create/create.go @@ -154,7 +154,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgresFlex user: %w", err) } diff --git a/internal/cmd/postgresflex/user/describe/describe.go b/internal/cmd/postgresflex/user/describe/describe.go index e68f8fdd..8f177aa1 100644 --- a/internal/cmd/postgresflex/user/describe/describe.go +++ b/internal/cmd/postgresflex/user/describe/describe.go @@ -127,7 +127,7 @@ func outputResult(p *print.Printer, outputFormat string, user postgresflex.UserR return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex user: %w", err) } diff --git a/internal/cmd/postgresflex/user/list/list.go b/internal/cmd/postgresflex/user/list/list.go index d27e74a1..62e35433 100644 --- a/internal/cmd/postgresflex/user/list/list.go +++ b/internal/cmd/postgresflex/user/list/list.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, outputFormat string, users []postgresflex.Li return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(users) + details, err := yaml.MarshalWithOptions(users, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgreSQL Flex user list: %w", err) } diff --git a/internal/cmd/postgresflex/user/reset-password/reset_password.go b/internal/cmd/postgresflex/user/reset-password/reset_password.go index 79e91b05..77c88118 100644 --- a/internal/cmd/postgresflex/user/reset-password/reset_password.go +++ b/internal/cmd/postgresflex/user/reset-password/reset_password.go @@ -143,7 +143,7 @@ func outputResult(p *print.Printer, model *inputModel, userLabel, instanceLabel return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal PostgresFlex user: %w", err) } diff --git a/internal/cmd/project/create/create.go b/internal/cmd/project/create/create.go index 3e7502eb..59b47858 100644 --- a/internal/cmd/project/create/create.go +++ b/internal/cmd/project/create/create.go @@ -200,7 +200,7 @@ func outputResult(p *print.Printer, model *inputModel, resp *resourcemanager.Pro return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal project: %w", err) } diff --git a/internal/cmd/project/describe/describe.go b/internal/cmd/project/describe/describe.go index 8d97a035..9047fec7 100644 --- a/internal/cmd/project/describe/describe.go +++ b/internal/cmd/project/describe/describe.go @@ -129,7 +129,7 @@ func outputResult(p *print.Printer, outputFormat string, project *resourcemanage return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(project) + details, err := yaml.MarshalWithOptions(project, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal project details: %w", err) } diff --git a/internal/cmd/project/list/list.go b/internal/cmd/project/list/list.go index dfcff75a..73b5bdd9 100644 --- a/internal/cmd/project/list/list.go +++ b/internal/cmd/project/list/list.go @@ -230,7 +230,7 @@ func outputResult(p *print.Printer, outputFormat string, projects []resourcemana return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(projects) + details, err := yaml.MarshalWithOptions(projects, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal projects list: %w", err) } diff --git a/internal/cmd/project/member/list/list.go b/internal/cmd/project/member/list/list.go index ea0078c1..6171a0b4 100644 --- a/internal/cmd/project/member/list/list.go +++ b/internal/cmd/project/member/list/list.go @@ -169,7 +169,7 @@ func outputResult(p *print.Printer, model *inputModel, members []authorization.M return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(members) + details, err := yaml.MarshalWithOptions(members, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal members: %w", err) } diff --git a/internal/cmd/project/role/list/list.go b/internal/cmd/project/role/list/list.go index 6ac1b388..b00c10b4 100644 --- a/internal/cmd/project/role/list/list.go +++ b/internal/cmd/project/role/list/list.go @@ -142,7 +142,7 @@ func outputRolesResult(p *print.Printer, outputFormat string, roles []authorizat return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(roles) + details, err := yaml.MarshalWithOptions(roles, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal roles: %w", err) } diff --git a/internal/cmd/rabbitmq/credentials/create/create.go b/internal/cmd/rabbitmq/credentials/create/create.go index eb1f8cab..bed0dafd 100644 --- a/internal/cmd/rabbitmq/credentials/create/create.go +++ b/internal/cmd/rabbitmq/credentials/create/create.go @@ -136,7 +136,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ credentials: %w", err) } diff --git a/internal/cmd/rabbitmq/credentials/describe/describe.go b/internal/cmd/rabbitmq/credentials/describe/describe.go index b57b7b38..175488d1 100644 --- a/internal/cmd/rabbitmq/credentials/describe/describe.go +++ b/internal/cmd/rabbitmq/credentials/describe/describe.go @@ -122,7 +122,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *rabbitmq.C return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ credentials: %w", err) } diff --git a/internal/cmd/rabbitmq/credentials/list/list.go b/internal/cmd/rabbitmq/credentials/list/list.go index d37c1232..54140ec8 100644 --- a/internal/cmd/rabbitmq/credentials/list/list.go +++ b/internal/cmd/rabbitmq/credentials/list/list.go @@ -145,7 +145,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []rabbitmq. return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ credentials list: %w", err) } diff --git a/internal/cmd/rabbitmq/instance/create/create.go b/internal/cmd/rabbitmq/instance/create/create.go index 9ef81825..464f587b 100644 --- a/internal/cmd/rabbitmq/instance/create/create.go +++ b/internal/cmd/rabbitmq/instance/create/create.go @@ -267,7 +267,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ instance: %w", err) } diff --git a/internal/cmd/rabbitmq/instance/describe/describe.go b/internal/cmd/rabbitmq/instance/describe/describe.go index d5cbd62e..4aeb8fdf 100644 --- a/internal/cmd/rabbitmq/instance/describe/describe.go +++ b/internal/cmd/rabbitmq/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *rabbitmq.Inst return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ instance: %w", err) } diff --git a/internal/cmd/rabbitmq/instance/list/list.go b/internal/cmd/rabbitmq/instance/list/list.go index 019569d6..b09ebd08 100644 --- a/internal/cmd/rabbitmq/instance/list/list.go +++ b/internal/cmd/rabbitmq/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []rabbitmq.In return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ instance list: %w", err) } diff --git a/internal/cmd/rabbitmq/plans/plans.go b/internal/cmd/rabbitmq/plans/plans.go index ad5d9ead..ad19ecf1 100644 --- a/internal/cmd/rabbitmq/plans/plans.go +++ b/internal/cmd/rabbitmq/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []rabbitmq.Offeri return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal RabbitMQ plans: %w", err) } diff --git a/internal/cmd/redis/credentials/create/create.go b/internal/cmd/redis/credentials/create/create.go index 0f326d93..7906c288 100644 --- a/internal/cmd/redis/credentials/create/create.go +++ b/internal/cmd/redis/credentials/create/create.go @@ -138,7 +138,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis credentials: %w", err) } diff --git a/internal/cmd/redis/credentials/describe/describe.go b/internal/cmd/redis/credentials/describe/describe.go index e1bdb527..48ec11a7 100644 --- a/internal/cmd/redis/credentials/describe/describe.go +++ b/internal/cmd/redis/credentials/describe/describe.go @@ -122,7 +122,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *redis.Cred return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis credentials: %w", err) } diff --git a/internal/cmd/redis/credentials/list/list.go b/internal/cmd/redis/credentials/list/list.go index 27bf28fc..b701a03d 100644 --- a/internal/cmd/redis/credentials/list/list.go +++ b/internal/cmd/redis/credentials/list/list.go @@ -145,7 +145,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials []redis.Cre return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis credentials list: %w", err) } diff --git a/internal/cmd/redis/instance/create/create.go b/internal/cmd/redis/instance/create/create.go index 6f60651f..cd71a84a 100644 --- a/internal/cmd/redis/instance/create/create.go +++ b/internal/cmd/redis/instance/create/create.go @@ -262,7 +262,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis instance: %w", err) } diff --git a/internal/cmd/redis/instance/describe/describe.go b/internal/cmd/redis/instance/describe/describe.go index 41b5c655..b89ac51f 100644 --- a/internal/cmd/redis/instance/describe/describe.go +++ b/internal/cmd/redis/instance/describe/describe.go @@ -110,7 +110,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *redis.Instanc return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instance) + details, err := yaml.MarshalWithOptions(instance, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis instance: %w", err) } diff --git a/internal/cmd/redis/instance/list/list.go b/internal/cmd/redis/instance/list/list.go index 5a903706..969b2005 100644 --- a/internal/cmd/redis/instance/list/list.go +++ b/internal/cmd/redis/instance/list/list.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []redis.Insta return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis instance list: %w", err) } diff --git a/internal/cmd/redis/plans/plans.go b/internal/cmd/redis/plans/plans.go index d4871479..29285712 100644 --- a/internal/cmd/redis/plans/plans.go +++ b/internal/cmd/redis/plans/plans.go @@ -140,7 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, plans []redis.Offering) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(plans) + details, err := yaml.MarshalWithOptions(plans, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Redis plans: %w", err) } diff --git a/internal/cmd/secrets-manager/instance/create/create.go b/internal/cmd/secrets-manager/instance/create/create.go index 18c8b71d..c95cb365 100644 --- a/internal/cmd/secrets-manager/instance/create/create.go +++ b/internal/cmd/secrets-manager/instance/create/create.go @@ -168,7 +168,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager instance: %w", err) } diff --git a/internal/cmd/secrets-manager/instance/describe/describe.go b/internal/cmd/secrets-manager/instance/describe/describe.go index 7fbcfd05..d3f6e56b 100644 --- a/internal/cmd/secrets-manager/instance/describe/describe.go +++ b/internal/cmd/secrets-manager/instance/describe/describe.go @@ -126,7 +126,7 @@ func outputResult(p *print.Printer, outputFormat string, instance *secretsmanage return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(output) + details, err := yaml.MarshalWithOptions(output, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager instance: %w", err) } diff --git a/internal/cmd/secrets-manager/instance/list/list.go b/internal/cmd/secrets-manager/instance/list/list.go index 5d9c3742..9aa3a6a3 100644 --- a/internal/cmd/secrets-manager/instance/list/list.go +++ b/internal/cmd/secrets-manager/instance/list/list.go @@ -141,7 +141,7 @@ func outputResult(p *print.Printer, outputFormat string, instances []secretsmana return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(instances) + details, err := yaml.MarshalWithOptions(instances, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager instance list: %w", err) } diff --git a/internal/cmd/secrets-manager/user/create/create.go b/internal/cmd/secrets-manager/user/create/create.go index c9651488..ac919e45 100644 --- a/internal/cmd/secrets-manager/user/create/create.go +++ b/internal/cmd/secrets-manager/user/create/create.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, model *inputModel, instanceLabel string, res return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager user: %w", err) } diff --git a/internal/cmd/secrets-manager/user/describe/describe.go b/internal/cmd/secrets-manager/user/describe/describe.go index 1cd3f844..35b8f927 100644 --- a/internal/cmd/secrets-manager/user/describe/describe.go +++ b/internal/cmd/secrets-manager/user/describe/describe.go @@ -124,7 +124,7 @@ func outputResult(p *print.Printer, outputFormat string, user secretsmanager.Use return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(user) + details, err := yaml.MarshalWithOptions(user, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager user: %w", err) } diff --git a/internal/cmd/secrets-manager/user/list/list.go b/internal/cmd/secrets-manager/user/list/list.go index 0963ac45..cfc9b1a8 100644 --- a/internal/cmd/secrets-manager/user/list/list.go +++ b/internal/cmd/secrets-manager/user/list/list.go @@ -148,7 +148,7 @@ func outputResult(p *print.Printer, outputFormat string, users []secretsmanager. return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(users) + details, err := yaml.MarshalWithOptions(users, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal Secrets Manager user list: %w", err) } diff --git a/internal/cmd/service-account/create/create.go b/internal/cmd/service-account/create/create.go index b90e31c3..5314543b 100644 --- a/internal/cmd/service-account/create/create.go +++ b/internal/cmd/service-account/create/create.go @@ -129,7 +129,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, serv return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(serviceAccount) + details, err := yaml.MarshalWithOptions(serviceAccount, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal service account: %w", err) } diff --git a/internal/cmd/service-account/key/list/list.go b/internal/cmd/service-account/key/list/list.go index e92a93b4..6c3c29da 100644 --- a/internal/cmd/service-account/key/list/list.go +++ b/internal/cmd/service-account/key/list/list.go @@ -150,7 +150,7 @@ func outputResult(p *print.Printer, outputFormat string, keys []serviceaccount.S return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(keys) + details, err := yaml.MarshalWithOptions(keys, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal keys metadata: %w", err) } diff --git a/internal/cmd/service-account/list/list.go b/internal/cmd/service-account/list/list.go index 8e761bce..7fc9ffbf 100644 --- a/internal/cmd/service-account/list/list.go +++ b/internal/cmd/service-account/list/list.go @@ -132,7 +132,7 @@ func outputResult(p *print.Printer, outputFormat string, serviceAccounts []servi } p.Outputln(string(details)) case print.YAMLOutputFormat: - details, err := yaml.Marshal(serviceAccounts) + details, err := yaml.MarshalWithOptions(serviceAccounts, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal service accounts list: %w", err) } diff --git a/internal/cmd/service-account/token/create/create.go b/internal/cmd/service-account/token/create/create.go index 14fc3384..fdaf09b0 100644 --- a/internal/cmd/service-account/token/create/create.go +++ b/internal/cmd/service-account/token/create/create.go @@ -153,7 +153,7 @@ func outputResult(p *print.Printer, model *inputModel, token *serviceaccount.Acc return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(token) + details, err := yaml.MarshalWithOptions(token, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal service account access token: %w", err) } diff --git a/internal/cmd/service-account/token/list/list.go b/internal/cmd/service-account/token/list/list.go index 30a3431c..fc345d8c 100644 --- a/internal/cmd/service-account/token/list/list.go +++ b/internal/cmd/service-account/token/list/list.go @@ -154,7 +154,7 @@ func outputResult(p *print.Printer, outputFormat string, tokensMetadata []servic return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(tokensMetadata) + details, err := yaml.MarshalWithOptions(tokensMetadata, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal tokens metadata: %w", err) } diff --git a/internal/cmd/ske/cluster/create/create.go b/internal/cmd/ske/cluster/create/create.go index 45d5f1b5..4a9324f3 100644 --- a/internal/cmd/ske/cluster/create/create.go +++ b/internal/cmd/ske/cluster/create/create.go @@ -198,7 +198,7 @@ func outputResult(p *print.Printer, model *inputModel, projectLabel string, resp return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE cluster: %w", err) } diff --git a/internal/cmd/ske/cluster/describe/describe.go b/internal/cmd/ske/cluster/describe/describe.go index 2af96a92..75a432bd 100644 --- a/internal/cmd/ske/cluster/describe/describe.go +++ b/internal/cmd/ske/cluster/describe/describe.go @@ -107,7 +107,7 @@ func outputResult(p *print.Printer, outputFormat string, cluster *ske.Cluster) e return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(cluster) + details, err := yaml.MarshalWithOptions(cluster, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE cluster: %w", err) } diff --git a/internal/cmd/ske/cluster/list/list.go b/internal/cmd/ske/cluster/list/list.go index fc9a0a6c..d0ee6da4 100644 --- a/internal/cmd/ske/cluster/list/list.go +++ b/internal/cmd/ske/cluster/list/list.go @@ -150,7 +150,7 @@ func outputResult(p *print.Printer, outputFormat string, clusters []ske.Cluster) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(clusters) + details, err := yaml.MarshalWithOptions(clusters, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE cluster list: %w", err) } diff --git a/internal/cmd/ske/cluster/update/update.go b/internal/cmd/ske/cluster/update/update.go index e499d3b6..491daf86 100644 --- a/internal/cmd/ske/cluster/update/update.go +++ b/internal/cmd/ske/cluster/update/update.go @@ -170,7 +170,7 @@ func outputResult(p *print.Printer, model *inputModel, resp *ske.Cluster) error return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(resp) + details, err := yaml.MarshalWithOptions(resp, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE cluster: %w", err) } diff --git a/internal/cmd/ske/credentials/describe/describe.go b/internal/cmd/ske/credentials/describe/describe.go index a93fb8e0..692bb9ac 100644 --- a/internal/cmd/ske/credentials/describe/describe.go +++ b/internal/cmd/ske/credentials/describe/describe.go @@ -124,7 +124,7 @@ func outputResult(p *print.Printer, outputFormat string, credentials *ske.Creden return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(credentials) + details, err := yaml.MarshalWithOptions(credentials, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE credentials: %w", err) } diff --git a/internal/cmd/ske/describe/describe.go b/internal/cmd/ske/describe/describe.go index a14f018c..433a60cd 100644 --- a/internal/cmd/ske/describe/describe.go +++ b/internal/cmd/ske/describe/describe.go @@ -96,7 +96,7 @@ func outputResult(p *print.Printer, outputFormat string, project *ske.ProjectRes return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(project) + details, err := yaml.MarshalWithOptions(project, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE project details: %w", err) } diff --git a/internal/cmd/ske/kubeconfig/create/create.go b/internal/cmd/ske/kubeconfig/create/create.go index 47309897..d72c54b9 100644 --- a/internal/cmd/ske/kubeconfig/create/create.go +++ b/internal/cmd/ske/kubeconfig/create/create.go @@ -230,9 +230,9 @@ func outputResult(p *print.Printer, model *inputModel, kubeconfigPath string, re var err error var details []byte if respKubeconfig != nil { - details, err = yaml.Marshal(respKubeconfig) + details, err = yaml.MarshalWithOptions(respKubeconfig, yaml.IndentSequence(true)) } else if respLogin != nil { - details, err = yaml.Marshal(respLogin) + details, err = yaml.MarshalWithOptions(respLogin, yaml.IndentSequence(true)) } if err != nil { return fmt.Errorf("marshal SKE Kubeconfig: %w", err) diff --git a/internal/cmd/ske/options/options.go b/internal/cmd/ske/options/options.go index 4f152f62..7bc3a560 100644 --- a/internal/cmd/ske/options/options.go +++ b/internal/cmd/ske/options/options.go @@ -144,7 +144,7 @@ func outputResult(p *print.Printer, model *inputModel, options *ske.ProviderOpti p.Outputln(string(details)) return nil case print.YAMLOutputFormat: - details, err := yaml.Marshal(options) + details, err := yaml.MarshalWithOptions(options, yaml.IndentSequence(true)) if err != nil { return fmt.Errorf("marshal SKE options: %w", err) }