Merge pull request #498 from justinsb/fix_486

Don't add terraform to --out
This commit is contained in:
Justin Santa Barbara 2016-09-24 11:35:58 -04:00 committed by GitHub
commit 6385bf647d
4 changed files with 15 additions and 3 deletions

View File

@ -116,7 +116,11 @@ func (c *CreateClusterCmd) Run(args []string) error {
// TODO: Reuse rootCommand stateStore logic? // TODO: Reuse rootCommand stateStore logic?
if c.OutDir == "" { if c.OutDir == "" {
c.OutDir = "out" if c.Target == cloudup.TargetTerraform {
c.OutDir = "out/terraform"
} else {
c.OutDir = "out"
}
} }
clusterRegistry, err := rootCommand.ClusterRegistry() clusterRegistry, err := rootCommand.ClusterRegistry()

View File

@ -67,7 +67,11 @@ func (c *UpdateClusterCmd) Run(args []string) error {
} }
if c.OutDir == "" { if c.OutDir == "" {
c.OutDir = "out" if c.Target == cloudup.TargetTerraform {
c.OutDir = "out/terraform"
} else {
c.OutDir = "out"
}
} }
clusterRegistry, cluster, err := rootCommand.Cluster() clusterRegistry, cluster, err := rootCommand.Cluster()

View File

@ -55,3 +55,7 @@ Values:
* `external` updates are performed by an external system (or manually), should not be automatically applied * `external` updates are performed by an external system (or manually), should not be automatically applied
* unset means to use the default policy, which is currently to apply OS security updates unless they require a reboot * unset means to use the default policy, which is currently to apply OS security updates unless they require a reboot
## out
`out` determines the directory into which kubectl will write the target output. It defaults to `out/terraform`

View File

@ -467,7 +467,7 @@ func (c *ApplyClusterCmd) Run() error {
case TargetTerraform: case TargetTerraform:
checkExisting = false checkExisting = false
outDir := path.Join(c.OutDir, "terraform") outDir := c.OutDir
target = terraform.NewTerraformTarget(cloud, region, project, outDir) target = terraform.NewTerraformTarget(cloud, region, project, outDir)
case TargetDryRun: case TargetDryRun: