Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy flows #5

Closed
theoplatt opened this issue Feb 20, 2023 · 7 comments
Closed

Deploy flows #5

theoplatt opened this issue Feb 20, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@theoplatt
Copy link

It would be great if you could deploy flows via this provider too.

We have a lot of AWS infrastructure that we deploy via a terraform module to match the needs of a flow. It would be awesome to add this provider in there to deploy the flow for us too - that way we could use the terraform module versioning as a way to version the flow and keep all our deployments in line.

@mpayne-coveo
Copy link

I second this. This would be very useful for us to have as well.

@carlosjourdan
Copy link

We started using the provider very early in a client, and a lot of features were still unsupported. We have very little experience with golang and terraform, but were able to fork the repository and implement a couple of resources and datasources.

Now we have an outdated version, and it seems that it would be a good strategy to switch back to the official provider. One of the main gaps that we're still seeing is provider support.

So we're considering creating a PR to merge our code. This is what our resource model looks like:

type DeploymentResourceModel struct {
	ID          customtypes.UUIDValue      `tfsdk:"id"`
	Created     customtypes.TimestampValue `tfsdk:"created"`
	Updated     customtypes.TimestampValue `tfsdk:"updated"`
	AccountID   customtypes.UUIDValue      `tfsdk:"account_id"`
	WorkspaceID customtypes.UUIDValue      `tfsdk:"workspace_id"`

	Name                       types.String          `tfsdk:"name"`
	FlowID                     customtypes.UUIDValue `tfsdk:"flow_id"`
	InfrastructureBlockID      customtypes.UUIDValue `tfsdk:"infrastructure_block_id"`
	StorageBlockID             customtypes.UUIDValue `tfsdk:"storage_block_id"`
	Path                       types.String          `tfsdk:"path"`
	EntryPoint                 types.String          `tfsdk:"entrypoint"`
	WorkPoolName               types.String          `tfsdk:"work_pool_name"`
	WorkQueueName              types.String          `tfsdk:"work_queue_name"`
	ParameterOpenApiSchemaJson jsontypes.Normalized `tfsdk:"parameters_openapi_schema_json"`
	ParametersJson             jsontypes.Normalized `tfsdk:"parameters_json"`
	ScheduleJson               jsontypes.Normalized `tfsdk:"schedule_json"`
	IsScheduleActive           types.Bool            `tfsdk:"is_schedule_active"`
}

We took a shortcut by using jsontypes in some complex fields that maybe could be better modeled. The decision to add the "_json" suffix to those fields was to allow for backwards compatibility in case they were properly implemented as nested attributes. Is that something that could fly on the main codebase?

@oieduardorabelo
Copy link

oieduardorabelo commented Jun 6, 2024

hey @mitchnielsen , what are the plans to support flow deployment?

i have a similar scenario to OP:

  • multiple aws accounts for each customer (customerA, customerB, customerC, etc)

  • for each customer, we need to deploy multiple flows (today we have 10 base flows + orchestration)

we are running the prefect sdk in python to deploy the flows (e.g. prefect_cloud_deploy.py)

when we rename a flow, or need to delete one, we need to manually apply the changes across all flow deployments (which is slow, boring and error-prone)

are there any comments you could share publicly? thank you

@mitchnielsen
Copy link
Contributor

Thanks everyone for reaching out. We're currently focused on adding Block support, but achieving parity with the API is a tentative goal (things can always change of course but that's what we'd like to eventually reach).

I see #163 adds support for a few resources including Deployments and Flows. I just asked the author to consider splitting it up into separate PRs, which should improve the timeline of getting those changes merged.

Appreciate the insight into use cases and brainstorming 👍🏼

@mitchnielsen mitchnielsen added the enhancement New feature or request label Jun 6, 2024
@taylor-curran
Copy link

I have a large plus one to this request

@jerseymec
Copy link

jerseymec commented Jul 18, 2024 via email

@mitchnielsen
Copy link
Contributor

Good news, support for Flows is already available thanks to the contribution from @skyscrapr in #201 🎉

I'll go ahead and close this one, and will track support for Deployments in #238.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants