This change adds a super simple initial whack at a basic cluster topology comprised of VPC, subnet, internet gateway, attachments, and route tables. This is actually written in Mu itself, and I am committing this early, since there are quite a few features required before we can actually make progress getting this up and running.
23 lines
689 B
Go
23 lines
689 B
Go
// Copyright 2016 Marapongo, Inc. All rights reserved.
|
|
|
|
package compiler
|
|
|
|
import (
|
|
"github.com/marapongo/mu/pkg/ast"
|
|
"github.com/marapongo/mu/pkg/compiler/backends"
|
|
)
|
|
|
|
// Context holds all state available to any templates or code evaluated at compile-time.
|
|
type Context struct {
|
|
Arch backends.Arch // the target cloud architecture.
|
|
Cluster ast.Cluster // the cluster that we will deploy to.
|
|
Properties ast.PropertyBag // properties supplied at stack construction time.
|
|
}
|
|
|
|
// WithProps returns a new clone of this Context with the given properties attached to it.
|
|
func (c *Context) WithProps(props ast.PropertyBag) *Context {
|
|
return &Context{
|
|
Properties: props,
|
|
}
|
|
}
|