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

Add OpenTofu module examples for blog posts #163

Merged
merged 13 commits into from
Mar 5, 2024

Conversation

brikis98
Copy link
Member

Description

These are examples that are used in a blog post to announce Boilerplate. I figured it made sense to add the official versions of these examples to this repo, where we could also have automated tests for them.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

@brikis98
Copy link
Member Author

OK, tests are passing, so this is ready for review.

@brikis98
Copy link
Member Author

brikis98 commented Mar 5, 2024

@denis256 Could I get a review on this PR? It also includes a file with { in the name, so it may need to be merged into your #164 PR.

@denis256
Copy link
Member

denis256 commented Mar 5, 2024

Taking a look

@brikis98
Copy link
Member Author

brikis98 commented Mar 5, 2024

Actually, hold up on reviewing for one minute! I need to rename a few things.

@brikis98 brikis98 changed the title Add Terraform module examples for blog posts Add OpenTofu module examples for blog posts Mar 5, 2024
Snap isn't available
@@ -0,0 +1,23 @@
package test
Copy link
Member

Choose a reason for hiding this comment

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

Having a file with {{ in git will break the git clone in Windows...

So far I thought about generation of files at runtime in "unix" tests:

  • have generic file name like "module_test.go.template"
  • in "unix" test copy the test directory to temp dir
  • rename file to "{{..."
  • run tests

I can handle this in my windows CICD branch

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I saw that. Windows is always such a PITA :-D

The one catch with code-generating this example is that I'm linking to the example from the new blog post... So if it's code-generated, that doesn't quite work... Is there any other alternative? Does it work with Cygwin or something?

@brikis98
Copy link
Member Author

brikis98 commented Mar 5, 2024

Thanks for the review. Merging now so I can get the blog post published.

@brikis98 brikis98 merged commit 02cc60c into master Mar 5, 2024
3 checks passed
@brikis98 brikis98 deleted the enhancement/terraform-module-examples branch March 5, 2024 16:55
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