From 3b7ef9ea978227055c655b12ccd2445764e0a186 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Sun, 5 Feb 2023 10:57:00 -0700 Subject: [PATCH 01/14] Changing security rules --- main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 5d9beb7..ce5e93c 100644 --- a/main.tf +++ b/main.tf @@ -10,8 +10,8 @@ resource "aws_security_group_rule" "egress" { type = "egress" cidr_blocks = ["0.0.0.0/0"] from_port = 0 - to_port = 65535 - protocol = "tcp" + to_port = 0 + protocol = "-1" } resource "aws_security_group_rule" "ingress_any" { @@ -19,8 +19,8 @@ resource "aws_security_group_rule" "ingress_any" { type = "ingress" cidr_blocks = var.private_subnets_cidr_blocks from_port = 0 - to_port = 65535 - protocol = "all" + to_port = 0 + protocol = "-1" } resource "aws_network_interface" "this" { From df58b79787bb3b124be0c9b2b17d018ce4c781cc Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Mon, 3 Apr 2023 14:40:51 -0600 Subject: [PATCH 02/14] changing instance types to t4g and t3a --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 21b2abf..02280b3 100644 --- a/variables.tf +++ b/variables.tf @@ -39,7 +39,7 @@ variable "image_id" { variable "instance_types" { description = "Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy" type = list(string) - default = ["t3.nano", "t3a.nano"] + default = ["t4g.nano", "t3a.nano"] } variable "use_spot_instance" { From bd2c80236679d0ca29aaac2b80270a39e22c2e1d Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Thu, 6 Apr 2023 15:13:57 -0600 Subject: [PATCH 03/14] changing instance types to t4g and changed default to a on-demand instance and not a spot instance --- README.md | 37 +++++++++++++++----------- main.tf | 20 +------------- runonce.sh | 11 ++++---- snat.service | 4 ++- snat.sh | 74 ++++++++++++++++++++++++++++++++++++++++------------ variables.tf | 8 +++++- 6 files changed, 96 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 4ccb2f4..c33fa24 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,13 @@ Move "module.nat.aws_eip.this" to "aws_eip.nat" Successfully moved 1 object(s). ``` +## Changes for latest version + +Default is on-demand and not a spot instance. Also instance type is default t4g.nano to change this you need to add + + +instance_types = ["t3.nano"] +architecture = ["x86_64"] ## Contributions @@ -163,22 +170,22 @@ No requirements. ## Inputs -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [enabled](#input\_enabled) | Enable or not costly resources | `bool` | `true` | no | -| [image\_id](#input\_image\_id) | AMI of the NAT instance. Default to the latest Amazon Linux 2 | `string` | `""` | no | -| [instance\_types](#input\_instance\_types) | Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy | `list(string)` |
[
"t3.nano",
"t3a.nano"
]
| no | -| [key\_name](#input\_key\_name) | Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance | `string` | `""` | no | -| [name](#input\_name) | Name for all the resources as identifier | `string` | n/a | yes | -| [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance | `list(string)` | `[]` | no | -| [private\_subnets\_cidr\_blocks](#input\_private\_subnets\_cidr\_blocks) | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `list(string)` | n/a | yes | -| [public\_subnet](#input\_public\_subnet) | ID of the public subnet to place the NAT instance | `string` | n/a | yes | +| Name | Description | Type | Default | Required | +|------|-------------|------|----------------------------------------------------------|:--------:| +| [enabled](#input\_enabled) | Enable or not costly resources | `bool` | `true` | no | +| [image\_id](#input\_image\_id) | AMI of the NAT instance. Default to the latest Amazon Linux 2 | `string` | `""` | no | +| [instance\_types](#input\_instance\_types) | Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy | `list(string)` |
[
"t3.nano",
"t3a.nano"
]
| no | +| [key\_name](#input\_key\_name) | Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance | `string` | `""` | no | +| [name](#input\_name) | Name for all the resources as identifier | `string` | n/a | yes | +| [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance | `list(string)` | `[]` | no | +| [private\_subnets\_cidr\_blocks](#input\_private\_subnets\_cidr\_blocks) | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `list(string)` | n/a | yes | +| [public\_subnet](#input\_public\_subnet) | ID of the public subnet to place the NAT instance | `string` | n/a | yes | | [ssm\_policy\_arn](#input\_ssm\_policy\_arn) | SSM Policy to be attached to instance profile | `string` | `"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"` | no | -| [tags](#input\_tags) | Tags applied to resources created with this module | `map(string)` | `{}` | no | -| [use\_spot\_instance](#input\_use\_spot\_instance) | Whether to use spot or on-demand EC2 instance | `bool` | `true` | no | -| [user\_data\_runcmd](#input\_user\_data\_runcmd) | Additional runcmd section of cloud-init | `list(list(string))` | `[]` | no | -| [user\_data\_write\_files](#input\_user\_data\_write\_files) | Additional write\_files section of cloud-init | `list(any)` | `[]` | no | -| [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes | +| [tags](#input\_tags) | Tags applied to resources created with this module | `map(string)` | `{}` | no | +| [use\_spot\_instance](#input\_use\_spot\_instance) | Whether to use spot or on-demand EC2 instance | `bool` | `false` | no | +| [user\_data\_runcmd](#input\_user\_data\_runcmd) | Additional runcmd section of cloud-init | `list(list(string))` | `[]` | no | +| [user\_data\_write\_files](#input\_user\_data\_write\_files) | Additional write\_files section of cloud-init | `list(any)` | `[]` | no | +| [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes | ## Outputs diff --git a/main.tf b/main.tf index ce5e93c..b35241a 100644 --- a/main.tf +++ b/main.tf @@ -44,7 +44,7 @@ data "aws_ami" "this" { owners = ["amazon"] filter { name = "architecture" - values = ["x86_64"] + values = var.architecture } filter { name = "root-device-type" @@ -191,21 +191,3 @@ resource "aws_iam_role_policy_attachment" "ssm" { role = aws_iam_role.this.name } -resource "aws_iam_role_policy" "eni" { - role = aws_iam_role.this.name - name_prefix = var.name - policy = < $i; +done + +echo "Flushing NAT table..." +iptables -t nat -F -# switch the default route to eth1 -ip route del default dev eth0 +echo "Adding NAT rule..." +iptables -t nat -A POSTROUTING -o "$nat_interface" -j MASQUERADE -m comment --comment "NAT routing rule installed" -# wait for network connection -curl --retry 10 http://www.example.com +service iptables save -# reestablish connections -systemctl restart amazon-ssm-agent.service +echo "Done!" diff --git a/variables.tf b/variables.tf index 02280b3..5a28cfb 100644 --- a/variables.tf +++ b/variables.tf @@ -42,10 +42,16 @@ variable "instance_types" { default = ["t4g.nano", "t3a.nano"] } +variable "architecture" { + description = "Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy" + type = list(string) + default = ["arm64"] +} + variable "use_spot_instance" { description = "Whether to use spot or on-demand EC2 instance" type = bool - default = true + default = false } variable "key_name" { From 7065f9a83179ef7468a94736d583f06ebc9ef9d0 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Fri, 7 Apr 2023 09:08:39 -0600 Subject: [PATCH 04/14] reworking documentation --- README.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c33fa24..d5f2fda 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,13 @@ Move "module.nat.aws_eip.this" to "aws_eip.nat" Successfully moved 1 object(s). ``` -## Changes for latest version +## Changes for latest version 3.0.0 Default is on-demand and not a spot instance. Also instance type is default t4g.nano to change this you need to add instance_types = ["t3.nano"] + architecture = ["x86_64"] ## Contributions @@ -170,22 +171,22 @@ No requirements. ## Inputs -| Name | Description | Type | Default | Required | -|------|-------------|------|----------------------------------------------------------|:--------:| -| [enabled](#input\_enabled) | Enable or not costly resources | `bool` | `true` | no | -| [image\_id](#input\_image\_id) | AMI of the NAT instance. Default to the latest Amazon Linux 2 | `string` | `""` | no | -| [instance\_types](#input\_instance\_types) | Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy | `list(string)` |
[
"t3.nano",
"t3a.nano"
]
| no | -| [key\_name](#input\_key\_name) | Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance | `string` | `""` | no | -| [name](#input\_name) | Name for all the resources as identifier | `string` | n/a | yes | +| Name | Description | Type | Default | Required | +|------|-------------------------------------------------------------------------------------------------------------------------------|------|----------------------------------------------------------|:--------:| +| [enabled](#input\_enabled) | This variable is for enabling auto scaling desired capacity and minimum size in the auto scaling group. | `bool` | `true` | no | +| [image\_id](#input\_image\_id) | AMI of the NAT instance. Default to the latest Amazon Linux 2 | `string` | `""` | no | +| [instance\_types](#input\_instance\_types) | Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy | `list(string)` |
[
"t3.nano",
"t3a.nano"
]
| no | +| [key\_name](#input\_key\_name) | Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance | `string` | `""` | no | +| [name](#input\_name) | Name for all the resources as identifier | `string` | n/a | yes | | [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance | `list(string)` | `[]` | no | -| [private\_subnets\_cidr\_blocks](#input\_private\_subnets\_cidr\_blocks) | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `list(string)` | n/a | yes | -| [public\_subnet](#input\_public\_subnet) | ID of the public subnet to place the NAT instance | `string` | n/a | yes | -| [ssm\_policy\_arn](#input\_ssm\_policy\_arn) | SSM Policy to be attached to instance profile | `string` | `"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"` | no | -| [tags](#input\_tags) | Tags applied to resources created with this module | `map(string)` | `{}` | no | -| [use\_spot\_instance](#input\_use\_spot\_instance) | Whether to use spot or on-demand EC2 instance | `bool` | `false` | no | -| [user\_data\_runcmd](#input\_user\_data\_runcmd) | Additional runcmd section of cloud-init | `list(list(string))` | `[]` | no | -| [user\_data\_write\_files](#input\_user\_data\_write\_files) | Additional write\_files section of cloud-init | `list(any)` | `[]` | no | -| [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes | +| [private\_subnets\_cidr\_blocks](#input\_private\_subnets\_cidr\_blocks) | List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets | `list(string)` | n/a | yes | +| [public\_subnet](#input\_public\_subnet) | ID of the public subnet to place the NAT instance | `string` | n/a | yes | +| [ssm\_policy\_arn](#input\_ssm\_policy\_arn) | SSM Policy to be attached to instance profile | `string` | `"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"` | no | +| [tags](#input\_tags) | Tags applied to resources created with this module | `map(string)` | `{}` | no | +| [use\_spot\_instance](#input\_use\_spot\_instance) | Whether to use spot or on-demand EC2 instance | `bool` | `false` | no | +| [user\_data\_runcmd](#input\_user\_data\_runcmd) | Additional runcmd section of cloud-init | `list(list(string))` | `[]` | no | +| [user\_data\_write\_files](#input\_user\_data\_write\_files) | Additional write\_files section of cloud-init | `list(any)` | `[]` | no | +| [vpc\_id](#input\_vpc\_id) | ID of the VPC | `string` | n/a | yes | ## Outputs From 666521ac8401fa0f3dbeed006f80979af5a167b9 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Fri, 7 Apr 2023 14:24:24 -0600 Subject: [PATCH 05/14] reworking documentation --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index b35241a..b89bf83 100644 --- a/main.tf +++ b/main.tf @@ -52,7 +52,7 @@ data "aws_ami" "this" { } filter { name = "name" - values = ["amzn2-ami-hvm-*"] + values = ["al2023-*"] } filter { name = "virtualization-type" @@ -60,7 +60,7 @@ data "aws_ami" "this" { } filter { name = "block-device-mapping.volume-type" - values = ["gp2"] + values = ["gp3"] } } From 6cf28c4b99fb25a29b8643eaf20f7a2bcfeb63c4 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Fri, 7 Apr 2023 14:34:27 -0600 Subject: [PATCH 06/14] removing the t3.nano from instance type. --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 5a28cfb..d55b40f 100644 --- a/variables.tf +++ b/variables.tf @@ -39,7 +39,7 @@ variable "image_id" { variable "instance_types" { description = "Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy" type = list(string) - default = ["t4g.nano", "t3a.nano"] + default = ["t4g.nano"] } variable "architecture" { From c3e5a96327ab769402959ffae4e81855cc238046 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Fri, 7 Apr 2023 15:26:39 -0600 Subject: [PATCH 07/14] changed network attachment --- main.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index b89bf83..7e3c797 100644 --- a/main.tf +++ b/main.tf @@ -79,9 +79,8 @@ resource "aws_launch_template" "this" { } network_interfaces { - associate_public_ip_address = true - security_groups = [aws_security_group.this.id] - delete_on_termination = true + device_index = 0 + network_interface_id = aws_network_interface.this.id } tag_specifications { From 5494c6d385cb7d095cef06cde9fef013e490e3f5 Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Fri, 7 Apr 2023 15:32:29 -0600 Subject: [PATCH 08/14] changed network attachment --- main.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 7e3c797..d0abe30 100644 --- a/main.tf +++ b/main.tf @@ -1,3 +1,7 @@ +data "aws_network_interface" "this" { + id = aws_network_interface.this.id +} + resource "aws_security_group" "this" { name_prefix = var.name vpc_id = var.vpc_id @@ -123,7 +127,7 @@ resource "aws_autoscaling_group" "this" { desired_capacity = var.enabled ? 1 : 0 min_size = var.enabled ? 1 : 0 max_size = 1 - vpc_zone_identifier = [var.public_subnet] + availability_zones = [data.aws_network_interface.this.availability_zone] mixed_instances_policy { instances_distribution { From 8f21ec062e0cebefac956e171e6062290e3c3477 Mon Sep 17 00:00:00 2001 From: Erik Jensen <365211+erikrj@users.noreply.github.com> Date: Tue, 18 Apr 2023 17:24:38 -0600 Subject: [PATCH 09/14] Fixing AMI --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index d0abe30..f4b0bc1 100644 --- a/main.tf +++ b/main.tf @@ -56,7 +56,7 @@ data "aws_ami" "this" { } filter { name = "name" - values = ["al2023-*"] + values = ["al2023-ami-minimal*"] } filter { name = "virtualization-type" From 1c6374aa45474074137d064d16d8a57091d9458b Mon Sep 17 00:00:00 2001 From: darenmcgill Date: Mon, 31 Jul 2023 10:40:57 -0600 Subject: [PATCH 10/14] adding variable file to module --- version.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 version.tf diff --git a/version.tf b/version.tf new file mode 100644 index 0000000..734f855 --- /dev/null +++ b/version.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 0.13.1" + + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 4.0" + } + } +} \ No newline at end of file From 7bf0fdac780880c21716c07063d121c573a28c90 Mon Sep 17 00:00:00 2001 From: Erik Jensen <365211+erikrj@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:27:30 -0600 Subject: [PATCH 11/14] Updating workflows and license --- .github/dependabot.yml | 10 ++ .github/workflows/ci.yml | 13 +++ .github/workflows/issues.yml | 14 +++ .github/workflows/publish.yml | 16 +++ CODEOWNERS | 1 + LICENSE | 214 ++++------------------------------ version.txt | 3 + 7 files changed, 81 insertions(+), 190 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/issues.yml create mode 100644 .github/workflows/publish.yml create mode 100644 CODEOWNERS create mode 100644 version.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c8e2cee --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + - package-ecosystem: terraform + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ad4f9e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,13 @@ +on: + push: + branches: + - develop + pull_request: + branches: + - main + - develop + workflow_dispatch: +name: ci +jobs: + check: + uses: truemark/github-workflows/.github/workflows/terraform-module-check.yml@main diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..e18f2ec --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,14 @@ +on: + pull_request: + issues: + types: + - opened +name: issues +jobs: + add-to-project: + name: Add issue to project + if: github.actor != 'dependabot[bot]' + uses: truemark/github-workflows/.github/workflows/issues.yml@main + secrets: + private-key: ${{ secrets.ISSUES_BOT_KEY }} + app-id: ${{ secrets.ISSUES_BOT_ID }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..2d35fd1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +on: + push: + branches: + - main + workflow_dispatch: +name: publish +permissions: + contents: write + pages: write + id-token: write +jobs: + publish: + uses: truemark/github-workflows/.github/workflows/terraform-module.yml@main + secrets: + app-id: ${{ secrets.RELEASE_BOT_ID }} + private-key: ${{ secrets.RELEASE_BOT_KEY }} diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..98abd2a --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @truemark/db-warden diff --git a/LICENSE b/LICENSE index 97b03dd..7d8d5b4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,190 +1,24 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2019 Hidetake Iwata - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Copyright (c) 2010-2024, TrueMark Technologies, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + 3. Neither the name of NetRadius, LLC nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..2669015 --- /dev/null +++ b/version.txt @@ -0,0 +1,3 @@ +# The following contains the next version that will be released when a merge to main occurs +version=v3.0.2 +next_version=v3.0.3 From 222d4a4179a1011c4dabd8f785732541c4d2d947 Mon Sep 17 00:00:00 2001 From: Erik Jensen <365211+erikrj@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:28:27 -0600 Subject: [PATCH 12/14] Fixing CODEOWNERS --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 98abd2a..1e663e4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @truemark/db-warden +* @truemark/harmony From 46cc2231e36dba243125b5cc2ede1492952ac6b7 Mon Sep 17 00:00:00 2001 From: Erik Jensen <365211+erikrj@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:30:21 -0600 Subject: [PATCH 13/14] Fixing formatting --- main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index f4b0bc1..82b2b72 100644 --- a/main.tf +++ b/main.tf @@ -83,7 +83,7 @@ resource "aws_launch_template" "this" { } network_interfaces { - device_index = 0 + device_index = 0 network_interface_id = aws_network_interface.this.id } @@ -123,10 +123,10 @@ resource "aws_launch_template" "this" { } resource "aws_autoscaling_group" "this" { - name_prefix = var.name - desired_capacity = var.enabled ? 1 : 0 - min_size = var.enabled ? 1 : 0 - max_size = 1 + name_prefix = var.name + desired_capacity = var.enabled ? 1 : 0 + min_size = var.enabled ? 1 : 0 + max_size = 1 availability_zones = [data.aws_network_interface.this.availability_zone] mixed_instances_policy { From 6beed1526bbb10a4f40901890ed2f831880e3e28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.co> Date: Mon, 10 Jun 2024 21:30:44 +0000 Subject: [PATCH 14/14] v3.0.3 GitHub Run Number 2 [skip ci] --- version.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.txt b/version.txt index 2669015..47abe78 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ # The following contains the next version that will be released when a merge to main occurs -version=v3.0.2 -next_version=v3.0.3 +version=v3.0.3 +next_version=v3.0.4