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

Blocks Support: Create prefect_block resource - Create(), Delete(), and ImportState() methods #174

Closed
parkedwards opened this issue May 23, 2024 · 0 comments · Fixed by #196
Assignees

Comments

@parkedwards
Copy link
Contributor

parkedwards commented May 23, 2024

https://www.notion.so/prefect/Design-Block-support-in-the-Terraform-Provider-ae2ea25a18864de9b51b8aa06af9486b?pvs=4

resource "prefect_block" "datadog_api_key" {
	name = "datadog-api-key"
	type = "secret"
	data = jsonencode({
		value = var.datadog_api_key
	})
}

Located in internal/provider/resources/block.go

We'll need to add a Create() and Delete() method on the pointer receiver for the BlockResource struct

We should be able to:

  1. create a new prefect_block
  2. have a prefect_block be unchanged if no attributes change

We'll need to add a ImportState() method on the pointer receiver for the BlockResource struct

Afterwards We should be able to:

  1. import an existing prefect_block
@parkedwards parkedwards changed the title Blocks Support: Create prefect_block resource Blocks Support: Create prefect_block resource CRUD methods May 31, 2024
@parkedwards parkedwards changed the title Blocks Support: Create prefect_block resource CRUD methods Blocks Support: Create prefect_block resource - Create() method May 31, 2024
@parkedwards parkedwards changed the title Blocks Support: Create prefect_block resource - Create() method Blocks Support: Create prefect_block resource - Create(), Read() methods May 31, 2024
@parkedwards parkedwards self-assigned this Jun 3, 2024
@parkedwards parkedwards changed the title Blocks Support: Create prefect_block resource - Create(), Read() methods Blocks Support: Create prefect_block resource - Create(), Delete(), and ImportState() methods Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant