sparse-intern-71089
02/22/2022, 11:32 AMprehistoric-activity-61023
02/22/2022, 12:25 PMmypy
doesn’t complain using # type: ignore
comment (I’d use it as a last resort)
• fix the code so it actually returns the expected types (ideal but the hardest one)prehistoric-activity-61023
02/22/2022, 12:33 PMpulumi.StackReference
class or create some helper methods yourself that does type assertions (get_string_output(stack_ref: pulumi.StackReference, name: pulumi.Input[str]) -> pulumi.Output[str]
). Another problem might be AWS provider that expects Optional[str]
instead of Input[str]
.prehistoric-activity-61023
02/22/2022, 12:33 PMprofile
), I’d have to take a look but if the following code works, you might be right.prehistoric-activity-61023
02/22/2022, 12:40 PMprofile
is declared as Optional[pulumi.Input[str]]
so it shouldn’t cause any issues).aws.config
I guess.prehistoric-activity-61023
02/22/2022, 12:50 PMprehistoric-activity-61023
02/22/2022, 12:52 PMaws_config: aws.config.vars._ExportableConfig = typing.cast(aws.config, aws.config.vars._ExportableConfig)
and instead of:
aws.config.profile
you could use:
aws_config.profile
Still, it doesn’t look good IMO 😐prehistoric-activity-61023
02/22/2022, 12:54 PMdef aws_profile() -> str:
return aws.config.profile # type: ignore
and use it that instead of directly accessing aws.config
object