@@ -76,12 +76,43 @@ terraform-digitalocean-droplet:
7676You can specify modules using Terraform's ` source ` specifications:
7777https://www.terraform.io/docs/modules/sources.html
7878
79+ ### Versions
7980The ` version ` can be a tag, a branch or a commit hash. By default, ` xterrafile `
8081will checkout the default branch of a module which is usually ` master ` .
8182
82- Modules will be downloaded to ` ./vendor/xterrafile/ ` by default.
83+ When using modules from a Terraform registry you can specify version ranges like:
8384
84- ### Example Usage
85+ - ` <1.0.0 ` Less than ` 1.0.0 `
86+ - ` <=1.0.0 ` Less than or equal to ` 1.0.0 `
87+ - ` >1.0.0 ` Greater than ` 1.0.0 `
88+ - ` >=1.0.0 ` Greater than or equal to ` 1.0.0 `
89+ - ` 1.0.0 ` , ` =1.0.0 ` , ` ==1.0.0 ` Equal to ` 1.0.0 `
90+ - ` !1.0.0 ` , ` !=1.0.0 ` Not equal to ` 1.0.0 ` . Excludes version ` 1.0.0 ` .
91+
92+ Note that spaces between the operator and the version will be gracefully tolerated.
93+
94+ A ` Range ` can link multiple ` Ranges ` separated by space:
95+
96+ Ranges can be linked by logical AND:
97+
98+ - ` >1.0.0 <2.0.0 ` would match between both ranges, so ` 1.1.1 ` and ` 1.8.7 ` but not ` 1.0.0 ` or ` 2.0.0 `
99+ - ` >1.0.0 <3.0.0 !2.0.3-beta.2 ` would match every version between ` 1.0.0 ` and ` 3.0.0 ` except ` 2.0.3-beta.2 `
100+
101+ Ranges can also be linked by logical OR:
102+
103+ - ` <2.0.0 || >=3.0.0 ` would match ` 1.x.x ` and ` 3.x.x ` but not ` 2.x.x `
104+
105+ AND has a higher precedence than OR. It's not possible to use brackets.
106+
107+ Ranges can be combined by both AND and OR
108+
109+ - ` >1.0.0 <2.0.0 || >3.0.0 !4.2.1 ` would match ` 1.2.3 ` , ` 1.9.9 ` , ` 3.1.1 ` , but not ` 4.2.1 ` , ` 2.1.1 `
110+
111+
112+ ### Module Download Location
113+ Modules will be downloaded to ` ./vendor/modules/ ` by default.
114+
115+ ## Example Usage
85116Help:
86117```
87118xterrafile help
@@ -96,7 +127,7 @@ Available Commands:
96127 version Show version information for xterrafile
97128
98129Flags:
99- -d, --directory string module directory (default "vendor/xterrafile ")
130+ -d, --directory string module directory (default "vendor/modules ")
100131 -f, --file string config file (default "Terrafile")
101132 -h, --help help for xterrafile
102133
0 commit comments