// Configure implementation of terraform.ResourceProvider interface.
Configure implementation of terraform.ResourceProvider interface.
// Configure implementation of terraform . ResourceProvider interface .
func (p *Provider) Configure(c *terraform.ResourceConfig) error {
	if p.ConfigureFunc == nil {
		return nil
	}
	sm := schemaMap(p.Schema)
	diff, err := sm.Diff(nil, c, nil, p.meta, true)
	if err != nil {
		return err
	}
	data, err := sm.Data(nil, diff)
	if err != nil {
		return err
	}
	meta, err := p.ConfigureFunc(data)
	if err != nil {
		return err
	}
	p.meta = meta
	return nil
}
func ( p * Provider ) Configure ( c * terraform . ResourceConfig ) error { if p . ConfigureFunc == nil { return nil } sm := schemaMap ( p . Schema ) diff , err := sm . Diff ( nil , c , nil , p . meta , true ) if err != nil { return err } data , err := sm . Data ( nil , diff ) if err != nil { return err } meta , err := p . ConfigureFunc ( data ) if err != nil { return err } p . meta = meta return nil }
Configure implementation of terraform.ResourceProvider interface.
Configure implementation of terraform . ResourceProvider interface .
// No configuration // Get a ResourceData for this configuration. To do this, we actually // generate an intermediary "diff" although that is never exposed.