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 snooze rules resource #218

Merged
merged 5 commits into from
Apr 3, 2024
Merged

Add snooze rules resource #218

merged 5 commits into from
Apr 3, 2024

Conversation

lambcode
Copy link
Contributor

Adds snooze rules as a resource to the terraform provider.

Note that I had to fix how we generate docs now that we have tofu as our terraform binary. The docs can still be created via the make docs command, and should now be agnostic to whether you have terraform or tofu installed.

@lightstep/team-alerts-be

@@ -38,6 +38,6 @@ Documentation files in `docs` are generated by combining:
Any edits to documentation files should be made in the `templates` directory or the .go files. Then you can use the following steps to generate the files in the docs directory:

1. Download `tfplugindocs` from https://github.com/hashicorp/terraform-plugin-docs/releases and make it available on your `PATH`
2. Run `$ make docs` or `$ tfplugindocs` from the root of this directory
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running tfplugindocs directly doesn't work anymore because tfplugindocs builds the provider with the registry.terraform.io prefix, but then calls the terraform binary which is now open-tofu that looks for plugins with the prefix of registry.opentofu.org.

tfplugindocs
docs: build
$(MAKE) -C tfplugindocs_working generate-schema
tfplugindocs generate --providers-schema tfplugindocs_working/schema.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now we generate the schema separately from generating the docs to allow us bypass the tfplugindocs auto compiling the provider.

Copy link

@gontzess gontzess left a comment

Choose a reason for hiding this comment

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

LGTM!

@lambcode lambcode force-pushed the blamb/snoozerules branch from 3c9284e to 572075d Compare April 3, 2024 15:52
@lambcode lambcode merged commit 7a9d1db into main Apr 3, 2024
6 checks passed
@lambcode lambcode deleted the blamb/snoozerules branch April 3, 2024 19:52
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