I have a question, why doesn't `pulumi.Config().re...
# python
f
I have a question, why doesn't
pulumi.Config().require_bool()
pass a boolean value through? I have this type checking function that is failing.
Copy code
def type_check_decorator(func):
        def wrapper(self, *args, **kwargs):
            # Check types of specific arguments
            bool_vars = ["create_active_directory", "copy_tags_to_backups"]
            for boolvar in bool_vars:
                if not isinstance(kwargs.get(boolvar), bool):
                    raise TypeError(f"{boolvar} must be a boolean")
            int_vars = [
                "storage_capacity",
                "throughput_capacity",
                "automatic_backup_retention_days",
            ]
            for var in int_vars:
                if not isinstance(kwargs.get(var), int):
                    raise TypeError(f"{var} must be an integer")
            str_vars = [
                "service_name",
                "domain_name_suffix",
                "administrator_password",
                "directory_service_id",
                "deployment_type",
                "storage_type",
                "weekly_maintenance_start_time",
                "environment",
                "cor_selected_vpc",
                "cor_subnets_2",
                "cor_subnets_1",
                "cority_ems_sg",
            ]
            for strvars in str_vars:
                if not isinstance(kwargs.get(strvars), str):
                    raise TypeError(f"{strvars} must be a string")
            # Call the original function
            return func(self, *args, **kwargs)

        return wrapper
the error I'm getting is
Copy code
error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "C:\DevOps\GreenStone\RecloneofInvestorPortal\cority.infrastructure.pulumi\iac-development\jcontent-dev-v2\__main__.py", line 59, in <module>
        fsxArgs = fsx.CorityFSxArgs(
                  ^^^^^^^^^^^^^^^^^^
      File "C:\DevOps\GreenStone\RecloneofInvestorPortal\cority.infrastructure.pulumi\iac-development\jcontent-dev-v2\../../pkg\cority_aws_fsx.py", line 54, in wrapper
        raise TypeError(f"{boolvar} must be a boolean")
    TypeError: create_active_directory must be a boolean