pulumi/pkg/compiler/backends/arch.go
joeduffy 0b34f256f0 Sketch out more AWS backend code-generator bits and pieces
This change includes a few steps towards AWS backend code-generation:

* Add a BoundDependencies property to ast.Stack to remember the *ast.Stack
  objects bound during Stack binding.

* Make a few CloudFormation properties optional (cfOutput Export/Condition).

* Rename clouds.ArchMap, clouds.ArchNames, schedulers.ArchMap, and
  schedulers.ArchNames to clouds.Values, clouds.Names, schedulers.Values,
  and schedulers.Names, respectively.  This reads much nicer to my eyes.

* Create a new anonymous ast.Target for deployments if no specific target
  was specified; this is to support quick-and-easy "one off" deployments,
  as will be common when doing local development.

* Sketch out more of the AWS Cloud implementation.  We actually map the
  Mu Services into CloudFormation Resources; well, kinda sorta, since we
  don't actually have Service-specific logic in here yet, however all of
  the structure and scaffolding is now here.
2016-11-18 16:46:36 -08:00

23 lines
500 B
Go

// Copyright 2016 Marapongo, Inc. All rights reserved.
package backends
import (
"github.com/marapongo/mu/pkg/compiler/backends/clouds"
"github.com/marapongo/mu/pkg/compiler/backends/schedulers"
)
// Arch is the target cloud "architecture" we are compiling against.
type Arch struct {
Cloud clouds.Arch
Scheduler schedulers.Arch
}
func (a Arch) String() string {
s := clouds.Names[a.Cloud]
if a.Scheduler != schedulers.NoArch {
s += ":" + schedulers.Names[a.Scheduler]
}
return s
}