1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-22 17:02:03 +01:00

starlark/types: move documentation of ProviderCollection.__call__

This commit is contained in:
Máximo Cuadros 2020-03-27 18:32:13 +01:00
parent 2387307c90
commit e627a3db53
No known key found for this signature in database
GPG Key ID: 17A5DFEDC735AE4B
2 changed files with 18 additions and 19 deletions

@ -28,7 +28,7 @@ import (
// Type of the resource collection. Eg.: `aws_instance`
//
// methods:
// __call__(name="", values="") Resource
// __call__(name="", values={}) Resource
// Returns a new resourced with the given name and values.
//
// examples:
@ -262,6 +262,23 @@ func getValue(r *Resource, key string) starlark.Value {
// examples:
// provider_collection.star
//
// methods:
// __call__(type, version="", name="") Provider
// Returns a new provider instance of the given type.
//
// examples:
// tf_provider.star
// Defining multiple providers and traversing `tf.providers`
//
// params:
// type string
// Provider type. Eg.: `aws`
// version string
// Version [value](https://www.terraform.io/docs/configuration/providers.html#provider-versions)
// , if `None` latest version available it's used.
// name string
// Local name of the resource, if `None` is provided it's
// autogenerated.
type ProviderCollection struct {
pm *terraform.PluginManager
*Dict

@ -28,24 +28,6 @@ import (
// provider ProviderCollection
// Dict with all the providers defined by provider type.
//
// methods:
// provider(type, version="", name="") Provider
// Returns a new provider instance of the given type.
//
// examples:
// tf_provider.star
// Defining multiple providers and traversing `tf.providers`
//
// params:
// type string
// Provider type. Eg.: `aws`
// version string
// Version [contraint](https://www.terraform.io/docs/configuration/providers.html#provider-versions),
// if `None` latest version available it's used.
// name string
// Local name of the resource, if `None` is provided it's
// autogenerated.
//
type Terraform struct {
b *Backend
p *ProviderCollection