parent
9816d5034e
commit
4b49a323c3
|
@ -78,7 +78,6 @@ func (b *Backend) State(name string) (state.State, error) {
|
||||||
//if this isn't the default state name, we need to create the object so
|
//if this isn't the default state name, we need to create the object so
|
||||||
//it's listed by States.
|
//it's listed by States.
|
||||||
if name != backend.DefaultStateName {
|
if name != backend.DefaultStateName {
|
||||||
|
|
||||||
// take a lock on this state while we write it
|
// take a lock on this state while we write it
|
||||||
lockInfo := state.NewLockInfo()
|
lockInfo := state.NewLockInfo()
|
||||||
lockInfo.Operation = "init"
|
lockInfo.Operation = "init"
|
||||||
|
|
|
@ -64,7 +64,6 @@ func TestBackendLocked(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func createMantaFolder(t *testing.T, mantaClient *storage.StorageClient, directoryName string) {
|
func createMantaFolder(t *testing.T, mantaClient *storage.StorageClient, directoryName string) {
|
||||||
|
|
||||||
// Be clear about what we're doing in case the user needs to clean
|
// Be clear about what we're doing in case the user needs to clean
|
||||||
// this up later.
|
// this up later.
|
||||||
//t.Logf("creating Manta directory %s", directoryName)
|
//t.Logf("creating Manta directory %s", directoryName)
|
||||||
|
|
|
@ -88,7 +88,6 @@ func (c *RemoteClient) Delete() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) {
|
func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) {
|
||||||
|
|
||||||
//At Joyent, we want to make sure that the State directory exists before we interact with it
|
//At Joyent, we want to make sure that the State directory exists before we interact with it
|
||||||
//We don't expect users to have to create it in advance
|
//We don't expect users to have to create it in advance
|
||||||
//The order of operations of Backend State as follows:
|
//The order of operations of Backend State as follows:
|
||||||
|
|
|
@ -213,7 +213,6 @@ func downloadSwiftObject(t *testing.T, osClient *gophercloud.ServiceClient, cont
|
||||||
// Helper function to get a list of objects in a Swift container
|
// Helper function to get a list of objects in a Swift container
|
||||||
func getSwiftObjectNames(t *testing.T, osClient *gophercloud.ServiceClient, container string) (objectNames []string) {
|
func getSwiftObjectNames(t *testing.T, osClient *gophercloud.ServiceClient, container string) (objectNames []string) {
|
||||||
_ = objects.List(osClient, container, nil).EachPage(func(page pagination.Page) (bool, error) {
|
_ = objects.List(osClient, container, nil).EachPage(func(page pagination.Page) (bool, error) {
|
||||||
|
|
||||||
// Get a slice of object names
|
// Get a slice of object names
|
||||||
names, err := objects.ExtractNames(page)
|
names, err := objects.ExtractNames(page)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -558,7 +558,6 @@ func (p *provisioner) startHabUnmanaged(o terraform.UIOutput, comm communicator.
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *provisioner) startHabSystemd(o terraform.UIOutput, comm communicator.Communicator, options string) error {
|
func (p *provisioner) startHabSystemd(o terraform.UIOutput, comm communicator.Communicator, options string) error {
|
||||||
|
|
||||||
// Create a new template and parse the client config into it
|
// Create a new template and parse the client config into it
|
||||||
unitString := template.Must(template.New("hab-supervisor.service").Parse(systemdUnit))
|
unitString := template.Must(template.New("hab-supervisor.service").Parse(systemdUnit))
|
||||||
|
|
||||||
|
|
|
@ -862,7 +862,6 @@ func TestApply_shutdown(t *testing.T) {
|
||||||
*terraform.InstanceInfo,
|
*terraform.InstanceInfo,
|
||||||
*terraform.InstanceState,
|
*terraform.InstanceState,
|
||||||
*terraform.InstanceDiff) (*terraform.InstanceState, error) {
|
*terraform.InstanceDiff) (*terraform.InstanceState, error) {
|
||||||
|
|
||||||
// only cancel once
|
// only cancel once
|
||||||
if !cancelled {
|
if !cancelled {
|
||||||
shutdownCh <- struct{}{}
|
shutdownCh <- struct{}{}
|
||||||
|
|
|
@ -32,7 +32,6 @@ func configDir() (string, error) {
|
||||||
func homeDir() (string, error) {
|
func homeDir() (string, error) {
|
||||||
// First prefer the HOME environmental variable
|
// First prefer the HOME environmental variable
|
||||||
if home := os.Getenv("HOME"); home != "" {
|
if home := os.Getenv("HOME"); home != "" {
|
||||||
|
|
||||||
// FIXME: homeDir gets called from globalPluginDirs during init, before
|
// FIXME: homeDir gets called from globalPluginDirs during init, before
|
||||||
// the logging is setup. We should move meta initializtion outside of
|
// the logging is setup. We should move meta initializtion outside of
|
||||||
// init, but in the meantime we just need to silence this output.
|
// init, but in the meantime we just need to silence this output.
|
||||||
|
|
|
@ -282,7 +282,6 @@ func (r *Resource) ReadDataApply(
|
||||||
d *terraform.InstanceDiff,
|
d *terraform.InstanceDiff,
|
||||||
meta interface{},
|
meta interface{},
|
||||||
) (*terraform.InstanceState, error) {
|
) (*terraform.InstanceState, error) {
|
||||||
|
|
||||||
// Data sources are always built completely from scratch
|
// Data sources are always built completely from scratch
|
||||||
// on each read, so the source state is always nil.
|
// on each read, so the source state is always nil.
|
||||||
data, err := schemaMap(r.Schema).Data(nil, d)
|
data, err := schemaMap(r.Schema).Data(nil, d)
|
||||||
|
|
|
@ -1528,7 +1528,6 @@ func (m schemaMap) validatePrimitive(
|
||||||
raw interface{},
|
raw interface{},
|
||||||
schema *Schema,
|
schema *Schema,
|
||||||
c *terraform.ResourceConfig) ([]string, []error) {
|
c *terraform.ResourceConfig) ([]string, []error) {
|
||||||
|
|
||||||
// Catch if the user gave a complex type where a primitive was
|
// Catch if the user gave a complex type where a primitive was
|
||||||
// expected, so we can return a friendly error message that
|
// expected, so we can return a friendly error message that
|
||||||
// doesn't contain Go type system terminology.
|
// doesn't contain Go type system terminology.
|
||||||
|
|
|
@ -3883,7 +3883,6 @@ func TestContext2Apply_outputDependsOn(t *testing.T) {
|
||||||
info *InstanceInfo,
|
info *InstanceInfo,
|
||||||
is *InstanceState,
|
is *InstanceState,
|
||||||
id *InstanceDiff) (*InstanceState, error) {
|
id *InstanceDiff) (*InstanceState, error) {
|
||||||
|
|
||||||
// Sleep to allow parallel execution
|
// Sleep to allow parallel execution
|
||||||
time.Sleep(50 * time.Millisecond)
|
time.Sleep(50 * time.Millisecond)
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,6 @@ func (i *Interpolater) valueModuleVar(
|
||||||
n string,
|
n string,
|
||||||
v *config.ModuleVariable,
|
v *config.ModuleVariable,
|
||||||
result map[string]ast.Variable) error {
|
result map[string]ast.Variable) error {
|
||||||
|
|
||||||
// Build the path to the child module we want
|
// Build the path to the child module we want
|
||||||
path := make([]string, len(scope.Path), len(scope.Path)+1)
|
path := make([]string, len(scope.Path), len(scope.Path)+1)
|
||||||
copy(path, scope.Path)
|
copy(path, scope.Path)
|
||||||
|
@ -319,7 +318,6 @@ func (i *Interpolater) valueTerraformVar(
|
||||||
n string,
|
n string,
|
||||||
v *config.TerraformVariable,
|
v *config.TerraformVariable,
|
||||||
result map[string]ast.Variable) error {
|
result map[string]ast.Variable) error {
|
||||||
|
|
||||||
// "env" is supported for backward compatibility, but it's deprecated and
|
// "env" is supported for backward compatibility, but it's deprecated and
|
||||||
// so we won't advertise it as being allowed in the error message. It will
|
// so we won't advertise it as being allowed in the error message. It will
|
||||||
// be removed in a future version of Terraform.
|
// be removed in a future version of Terraform.
|
||||||
|
@ -701,7 +699,6 @@ func (i *Interpolater) computeResourceMultiVariable(
|
||||||
func (i *Interpolater) interpolateComplexTypeAttribute(
|
func (i *Interpolater) interpolateComplexTypeAttribute(
|
||||||
resourceID string,
|
resourceID string,
|
||||||
attributes map[string]string) (ast.Variable, error) {
|
attributes map[string]string) (ast.Variable, error) {
|
||||||
|
|
||||||
// We can now distinguish between lists and maps in state by the count field:
|
// We can now distinguish between lists and maps in state by the count field:
|
||||||
// - lists (and by extension, sets) use the traditional .# notation
|
// - lists (and by extension, sets) use the traditional .# notation
|
||||||
// - maps use the newer .% notation
|
// - maps use the newer .% notation
|
||||||
|
|
|
@ -17,7 +17,6 @@ import (
|
||||||
// present in the configuration. This is guaranteed not to happen for any
|
// present in the configuration. This is guaranteed not to happen for any
|
||||||
// configuration that has passed a call to Config.Validate().
|
// configuration that has passed a call to Config.Validate().
|
||||||
func ModuleTreeDependencies(root *module.Tree, state *State) *moduledeps.Module {
|
func ModuleTreeDependencies(root *module.Tree, state *State) *moduledeps.Module {
|
||||||
|
|
||||||
// First we walk the configuration tree to build the overall structure
|
// First we walk the configuration tree to build the overall structure
|
||||||
// and capture the explicit/implicit/inherited provider dependencies.
|
// and capture the explicit/implicit/inherited provider dependencies.
|
||||||
deps := moduleTreeConfigDependencies(root, nil)
|
deps := moduleTreeConfigDependencies(root, nil)
|
||||||
|
|
Loading…
Reference in New Issue