// Inherited returns an address that the receiving configuration address might
// inherit from in a parent module. The second bool return value indicates if
// such inheritance is possible, and thus whether the returned address is valid.
//
// Inheritance is possible only for default (un-aliased) providers in modules
// other than the root module. Even if a valid address is returned, inheritence
// may not be performed for other reasons, such as if the calling module
// provided explicit provider configurations within the call for this module.
// The ProviderTransformer graph transform in the main terraform module has the
// authoritative logic for provider inheritance, and this method is here mainly
// just for its benefit.
Inherited returns an address that the receiving configuration address might
inherit from in a parent module. The second bool return value indicates if
such inheritance is possible, and thus whether the returned address is valid.

Inheritance is possible only for default (un-aliased) providers in modules
other than the root module. Even if a valid address is returned, inheritence
may not be performed for other reasons, such as if the calling module
provided explicit provider configurations within the call for this module.
The ProviderTransformer graph transform in the main terraform module has the
authoritative logic for provider inheritance, and this method is here mainly
just for its benefit.
// Inherited returns an address that the receiving configuration address might // inherit from in a parent module . The second bool return value indicates if // such inheritance is possible and thus whether the returned address is valid . // // Inheritance is possible only for default ( un - aliased ) providers in modules // other than the root module . Even if a valid address is returned inheritence // may not be performed for other reasons such as if the calling module // provided explicit provider configurations within the call for this module . // The ProviderTransformer graph transform in the main terraform module has the // authoritative logic for provider inheritance and this method is here mainly // just for its benefit .
func (pc AbsProviderConfig) Inherited() (AbsProviderConfig, bool) {
	if len(pc.Module) == 0 {
		return AbsProviderConfig{}, false
	}
	if pc.Alias != "" {
		return AbsProviderConfig{}, false
	}
	parentMod := pc.Module.Parent()
	return AbsProviderConfig{
		Module:   parentMod,
		Provider: pc.Provider,
	}, true
}
func ( pc AbsProviderConfig ) Inherited ( ) ( AbsProviderConfig , bool ) { if len ( pc . Module ) == 0 { return AbsProviderConfig { } , false } if pc . Alias != " " { return AbsProviderConfig { } , false } parentMod := pc . Module . Parent ( ) return AbsProviderConfig { Module : parentMod , Provider : pc . Provider , } , true }
Inherited returns an address that the receiving configuration address might
inherit from in a parent module.
Inherited returns an address that the receiving configuration address might inherit from in a parent module .
// Can't inherit if we're already in the root. // Can't inherit if we have an alias. // Otherwise, we might inherit from a configuration with the same // provider type in the parent module instance.