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

[ENH] Render.com Terraform Blueprint #1176

Merged

Conversation

tazarov
Copy link
Contributor

@tazarov tazarov commented Sep 23, 2023

Description of changes

Summarize the changes made by this PR.

  • New functionality
    • New blueprint for render.com

Test plan

How are these changes tested?

Manual testing

Documentation Changes

README part of the deployment

- Somewhat working version - README is WIP and variables need cleanup
@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readbility, Modularity, Intuitiveness)

- Fixed up readme
- Instance creation and deletion working (PR on provider to fix issues + add new functionality)
- ISSUE: there seems to be an issue with env vars as they don't seem to be taken into account that needs further investigation.
- Variables cleanup
- After updating Render-go upstream and another PR on terraform-render provider, this is finally looking to do almost what we need. There is a Support ticket on Render to clarify why env vars are not populated properly.
- Added a workaround to solved the env var propagation issue.
@tazarov tazarov changed the title [ENH] Render.com Terraform Blueprint - WIP [ENH] Render.com Terraform Blueprint Sep 29, 2023
@tazarov tazarov marked this pull request as ready for review September 29, 2023 03:08
@tazarov
Copy link
Contributor Author

tazarov commented Sep 29, 2023

@beggers ready for review.

Copy link
Contributor

@beggers beggers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits and requests to delete some unused variables, but this looks awesome. Chroma everywhere!

examples/deployments/render-terraform/README.md Outdated Show resolved Hide resolved
examples/deployments/render-terraform/README.md Outdated Show resolved Hide resolved
examples/deployments/render-terraform/variables.tf Outdated Show resolved Hide resolved
examples/deployments/render-terraform/variables.tf Outdated Show resolved Hide resolved
- Redid the whole provider env var submission with web service create request and now everything is faster and does not require workarounds.
- Used auth_type var in deployment
@tazarov
Copy link
Contributor Author

tazarov commented Sep 29, 2023

Here's a Workaround until provider changes are merged:

  • git clone -b feature/image-details-inservice-post https://github.com/amikos-tech/render-go/ render-go
  • git clone -b feature/web-service-details-disk-support https://github.com/amikos-tech/terraform-provider-render render-provider
cat <<EOF > render-provider/render-patch.patch
Subject: [PATCH] feat: Persistent disk support for Web Service Details

- Added support for EnvVar in ServicePOST request
- Added support for Image type of service in ServicePOST
---
Index: go.mod
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/go.mod b/go.mod
--- a/go.mod	(revision 8b0311aadb1546f041b91fdf50275d65f8a6128f)
+++ b/go.mod	(date 1695977058413)
@@ -11,6 +11,10 @@
 	github.com/jackall3n/render-go v1.1.0
 )
 
+replace (
+	github.com/jackall3n/render-go => ../render-go
+)
+
 require (
 	github.com/Masterminds/goutils v1.1.1 // indirect
 	github.com/Masterminds/semver/v3 v3.1.1 // indirect
EOF
  • cd render-provider && git apply render-patch.patch
  • go build -o terraform-provider-render && mkdir -p ~/.terraform.d/plugins/registry.terraform.io/jackall3n/render/1.3.0/<os>_<arch> && mv terraform-provider-render ~/.terraform.d/plugins/registry.terraform.io/jackall3n/render/1.3.0/<os>_<arch> (replace and with your OS and architecture, e.g. darwin_arm64)
  • Go to your terraform project and run rm -rf .terraform .terraform.lock.hcl && terraform init -upgrade
  • Proceed as per README.md

@beggers
Copy link
Contributor

beggers commented Sep 29, 2023

This looks great! Always happy to keep state in TF vars

@beggers beggers merged commit 5b0ff2e into chroma-core:main Oct 2, 2023
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 this pull request may close these issues.

2 participants