# Path: tibanna/vars.py
# AWS_REGION = os.environ.get('TIBANNA_AWS_REGION', '')
# 
# AWS_ACCOUNT_NUMBER = os.environ.get('AWS_ACCOUNT_NUMBER', '')
# 
# SFN_TYPE = 'unicorn'
# 
# UPDATE_COST_LAMBDA_NAME = 'update_cost_awsem'
# 
# Path: tibanna/utils.py
# def create_tibanna_suffix(suffix, usergroup):
#     if usergroup and suffix:
#         function_name_suffix = usergroup + '_' + suffix
#     elif suffix:
#         function_name_suffix = suffix
#     elif usergroup:
#         function_name_suffix = usergroup
#     else:
#         function_name_suffix = ''
# 
#     if function_name_suffix:
#         return '_' + function_name_suffix
#     else:
#         return ''


from .vars import (
    AWS_REGION,
    AWS_ACCOUNT_NUMBER,
    SFN_TYPE,
    UPDATE_COST_LAMBDA_NAME
)
from .utils import create_tibanna_suffix
        from .iam_utils import IAM
    @property
    def sfn_start_lambda(self):
        return 'Wait'

    @property
    def sfn_state_defs(self):
        state_defs = {
            "Wait": {
            "Type": "Wait",
            "Seconds": 43200, # Check every 12h
            "Next": "UpdateCostAwsem"
            },
            "UpdateCostAwsem": {
                "Type": "Task",
                "Resource": self.lambda_arn_prefix + UPDATE_COST_LAMBDA_NAME + self.lambda_suffix,
                "ResultPath": "$.done",
                "Next": "UpdateCostDone"
            },
            "UpdateCostDone": {
              "Type": "Choice",
              "Choices": [
                {
                  "Variable": "$.done.done",
                  "BooleanEquals": True,
                  "Next": "Done"
                }
              ],
              "Default": "Wait"
            },
            "Done": {

# Path: tibanna/vars.py
# AWS_REGION = os.environ.get('TIBANNA_AWS_REGION', '')
# 
# AWS_ACCOUNT_NUMBER = os.environ.get('AWS_ACCOUNT_NUMBER', '')
# 
# SFN_TYPE = 'unicorn'
# 
# UPDATE_COST_LAMBDA_NAME = 'update_cost_awsem'
# 
# Path: tibanna/utils.py
# def create_tibanna_suffix(suffix, usergroup):
#     if usergroup and suffix:
#         function_name_suffix = usergroup + '_' + suffix
#     elif suffix:
#         function_name_suffix = suffix
#     elif usergroup:
#         function_name_suffix = usergroup
#     else:
#         function_name_suffix = ''
# 
#     if function_name_suffix:
#         return '_' + function_name_suffix
#     else:
#         return ''


# Path: tibanna/stepfunction_cost_updater.py
from .vars import (
    AWS_REGION,
    AWS_ACCOUNT_NUMBER,
    SFN_TYPE,
    UPDATE_COST_LAMBDA_NAME
)
from .utils import create_tibanna_suffix
        from .iam_utils import IAM

    @property
    def sfn_start_lambda(self):
        return 'Wait'

    @property
    def sfn_state_defs(self):
        state_defs = {
            "Wait": {
            "Type": "Wait",
            "Seconds": 43200, # Check every 12h
            "Next": "UpdateCostAwsem"
            },
            "UpdateCostAwsem": {
                "Type": "Task",
                "Resource": self.lambda_arn_prefix + UPDATE_COST_LAMBDA_NAME + self.lambda_suffix,
                "ResultPath": "$.done",
                "Next": "UpdateCostDone"
            },
            "UpdateCostDone": {
              "Type": "Choice",
              "Choices": [
                {
                  "Variable": "$.done.done",
                  "BooleanEquals": True,
                  "Next": "Done"
                }
              ],
              "Default": "Wait"
            },
            "Done": {

              "Type": "Pass",