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 - Tests + Docs #183

Closed
parkedwards opened this issue May 31, 2024 · 3 comments · Fixed by #205
Closed

Blocks Support: Create prefect_block resource - Tests + Docs #183

parkedwards opened this issue May 31, 2024 · 3 comments · Fixed by #205
Assignees

Comments

@parkedwards
Copy link
Contributor

parkedwards commented May 31, 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

Also, be sure to include acceptance tests and docs

  • /internal/provider/resources/block_test.go
  • /examples/resources/prefect_block
@parkedwards parkedwards changed the title Blocks Support: Create prefect_block resource - ImportState() + Tests + Docs Blocks Support: Create prefect_block resource - Tests + Docs Jun 4, 2024
@mitchnielsen
Copy link
Contributor

I'll pick this up for now as I'd like to learn how this part works, but feel free to reassign if needed.

@parkedwards
Copy link
Contributor Author

parkedwards commented Jun 5, 2024

ah @mitchnielsen i just saw you grabbed it, sorry man. in #196 i added some foundations for a block_test.go file, so there should be some stuff for us to look at for followup PRs

i also couldn't quite get this to work, i think we might be missing some logic to gracefully handle the different URL schemas between open source and cloud

@mitchnielsen
Copy link
Contributor

No worries at all, sounds good! And good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants