sparse-intern-71089
06/29/2021, 6:02 PMred-match-15116
06/29/2021, 6:05 PMgreat-sunset-355
06/29/2021, 6:14 PMArgs
if possible because it's not consistent with docs
Then make use of namespaces as Zen of python says - I wonder how it would look if we could break it down into packages
import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Let's say:
I have ServiceSourceConfiguration
great-sunset-355
06/29/2021, 6:15 PMred-match-15116
06/29/2021, 6:17 PMArgs
classes. They are provided as a convenience and an alternative to using keyword args. We added them recently as a user request so that args could be passed around separately from the resources.
That being said, this is not about python but how the resources are structured in the encapsulating providers. Anyway, welcome to our world… let us know if you figure out how to do it in a way that you find more appealing and we’ll consider it 🙂great-sunset-355
06/29/2021, 6:20 PMgreat-sunset-355
06/29/2021, 6:24 PMauthentication_configuration={
"connection_arn": aws_apprunner_connection["example"]["arn"],
}
I'd rather
authentication_configuration=AuthenticationConfiguration(connection_arn='asdf')
In case this would be a conflict then use namespace -> sub-packagegreat-sunset-355
06/29/2021, 6:25 PMfrom pulumi_aws.apprunner.service import AuthenticationConfiguration
red-match-15116
06/30/2021, 5:04 AMI’d rather
authentication_configuration=AuthenticationConfiguration(connection_arn='asdf')
This is how it currently works.great-sunset-355
06/30/2021, 2:34 PMServiceSourceConfigurationAuthenticationConfiguration
it should be at least 2 or 3 nested packages in order to prevent namespace conflicts.
not just concacetnating namesgreat-sunset-355
06/30/2021, 2:36 PMConfiguration
repeats in the name twice.
In this class even three times!
ServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfiguration
great-sunset-355
06/30/2021, 2:38 PMred-match-15116
06/30/2021, 3:49 PM