Documentation ¶
Index ¶
- Variables
- func ExtractHTTPClient(m interface{}) *http.Client
- func ExtractProjectID(d terraformResourceData, m interface{}) (projectID string, isDefault bool, err error)
- func ExtractRegion(d terraformResourceData, m interface{}) (scw.Region, error)
- func ExtractRegionWithDefault(d terraformResourceData, m interface{}, defaultRegion scw.Region) (scw.Region, error)
- func ExtractScwClient(m interface{}) *scw.Client
- func ExtractZone(d terraformResourceData, m interface{}) (scw.Zone, error)
- func GetRawConfigForKey(d *schema.ResourceData, key string, ty cty.Type) (interface{}, bool)
- type Config
- type Meta
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProjectIDNotFound = errors.New("could not detect project id")
ErrProjectIDNotFound is returned when no region can be detected
Functions ¶
func ExtractHTTPClient ¶
func ExtractProjectID ¶
func ExtractProjectID(d terraformResourceData, m interface{}) (projectID string, isDefault bool, err error)
ExtractProjectID will try to guess the project id from the following:
- project_id field of the resource data
- default project id from config
func ExtractRegion ¶
ExtractRegion will try to guess the region from the following:
- region field of the resource data
- default region from config
func ExtractRegionWithDefault ¶
func ExtractRegionWithDefault(d terraformResourceData, m interface{}, defaultRegion scw.Region) (scw.Region, error)
ExtractRegionWithDefault will try to guess the region from the following:
- region field of the resource data
- default region given in argument
- default region from config
func ExtractScwClient ¶
func ExtractZone ¶
ExtractZone will try to guess the zone from the following:
- zone field of the resource data
- default zone from config
func GetRawConfigForKey ¶ added in v2.39.0
GetRawConfigForKey returns the value for a specific key in the user's raw configuration, which can be useful on resources' update The value for the key to look for must be a primitive type (bool, string, number) and the expected type of the value should be passed as the ty parameter
Types ¶
Click to show internal directories.
Click to hide internal directories.