main: fix the help output to show up
This commit is contained in:
parent
8cd4814beb
commit
92e1e09a69
|
@ -38,11 +38,11 @@ func resource_aws_instance_create(
|
|||
// properly.
|
||||
rs := s.MergeDiff(d)
|
||||
|
||||
// Create the instance
|
||||
runOpts := &ec2.RunInstances{
|
||||
ImageId: rs.Attributes["ami"],
|
||||
InstanceType: rs.Attributes["instance_type"],
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Run configuration: %#v", runOpts)
|
||||
runResp, err := ec2conn.RunInstances(runOpts)
|
||||
if err != nil {
|
||||
|
@ -52,8 +52,7 @@ func resource_aws_instance_create(
|
|||
instance := &runResp.Instances[0]
|
||||
log.Printf("[INFO] Instance ID: %s", instance.InstanceId)
|
||||
|
||||
// Store the resource state now so that we can return it in the case
|
||||
// of any errors.
|
||||
// Store the resulting ID so we can look this up later
|
||||
rs.ID = instance.InstanceId
|
||||
|
||||
// Wait for the instance to become running so we can get some attributes
|
||||
|
|
6
main.go
6
main.go
|
@ -103,6 +103,7 @@ func wrappedMain() int {
|
|||
Args: args,
|
||||
Commands: Commands,
|
||||
HelpFunc: cli.BasicHelpFunc("terraform"),
|
||||
HelpWriter: os.Stdout,
|
||||
}
|
||||
|
||||
exitCode, err := cli.Run()
|
||||
|
@ -131,7 +132,12 @@ func copyOutput(r io.Reader) {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defaultR, err := pr.Prefix("")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
go io.Copy(os.Stderr, stderrR)
|
||||
go io.Copy(os.Stdout, stdoutR)
|
||||
go io.Copy(os.Stdout, defaultR)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue