terraformtestinglib package¶
Subpackages¶
Submodules¶
terraformtestinglib.configuration module¶
Main code for configuration.
terraformtestinglib.terraformtestinglib module¶
Main code for terraformtestinglib.
-
class
terraformtestinglib.terraformtestinglib.
HclFileResource
(filename, resource_type, resource_name, data)¶ Bases:
tuple
-
data
¶ Alias for field number 3
-
filename
¶ Alias for field number 0
-
resource_name
¶ Alias for field number 2
-
resource_type
¶ Alias for field number 1
-
-
class
terraformtestinglib.terraformtestinglib.
HclView
(hcl_resources, global_variables=None, raise_on_missing_variable=True, environment_variables=None)[source]¶ Bases:
object
Object representing the global view of hcl resources along with any global variables.
-
get_counter_resource_data_by_type
(resource_type, resource_name)[source]¶ Retrieves the data of a resource from the global hcl state based on its type that has a count.
Parameters: - resource_type (basestring) – The resource type to retrieve the data for
- resource_name (basestring) – The resource name to retrieve the data for
Returns: Original non interpolated data (dict) for the provided resource name and resource type
-
get_resource_data_by_type
(resource_type, resource_name)[source]¶ Retrieves the data of a resource from the global hcl state based on its type.
Parameters: - resource_type (basestring) – The resource type to retrieve the data for
- resource_name (basestring) – The resource name to retrieve the data for
Returns: Interpolated data (dict) for the provided resource name and resource type
-
terraformtestinglib.terraformtestinglibexceptions module¶
Custom exception code for terraformtestinglib.
-
exception
terraformtestinglib.terraformtestinglibexceptions.
InvalidNaming
[source]¶ Bases:
Exception
The rules file provided was invalid.