-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix(infra): fix the remaining terraform constant changes #331
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
63ab645
fix(lambda): making lambda ignore git_sha changes
bassrock 5f06c12
fix(lambda): rotate env vars
bassrock df75eb8
fix(lambda): ignore git_sha
bassrock acbc063
fix(formatting): updating format and tests
bassrock 3ca448e
Merge branch 'main' into fixup/lambda-deploys
bassrock 815dcef
fix(gateway): making gateway not always redeploy
bassrock 776b7c2
fix(wait): adding in a wait command
bassrock b9c9be2
fix(tfcmt): adding a custom tfcmt
bassrock 6315a16
fix(variables): cleaning up environment variables
bassrock 0de68a2
fix(tfcmt): turning off tfcmt applies
bassrock 91abaa5
fix(shared-lists): making shared lists not recreate alarms
bassrock f8b5a75
fix(bot): moving to a github bot
bassrock 635b66f
fix(dynamodb): ignoring global secondary index changes
bassrock beefb25
fix(shareable-lists): fixing typo in shareable list name
bassrock 5c34139
Merge branch 'main' into 03-22-remaining_infra_changes
bassrock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# Default conifg for us to modify from https://suzuki-shunsuke.github.io/tfcmt/config#default-configuration | ||
embedded_var_names: [] | ||
templates: | ||
plan_title: "## {{if eq .ExitCode 1}}:x: {{end}}Plan Result{{if .Vars.target}} ({{.Vars.target}}){{end}}" | ||
apply_title: "## :{{if eq .ExitCode 0}}white_check_mark{{else}}x{{end}}: Apply Result{{if .Vars.target}} ({{.Vars.target}}){{end}}" | ||
|
||
result: "{{if .Result}}<pre><code>{{ .Result }}</code></pre>{{end}}" | ||
updated_resources: | | ||
{{if .CreatedResources}} | ||
* Create | ||
{{- range .CreatedResources}} | ||
* {{.}} | ||
{{- end}}{{end}}{{if .UpdatedResources}} | ||
* Update | ||
{{- range .UpdatedResources}} | ||
* {{.}} | ||
{{- end}}{{end}}{{if .DeletedResources}} | ||
* Delete | ||
{{- range .DeletedResources}} | ||
* {{.}} | ||
{{- end}}{{end}}{{if .ReplacedResources}} | ||
* Replace | ||
{{- range .ReplacedResources}} | ||
* {{.}} | ||
{{- end}}{{end}}{{if .ImportedResources}} | ||
* Import | ||
{{- range .ImportedResources}} | ||
* {{.}} | ||
{{- end}}{{end}}{{if .MovedResources}} | ||
* Move | ||
{{- range .MovedResources}} | ||
* {{.Before}} => {{.After}} | ||
{{- end}}{{end}} | ||
deletion_warning: | | ||
{{if .HasDestroy}} | ||
### :warning: Resource Deletion will happen :warning: | ||
This plan contains resource delete operation. Please check the plan result very carefully! | ||
{{end}} | ||
changed_result: | | ||
{{if .ChangedResult}} | ||
<details><summary>Change Result (Click me)</summary> | ||
{{wrapCode .ChangedResult}} | ||
</details> | ||
{{end}} | ||
change_outside_terraform: | | ||
{{if .ChangeOutsideTerraform}} | ||
<details><summary>:information_source: Objects have changed outside of Terraform</summary> | ||
|
||
_This feature was introduced from [Terraform v0.15.4](https://github.com/hashicorp/terraform/releases/tag/v0.15.4)._ | ||
{{wrapCode .ChangeOutsideTerraform}} | ||
</details> | ||
{{end}} | ||
warning: | | ||
{{if .Warning}} | ||
## :warning: Warnings :warning: | ||
{{wrapCode .Warning}} | ||
{{end}} | ||
error_messages: | | ||
{{if .ErrorMessages}} | ||
## :warning: Errors | ||
{{range .ErrorMessages}} | ||
* {{. -}} | ||
{{- end}}{{end}} | ||
guide_apply_failure: "" | ||
guide_apply_parse_error: "" | ||
terraform: | ||
plan: | ||
disable_label: false | ||
template: | | ||
{{template "plan_title" .}} | ||
|
||
{{if .Link}}[CI link]({{.Link}}){{end}} | ||
|
||
{{template "deletion_warning" .}} | ||
{{template "result" .}} | ||
{{template "updated_resources" .}} | ||
|
||
{{template "changed_result" .}} | ||
{{template "change_outside_terraform" .}} | ||
{{template "warning" .}} | ||
{{template "error_messages" .}} | ||
when_add_or_update_only: | ||
label: "{{if .Vars.target}}{{.Vars.target}}/{{end}}add-or-update" | ||
label_color: 1d76db # blue | ||
# disable_label: false | ||
when_destroy: | ||
label: "{{if .Vars.target}}{{.Vars.target}}/{{end}}destroy" | ||
label_color: d93f0b # red | ||
# disable_label: false | ||
when_no_changes: | ||
label: "{{if .Vars.target}}{{.Vars.target}}/{{end}}no-changes" | ||
label_color: 0e8a16 # green | ||
disable_label: true | ||
disable_comment: true | ||
when_plan_error: | ||
label: | ||
label_color: | ||
# disable_label: false | ||
when_parse_error: | ||
template: | | ||
{{template "plan_title" .}} | ||
|
||
{{if .Link}}[CI link]({{.Link}}){{end}} | ||
|
||
It failed to parse the result. | ||
|
||
<details><summary>Details (Click me)</summary> | ||
{{wrapCode .CombinedOutput}} | ||
</details> | ||
apply: | ||
template: | | ||
{{template "apply_title" .}} | ||
|
||
{{if .Link}}[CI link]({{.Link}}){{end}} | ||
|
||
{{if ne .ExitCode 0}}{{template "guide_apply_failure" .}}{{end}} | ||
|
||
{{template "result" .}} | ||
|
||
<details><summary>Details (Click me)</summary> | ||
{{wrapCode .CombinedOutput}} | ||
</details> | ||
{{template "error_messages" .}} | ||
when_parse_error: | ||
template: | | ||
{{template "apply_title" .}} | ||
|
||
{{if .Link}}[CI link]({{.Link}}){{end}} | ||
|
||
{{template "guide_apply_parse_error" .}} | ||
|
||
It failed to parse the result. | ||
|
||
<details><summary>Details (Click me)</summary> | ||
{{wrapCode .CombinedOutput}} | ||
</details> | ||
# When https://github.com/suzuki-shunsuke/tfcmt/issues/1184 is done, we can make it so tfcmt doesn't comment on a no-op apply! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly I couldn't find an orb to do this for us. But this script will take the Github Bot secrets and convert it to a regular access token like we already use, valid for 10 min.
i wish CircleCI let us ask for a github access token like Github Actions do, then this wouldnt be necessary 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, we can make this an orb of our own later?