diff --git a/docs/DEPRECATIONS.md b/docs/DEPRECATIONS.md index 061e19f36e9ed..6d1586930bd12 100644 --- a/docs/DEPRECATIONS.md +++ b/docs/DEPRECATIONS.md @@ -8,4 +8,3 @@ See [DEPRECATION.md](docs/DEPRECATION.md#process) for the process for updating t * legacy_openssl_provider v0.34.0 OpenSSL legacy provider flag should be removed * armv7_rpm v0.34.0 The armv7 RPM packages should be removed (replaced by armv7hl) -* yaml_migration v0.34.0 Prefer loading `/etc/vector/vector.yaml` first diff --git a/src/cli.rs b/src/cli.rs index ff7f35a3116c7..794ca3ade12e0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,4 +1,5 @@ #![allow(missing_docs)] + use std::{num::NonZeroU64, path::PathBuf}; use clap::{ArgAction, CommandFactory, FromArgMatches, Parser}; @@ -63,10 +64,8 @@ impl Opts { pub struct RootOpts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. - /// If zero files are specified the deprecated default config path - /// `/etc/vector/vector.toml` will be targeted. - /// And if the aforementioned file does not exist, - /// then `/etc/vector/vector.yaml` will be used. + /// If zero files are specified, the deprecated default config path + /// `/etc/vector/vector.yaml` is targeted. #[arg( id = "config", short, diff --git a/src/config/cmd.rs b/src/config/cmd.rs index f3c3104cfe5e8..64b04aeafb546 100644 --- a/src/config/cmd.rs +++ b/src/config/cmd.rs @@ -20,10 +20,8 @@ pub struct Opts { /// Read configuration from one or more files. Wildcard paths are supported. /// File format is detected from the file name. - /// If zero files are specified the deprecated default config path - /// `/etc/vector/vector.toml` will be targeted. - /// And if the aforementioned file does not exist, - /// then `/etc/vector/vector.yaml` will be used. + /// If zero files are specified, the deprecated default config path + /// `/etc/vector/vector.yaml` is targeted. #[arg( id = "config", short, diff --git a/src/config/loading/mod.rs b/src/config/loading/mod.rs index f7ac2d4c648bc..092fc826dac6e 100644 --- a/src/config/loading/mod.rs +++ b/src/config/loading/mod.rs @@ -304,39 +304,23 @@ where #[cfg(not(windows))] fn default_path() -> PathBuf { - "/etc/vector/vector.toml".into() + "/etc/vector/vector.yaml".into() } #[cfg(windows)] fn default_path() -> PathBuf { let program_files = std::env::var("ProgramFiles").expect("%ProgramFiles% environment variable must be defined"); - format!("{}\\Vector\\config\\vector.toml", program_files).into() + format!("{}\\Vector\\config\\vector.yaml", program_files).into() } fn default_config_paths() -> Vec { #[cfg(not(windows))] let default_path = default_path(); - #[cfg(windows)] let default_path = default_path(); - let yaml_path = default_path.with_extension("yaml"); - if default_path.exists() { - warn!("DEPRECATED Using the deprecated {:?} config path as the default config location. Vector is migrating \ - to YAML as the default config format. Future Vector versions will use {:?} as the default config location.", - default_path, - yaml_path); - - vec![ConfigPath::File(default_path, Some(Format::Toml))] - } else { - warn!( - "The {:?} config path does not exist. Vector will attempt to use new default {:?} instead.", - default_path, yaml_path - ); - - vec![ConfigPath::File(yaml_path, Some(Format::Yaml))] - } + vec![ConfigPath::File(default_path, Some(Format::Yaml))] } #[cfg(all( diff --git a/src/tap/cmd.rs b/src/tap/cmd.rs index f06529ed77b4b..a5c4f20eede12 100644 --- a/src/tap/cmd.rs +++ b/src/tap/cmd.rs @@ -32,7 +32,7 @@ pub(crate) async fn cmd(opts: &super::Opts, signal_rx: SignalRx) -> exitcode::Ex Have you enabled the API? - To enable the API, add the following to your `vector.toml` config file: + To enable the API, add the following to your Vector config file: [api] enabled = true"}, diff --git a/src/top/cmd.rs b/src/top/cmd.rs index a774ca7bcc448..2617ed0721259 100644 --- a/src/top/cmd.rs +++ b/src/top/cmd.rs @@ -37,7 +37,7 @@ pub async fn cmd(opts: &super::Opts) -> exitcode::ExitCode { Have you enabled the API? - To enable the API, add the following to your `vector.toml` config file: + To enable the API, add the following to your Vector config file: [api] enabled = true"}, diff --git a/src/validate.rs b/src/validate.rs index 121b8a161a813..bd35909e47822 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -1,4 +1,5 @@ #![allow(missing_docs)] + use std::{collections::HashMap, fmt, fs::remove_dir_all, path::PathBuf}; use clap::Parser; @@ -53,9 +54,8 @@ pub struct Opts { /// Any number of Vector config files to validate. /// Format is detected from the file name. - /// If none are specified the default config path `/etc/vector/vector.toml` - /// will be targeted. And if the aforementioned file does not exist, - // then `/etc/vector/vector.yaml` will be used. + /// If none are specified, the default config path `/etc/vector/vector.yaml` + /// is targeted. #[arg(env = "VECTOR_CONFIG", value_delimiter(','))] pub paths: Vec, diff --git a/website/cue/reference/configuration.cue b/website/cue/reference/configuration.cue index c93b155256803..83a64684bbb96 100644 --- a/website/cue/reference/configuration.cue +++ b/website/cue/reference/configuration.cue @@ -711,8 +711,7 @@ configuration: { title: "Location" body: """ The location of your Vector configuration file depends on your installation method. For most Linux - based systems, the file can be found at `/etc/vector/vector.toml`. And if the aforementioned file does - not exist, then `/etc/vector/vector.yaml` will be used. + based systems, the file can be found at `/etc/vector/vector.yaml`. All files in `/etc/vector` are user configuration files and can be safely overridden to craft your desired Vector configuration.