Hi all, I am using prefect 2.1.1 trying to build a...
# prefect-community
d
Hi all, I am using prefect 2.1.1 trying to build a deployment through the provided python object [
from prefect.deployments import Deployment
]. I am not sure about how to get
infrastructure block
and
storage block
(created through the UI) added to the Deployment. Is this feature not included in the object?
1
a
you can totally do that - if not please share your error, but I agree using CLI for this is easier
d
@Anna Geller what would be the parameter argument for them? Passing string into infra and storage gives type validation issues.
a
-ib infra_block_type/infra_block_name
d
@Anna Geller I meant through the python Deployment object
a
e.g. DockerContainer.load("name")
again, I prefer CLI so no expert on the Python UX
d
thanks what about storage container?
a
same S3.load("name")
d
Thank you. Ill test it out.
🙌 1
While having CLI commands in a script to perform deployments is okay [Ive manged to get the CLI commands working and tested], Because we are already writing the flows in python would be great to have deployment scripts in python as well. But CLI is good 🙂
a
Good is an understatement, this CLI is amazing :)
🙌 2
🍷 2