├── .github ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ ├── feature_request.md │ └── question.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── pr-title.yaml │ ├── pre-commit.yaml │ └── stale-issue-pr.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── NOTICE.txt ├── README.md ├── main.tf ├── outputs.tf ├── tests └── complete │ ├── README.md │ ├── images │ └── ACK_microservice.png │ ├── main.tf │ ├── outputs.tf │ ├── sample-app │ ├── apigwv2-httpapi.yaml │ ├── app.yaml │ ├── dynamodb-table.yaml │ └── elasticache.yaml │ ├── variables.tf │ └── versions.tf ├── variables.tf └── versions.tf /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @aws-ia/internal-terraform-eks-admins 2 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 7 | information to effectively respond to your bug report or contribution. 8 | 9 | ## Reporting Bugs/Feature Requests 10 | 11 | We welcome you to use the GitHub issue tracker to report bugs or suggest features. 12 | 13 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already 14 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 15 | 16 | - A reproducible test case or series of steps 17 | - The version of our code being used 18 | - Any modifications you've made relevant to the bug 19 | - Anything unusual about your environment or deployment 20 | 21 | ## Contributing via Pull Requests 22 | 23 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 24 | 25 | 1. You are working against the latest source on the _main_ branch. 26 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 27 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 28 | 29 | To send us a pull request, please: 30 | 31 | 1. Fork the repository. 32 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 33 | 3. Ensure local tests pass. 34 | 4. Commit to your fork using clear commit messages. 35 | 5. Send us a pull request, answering any default questions in the pull request interface. 36 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 37 | 38 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 39 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 40 | 41 | ## Finding contributions to work on 42 | 43 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. 44 | 45 | ## Code of Conduct 46 | 47 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 48 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 49 | opensource-codeofconduct@amazon.com with any additional questions or comments. 50 | 51 | ## Security issue notifications 52 | 53 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 54 | 55 | ## Licensing 56 | 57 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 58 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | ## Description 7 | 8 | Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the `examples/*` directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running `terraform init && terraform apply` without any further changes. 9 | 10 | If your request is for a new feature, please use the `Feature request` template. 11 | 12 | - [ ] ✋ I have searched the open/closed issues and my issue is not listed. 13 | 14 | ## ⚠️ Note 15 | 16 | Before you submit an issue, please perform the following first: 17 | 18 | 1. Remove the local `.terraform` directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): `rm -rf .terraform/` 19 | 2. Re-initialize the project root to pull down modules: `terraform init` 20 | 3. Re-attempt your terraform plan or apply and check if the issue still persists 21 | 22 | ## Versions 23 | 24 | - Module version [Required]: 25 | 26 | - Terraform version: 27 | 28 | - Provider version(s): 29 | 30 | 31 | ## Reproduction Code [Required] 32 | 33 | 34 | 35 | Steps to reproduce the behavior: 36 | 37 | 38 | 39 | 40 | 41 | ## Expected behaviour 42 | 43 | 44 | 45 | ## Actual behaviour 46 | 47 | 48 | 49 | ### Terminal Output Screenshot(s) 50 | 51 | 52 | 53 | ## Additional context 54 | 55 | 56 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | 7 | 8 | ### Community Note 9 | 10 | * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request 11 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request 12 | * If you are interested in working on this issue or have submitted a pull request, please leave a comment 13 | 14 | 15 | 16 | #### What is the outcome that you are trying to reach? 17 | 18 | 19 | 20 | #### Describe the solution you would like 21 | 22 | 23 | 24 | #### Describe alternatives you have considered 25 | 26 | 27 | 28 | #### Additional context 29 | 30 | 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: I have a Question 4 | --- 5 | 6 | - [ ] ✋ I have searched the open/closed issues and my issue is not listed. 7 | 8 | #### Please describe your question here 9 | 10 | 11 | 12 | #### Provide a link to the example/module related to the question 13 | 14 | 15 | 16 | #### Additional context 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | 🛑 Please open an issue first to discuss any significant work and flesh out details/direction - we would hate for your time to be wasted. 4 | Consult the [CONTRIBUTING](https://github.com/aws-ia/terraform-aws-eks-ack-addons//blob/main/.github/CONTRIBUTING.md#contributing-via-pull-requests) guide for submitting pull-requests. 5 | 6 | 7 | 8 | ### Motivation 9 | 10 | 11 | - Resolves # 12 | 13 | ### More 14 | 15 | - [ ] Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes) 16 | - [ ] Yes, I ran `pre-commit run -a` with this PR 17 | 18 | ### For Moderators 19 | 20 | - [ ] E2E Test successfully complete before merge? 21 | 22 | ### Additional Notes 23 | 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/pr-title.yaml: -------------------------------------------------------------------------------- 1 | name: 'PR title' 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - edited 8 | - synchronize 9 | 10 | jobs: 11 | main: 12 | name: Validate PR title 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: amannn/action-semantic-pull-request@v5.4.0 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | with: 19 | requireScope: false 20 | subjectPattern: ^[A-Z].+$ 21 | subjectPatternError: | 22 | The subject "{subject}" found in the pull request title "{title}" 23 | didn't match the configured pattern. Please ensure that the subject 24 | starts with an uppercase character. 25 | wip: true 26 | validateSingleCommit: false 27 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yaml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | paths: 8 | - '**.tf' 9 | - '**.yml' 10 | - '**.yaml' 11 | 12 | permissions: read-all 13 | 14 | env: 15 | TERRAFORM_DOCS_VERSION: v0.16.0 16 | TFLINT_VERSION: v0.50.3 17 | 18 | concurrency: 19 | group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' 20 | cancel-in-progress: true 21 | 22 | jobs: 23 | collectInputs: 24 | name: Collect workflow inputs 25 | runs-on: ubuntu-latest 26 | outputs: 27 | directories: ${{ steps.dirs.outputs.directories }} 28 | steps: 29 | - name: Checkout 30 | uses: actions/checkout@v4 31 | 32 | - name: Get root directories 33 | id: dirs 34 | uses: clowdhaus/terraform-composite-actions/directories@v1.9.0 35 | 36 | preCommitMinVersions: 37 | name: Min TF pre-commit 38 | needs: collectInputs 39 | runs-on: ubuntu-latest 40 | strategy: 41 | matrix: 42 | directory: ${{ fromJson(needs.collectInputs.outputs.directories) }} 43 | steps: 44 | - name: Remove default Terraform 45 | run: rm -rf $(which terraform) 46 | 47 | - name: Checkout 48 | uses: actions/checkout@v4 49 | 50 | - uses: dorny/paths-filter@v3 51 | id: changes 52 | with: 53 | # We only need to check Terraform files for the current directory 54 | # because the `preCommitMaxVersion` job will run the full, 55 | # exhaustive checks (always) 56 | filters: | 57 | src: 58 | - '${{ matrix.directory }}/*.tf' 59 | 60 | - name: Terraform min/max versions 61 | uses: clowdhaus/terraform-min-max@v1.3.0 62 | if: steps.changes.outputs.src== 'true' 63 | id: minMax 64 | with: 65 | directory: ${{ matrix.directory }} 66 | 67 | - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} 68 | uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 69 | # Run only validate pre-commit check on min version supported 70 | if: ${{ matrix.directory != '.' && steps.changes.outputs.src== 'true' }} 71 | with: 72 | terraform-version: ${{ steps.minMax.outputs.minVersion }} 73 | args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*' 74 | 75 | - name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }} 76 | uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 77 | # Run only validate pre-commit check on min version supported 78 | if: ${{ matrix.directory == '.' && steps.changes.outputs.src== 'true' }} 79 | with: 80 | terraform-version: ${{ steps.minMax.outputs.minVersion }} 81 | args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)' 82 | 83 | preCommitMaxVersion: 84 | name: Max TF pre-commit 85 | runs-on: ubuntu-latest 86 | needs: collectInputs 87 | steps: 88 | - name: Remove default Terraform 89 | run: rm -rf $(which terraform) 90 | 91 | - name: Checkout 92 | uses: actions/checkout@v4 93 | 94 | - uses: dorny/paths-filter@v3 95 | id: changes 96 | with: 97 | filters: | 98 | src: 99 | - '**/*.tf' 100 | 101 | - name: Terraform min/max versions 102 | id: minMax 103 | uses: clowdhaus/terraform-min-max@v1.3.0 104 | if: steps.changes.outputs.src== 'true' 105 | 106 | - name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }} 107 | uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0 108 | if: steps.changes.outputs.src== 'true' 109 | with: 110 | terraform-version: ${{ steps.minMax.outputs.maxVersion }} 111 | terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }} 112 | tflint-version: ${{ env.TFLINT_VERSION }} 113 | -------------------------------------------------------------------------------- /.github/workflows/stale-issue-pr.yaml: -------------------------------------------------------------------------------- 1 | name: 'Stale Issue/PR' 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 0 * * *' 7 | 8 | permissions: read-all 9 | 10 | jobs: 11 | stale: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | issues: write 15 | pull-requests: write 16 | steps: 17 | - uses: actions/stale@v9 18 | id: stale 19 | with: 20 | ascending: true 21 | close-issue-message: 'Issue closed due to inactivity.' 22 | close-pr-message: 'Pull request closed due to inactivity.' 23 | days-before-close: 10 24 | days-before-stale: 30 25 | stale-issue-label: stale 26 | stale-pr-label: stale 27 | # Not stale if have this labels 28 | exempt-issue-labels: 'bug,enhancement' 29 | exempt-pr-labels: 'bug,enhancement' 30 | operations-per-run: 100 31 | stale-issue-message: | 32 | This issue has been automatically marked as stale because it has been open 30 days 33 | with no activity. Remove stale label or comment or this issue will be closed in 10 days 34 | stale-pr-message: | 35 | This PR has been automatically marked as stale because it has been open 30 days 36 | with no activity. Remove stale label or comment or this PR will be closed in 10 days 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Local .terraform directories 4 | **/.terraform/* 5 | 6 | # Terraform lockfile 7 | .terraform.lock.hcl 8 | 9 | # .tfstate files 10 | *.tfstate 11 | *.tfstate.* 12 | *.tfplan 13 | 14 | # Crash log files 15 | crash.log 16 | 17 | # Exclude all .tfvars files, which are likely to contain sentitive data, such as 18 | # password, private keys, and other secrets. These should not be part of version 19 | # control as they are data points which are potentially sensitive and subject 20 | # to change depending on the environment. 21 | *.tfvars 22 | 23 | # Ignore override files as they are usually used to override resources locally and so 24 | # are not checked in 25 | override.tf 26 | override.tf.json 27 | *_override.tf 28 | *_override.tf.json 29 | 30 | # Ignore CLI configuration files 31 | .terraformrc 32 | terraform.rc 33 | 34 | **/tests/event-driven-pipeline/input/* 35 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v4.6.0 4 | hooks: 5 | - id: trailing-whitespace 6 | args: ['--markdown-linebreak-ext=md'] 7 | - id: end-of-file-fixer 8 | - id: trailing-whitespace 9 | - id: check-merge-conflict 10 | - id: detect-private-key 11 | - id: detect-aws-credentials 12 | args: ['--allow-missing-credentials'] 13 | - repo: https://github.com/antonbabenko/pre-commit-terraform 14 | rev: v1.96.1 15 | hooks: 16 | - id: terraform_fmt 17 | - id: terraform_docs 18 | args: 19 | - '--args=--lockfile=false' 20 | - id: terraform_tflint 21 | args: 22 | - '--args=--only=terraform_deprecated_interpolation' 23 | - '--args=--only=terraform_deprecated_index' 24 | - '--args=--only=terraform_unused_declarations' 25 | - '--args=--only=terraform_comment_syntax' 26 | - '--args=--only=terraform_documented_outputs' 27 | - '--args=--only=terraform_documented_variables' 28 | - '--args=--only=terraform_typed_variables' 29 | - '--args=--only=terraform_module_pinned_source' 30 | - '--args=--only=terraform_naming_convention' 31 | - '--args=--only=terraform_required_version' 32 | - '--args=--only=terraform_required_providers' 33 | - '--args=--only=terraform_standard_module_structure' 34 | - '--args=--only=terraform_workspace_remote' 35 | - '--args=--only=terraform_empty_list_equality' 36 | - '--args=--only=terraform_unused_required_providers' 37 | - id: terraform_validate 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at 4 | 5 | http://aws.amazon.com/apache2.0/ 6 | 7 | or in the "license" file accompanying this file. This file 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. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AWS EKS ACK Addons Terraform module 2 | 3 | Terraform module which provisions [AWS controllers for Kubernetes](https://aws-controllers-k8s.github.io/community/docs/community/overview/) on EKS. 4 | 5 | ## Usage 6 | 7 | ```hcl 8 | module "eks_ack_addons" { 9 | source = "aws-ia/eks-ack-addons/aws" 10 | 11 | # Cluster Info 12 | cluster_name = "" 13 | cluster_endpoint = "" 14 | oidc_provider_arn = "" 15 | 16 | # ECR Credentials 17 | ecrpublic_username = "" 18 | ecrpublic_token = "" 19 | 20 | # Controllers to enable 21 | enable_networkfirewall = true 22 | enable_cloudwatchlogs = true 23 | enable_kinesis = true 24 | enable_secretsmanager = true 25 | enable_route53resolver = true 26 | enable_route53 = true 27 | enable_organizations = true 28 | enable_mq = true 29 | enable_cloudwatch = true 30 | enable_keyspaces = true 31 | enable_kafka = true 32 | enable_efs = true 33 | enable_ecs = true 34 | enable_cloudtrail = true 35 | enable_cloudfront = true 36 | enable_applicationautoscaling = true 37 | enable_sagemaker = true 38 | enable_memorydb = true 39 | enable_opensearchservice = true 40 | enable_ecr = true 41 | enable_sns = true 42 | enable_sqs = true 43 | enable_lambda = true 44 | enable_iam = true 45 | enable_ec2 = true 46 | enable_eks = true 47 | enable_kms = true 48 | enable_acm = true 49 | enable_apigatewayv2 = true 50 | enable_dynamodb = true 51 | enable_s3 = true 52 | enable_elasticache = true 53 | enable_rds = true 54 | enable_prometheusservice = true 55 | enable_emrcontainers = true 56 | enable_sfn = true 57 | enable_eventbridge = true 58 | 59 | tags = { 60 | Environment = "dev" 61 | } 62 | } 63 | ``` 64 | 65 | ## Support & Feedback 66 | 67 | > [!IMPORTANT] 68 | > EKS Blueprints for Terraform is maintained by AWS Solution Architects. It is not part of an AWS 69 | > service and support is provided as a best-effort by the EKS Blueprints community. To provide feedback, 70 | > please use the [issues templates](https://github.com/aws-ia/terraform-aws-eks-ack-addons/issues) 71 | > provided. If you are interested in contributing to EKS Blueprints, see the 72 | > [Contribution guide](https://github.com/aws-ia/terraform-aws-eks-ack-addons/blob/main/.github/CONTRIBUTING.md). 73 | 74 | ## Tests 75 | 76 | Tests codified under the [`tests`](https://github.com/aws-ia/terraform-aws-eks-ack-addons) are intended to give users references for how to use the module as well as testing/validating changes to the source code of the module. If contributing to the project, please be sure to make any appropriate updates to the relevant tests to allow maintainers to test your changes and to keep the tests up to date for users. Thank you! 77 | 78 | - [Complete](https://github.com/aws-ia/terraform-aws-eks-ack-addons/tree/main/tests/complete) 79 | 80 | 81 | ## Requirements 82 | 83 | | Name | Version | 84 | |------|---------| 85 | | [terraform](#requirement\_terraform) | >= 1.0 | 86 | | [aws](#requirement\_aws) | >= 5.0 | 87 | | [time](#requirement\_time) | >= 0.9 | 88 | 89 | ## Providers 90 | 91 | | Name | Version | 92 | |------|---------| 93 | | [aws](#provider\_aws) | >= 5.0 | 94 | | [time](#provider\_time) | >= 0.9 | 95 | 96 | ## Modules 97 | 98 | | Name | Source | Version | 99 | |------|--------|---------| 100 | | [acm](#module\_acm) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 101 | | [apigatewayv2](#module\_apigatewayv2) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 102 | | [applicationautoscaling](#module\_applicationautoscaling) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 103 | | [cloudfront](#module\_cloudfront) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 104 | | [cloudtrail](#module\_cloudtrail) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 105 | | [cloudwatch](#module\_cloudwatch) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 106 | | [cloudwatchlogs](#module\_cloudwatchlogs) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 107 | | [dynamodb](#module\_dynamodb) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 108 | | [ec2](#module\_ec2) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 109 | | [ecr](#module\_ecr) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 110 | | [ecs](#module\_ecs) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 111 | | [efs](#module\_efs) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 112 | | [eks](#module\_eks) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 113 | | [elasticache](#module\_elasticache) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 114 | | [emrcontainers](#module\_emrcontainers) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 115 | | [eventbridge](#module\_eventbridge) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 116 | | [iam](#module\_iam) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 117 | | [kafka](#module\_kafka) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 118 | | [keyspaces](#module\_keyspaces) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 119 | | [kinesis](#module\_kinesis) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 120 | | [kms](#module\_kms) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 121 | | [lambda](#module\_lambda) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 122 | | [memorydb](#module\_memorydb) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 123 | | [mq](#module\_mq) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 124 | | [networkfirewall](#module\_networkfirewall) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 125 | | [opensearchservice](#module\_opensearchservice) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 126 | | [organizations](#module\_organizations) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 127 | | [prometheusservice](#module\_prometheusservice) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 128 | | [rds](#module\_rds) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 129 | | [route53](#module\_route53) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 130 | | [route53resolver](#module\_route53resolver) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 131 | | [s3](#module\_s3) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 132 | | [sagemaker](#module\_sagemaker) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 133 | | [secretsmanager](#module\_secretsmanager) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 134 | | [sfn](#module\_sfn) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 135 | | [sns](#module\_sns) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 136 | | [sqs](#module\_sqs) | aws-ia/eks-blueprints-addon/aws | 1.1.1 | 137 | 138 | ## Resources 139 | 140 | | Name | Type | 141 | |------|------| 142 | | [time_sleep.this](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource | 143 | | [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | 144 | | [aws_iam_policy_document.acm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 145 | | [aws_iam_policy_document.cloudwatchlogs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 146 | | [aws_iam_policy_document.eks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 147 | | [aws_iam_policy_document.emrcontainers](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 148 | | [aws_iam_policy_document.iam](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 149 | | [aws_iam_policy_document.kinesis](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 150 | | [aws_iam_policy_document.kms](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 151 | | [aws_iam_policy_document.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 152 | | [aws_iam_policy_document.networkfirewall](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 153 | | [aws_iam_policy_document.prometheusservice](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 154 | | [aws_iam_policy_document.sfn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | 155 | | [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source | 156 | | [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | 157 | 158 | ## Inputs 159 | 160 | | Name | Description | Type | Default | Required | 161 | |------|-------------|------|---------|:--------:| 162 | | [acm](#input\_acm) | ACK acm Helm Chart config | `any` | `{}` | no | 163 | | [apigatewayv2](#input\_apigatewayv2) | ACK API gateway v2 Helm Chart config | `any` | `{}` | no | 164 | | [applicationautoscaling](#input\_applicationautoscaling) | ACK Application Autoscaling Helm Chart config | `any` | `{}` | no | 165 | | [cloudfront](#input\_cloudfront) | ACK cloudfront Helm Chart config | `any` | `{}` | no | 166 | | [cloudtrail](#input\_cloudtrail) | ACK Cloudtrail Helm Chart config | `any` | `{}` | no | 167 | | [cloudwatch](#input\_cloudwatch) | ACK CloudWatch Helm Chart config | `any` | `{}` | no | 168 | | [cloudwatchlogs](#input\_cloudwatchlogs) | ACK CloudWatch Logs Helm Chart config | `any` | `{}` | no | 169 | | [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint for your Kubernetes API server | `string` | n/a | yes | 170 | | [cluster\_name](#input\_cluster\_name) | Name of the EKS cluster | `string` | n/a | yes | 171 | | [create\_delay\_dependencies](#input\_create\_delay\_dependencies) | Dependency attribute which must be resolved before starting the `create_delay_duration` | `list(string)` | `[]` | no | 172 | | [create\_delay\_duration](#input\_create\_delay\_duration) | The duration to wait before creating resources | `string` | `"30s"` | no | 173 | | [create\_kubernetes\_resources](#input\_create\_kubernetes\_resources) | Create Kubernetes resource with Helm or Kubernetes provider | `bool` | `true` | no | 174 | | [dynamodb](#input\_dynamodb) | ACK dynamodb Helm Chart config | `any` | `{}` | no | 175 | | [ec2](#input\_ec2) | ACK ec2 Helm Chart config | `any` | `{}` | no | 176 | | [ecr](#input\_ecr) | ACK ECR Helm Chart config | `any` | `{}` | no | 177 | | [ecrpublic\_token](#input\_ecrpublic\_token) | Password decoded from the authorization token for accessing public ECR | `string` | `""` | no | 178 | | [ecrpublic\_username](#input\_ecrpublic\_username) | User name decoded from the authorization token for accessing public ECR | `string` | `""` | no | 179 | | [ecs](#input\_ecs) | ACK ECS Helm Chart config | `any` | `{}` | no | 180 | | [efs](#input\_efs) | ACK EFS Helm Chart config | `any` | `{}` | no | 181 | | [eks](#input\_eks) | ACK eks Helm Chart config | `any` | `{}` | no | 182 | | [elasticache](#input\_elasticache) | ACK elasticache Helm Chart config | `any` | `{}` | no | 183 | | [emrcontainers](#input\_emrcontainers) | ACK EMR container Helm Chart config | `any` | `{}` | no | 184 | | [enable\_acm](#input\_enable\_acm) | Enable ACK acm add-on | `bool` | `false` | no | 185 | | [enable\_apigatewayv2](#input\_enable\_apigatewayv2) | Enable ACK API gateway v2 add-on | `bool` | `false` | no | 186 | | [enable\_applicationautoscaling](#input\_enable\_applicationautoscaling) | Enable ACK Application Autoscaling add-on | `bool` | `false` | no | 187 | | [enable\_cloudfront](#input\_enable\_cloudfront) | Enable ACK Cloudfront add-on | `bool` | `false` | no | 188 | | [enable\_cloudtrail](#input\_enable\_cloudtrail) | Enable ACK Cloudtrail add-on | `bool` | `false` | no | 189 | | [enable\_cloudwatch](#input\_enable\_cloudwatch) | Enable ACK CloudWatch add-on | `bool` | `false` | no | 190 | | [enable\_cloudwatchlogs](#input\_enable\_cloudwatchlogs) | Enable ACK CloudWatch Logs add-on | `bool` | `false` | no | 191 | | [enable\_dynamodb](#input\_enable\_dynamodb) | Enable ACK dynamodb add-on | `bool` | `false` | no | 192 | | [enable\_ec2](#input\_enable\_ec2) | Enable ACK ec2 add-on | `bool` | `false` | no | 193 | | [enable\_ecr](#input\_enable\_ecr) | Enable ACK ECR add-on | `bool` | `false` | no | 194 | | [enable\_ecs](#input\_enable\_ecs) | Enable ACK ECS add-on | `bool` | `false` | no | 195 | | [enable\_efs](#input\_enable\_efs) | Enable ACK EFS add-on | `bool` | `false` | no | 196 | | [enable\_eks](#input\_enable\_eks) | Enable ACK eks add-on | `bool` | `false` | no | 197 | | [enable\_elasticache](#input\_enable\_elasticache) | Enable ACK elasticache add-on | `bool` | `false` | no | 198 | | [enable\_emrcontainers](#input\_enable\_emrcontainers) | Enable ACK EMR container add-on | `bool` | `false` | no | 199 | | [enable\_eventbridge](#input\_enable\_eventbridge) | Enable ACK EventBridge add-on | `bool` | `false` | no | 200 | | [enable\_iam](#input\_enable\_iam) | Enable ACK iam add-on | `bool` | `false` | no | 201 | | [enable\_kafka](#input\_enable\_kafka) | Enable ACK Kafka add-on | `bool` | `false` | no | 202 | | [enable\_keyspaces](#input\_enable\_keyspaces) | Enable ACK Keyspaces add-on | `bool` | `false` | no | 203 | | [enable\_kinesis](#input\_enable\_kinesis) | Enable ACK Kinesis add-on | `bool` | `false` | no | 204 | | [enable\_kms](#input\_enable\_kms) | Enable ACK kms add-on | `bool` | `false` | no | 205 | | [enable\_lambda](#input\_enable\_lambda) | Enable ACK Lambda add-on | `bool` | `false` | no | 206 | | [enable\_memorydb](#input\_enable\_memorydb) | Enable ACK MemoryDB add-on | `bool` | `false` | no | 207 | | [enable\_mq](#input\_enable\_mq) | Enable ACK MQ add-on | `bool` | `false` | no | 208 | | [enable\_networkfirewall](#input\_enable\_networkfirewall) | Enable ACK Network Firewall add-on | `bool` | `false` | no | 209 | | [enable\_opensearchservice](#input\_enable\_opensearchservice) | Enable ACK Opensearch Service add-on | `bool` | `false` | no | 210 | | [enable\_organizations](#input\_enable\_organizations) | Enable ACK Organizations add-on | `bool` | `false` | no | 211 | | [enable\_prometheusservice](#input\_enable\_prometheusservice) | Enable ACK prometheusservice add-on | `bool` | `false` | no | 212 | | [enable\_rds](#input\_enable\_rds) | Enable ACK rds add-on | `bool` | `false` | no | 213 | | [enable\_route53](#input\_enable\_route53) | Enable ACK Route 53 add-on | `bool` | `false` | no | 214 | | [enable\_route53resolver](#input\_enable\_route53resolver) | Enable ACK Route 53 Resolver add-on | `bool` | `false` | no | 215 | | [enable\_s3](#input\_enable\_s3) | Enable ACK s3 add-on | `bool` | `false` | no | 216 | | [enable\_sagemaker](#input\_enable\_sagemaker) | Enable ACK Sagemaker add-on | `bool` | `false` | no | 217 | | [enable\_secretsmanager](#input\_enable\_secretsmanager) | Enable ACK Secrets Manager add-on | `bool` | `false` | no | 218 | | [enable\_sfn](#input\_enable\_sfn) | Enable ACK step functions add-on | `bool` | `false` | no | 219 | | [enable\_sns](#input\_enable\_sns) | Enable ACK SNS add-on | `bool` | `false` | no | 220 | | [enable\_sqs](#input\_enable\_sqs) | Enable ACK SQS add-on | `bool` | `false` | no | 221 | | [eventbridge](#input\_eventbridge) | ACK EventBridge Helm Chart config | `any` | `{}` | no | 222 | | [iam](#input\_iam) | ACK iam Helm Chart config | `any` | `{}` | no | 223 | | [kafka](#input\_kafka) | ACK Kafka Helm Chart config | `any` | `{}` | no | 224 | | [keyspaces](#input\_keyspaces) | ACK Keyspaces Helm Chart config | `any` | `{}` | no | 225 | | [kinesis](#input\_kinesis) | ACK Kinesis Helm Chart config | `any` | `{}` | no | 226 | | [kms](#input\_kms) | ACK kms Helm Chart config | `any` | `{}` | no | 227 | | [lambda](#input\_lambda) | ACK Lambda Helm Chart config | `any` | `{}` | no | 228 | | [memorydb](#input\_memorydb) | ACK MemoryDB Helm Chart config | `any` | `{}` | no | 229 | | [mq](#input\_mq) | ACK MQ Helm Chart config | `any` | `{}` | no | 230 | | [networkfirewall](#input\_networkfirewall) | ACK Network Firewall Helm Chart config | `any` | `{}` | no | 231 | | [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN of the cluster OIDC Provider | `string` | n/a | yes | 232 | | [opensearchservice](#input\_opensearchservice) | ACK Opensearch Service Helm Chart config | `any` | `{}` | no | 233 | | [organizations](#input\_organizations) | ACK Organizations Helm Chart config | `any` | `{}` | no | 234 | | [prometheusservice](#input\_prometheusservice) | ACK prometheusservice Helm Chart config | `any` | `{}` | no | 235 | | [rds](#input\_rds) | ACK rds Helm Chart config | `any` | `{}` | no | 236 | | [route53](#input\_route53) | ACK Route 53 Helm Chart config | `any` | `{}` | no | 237 | | [route53resolver](#input\_route53resolver) | ACK Route 53 Resolver Helm Chart config | `any` | `{}` | no | 238 | | [s3](#input\_s3) | ACK s3 Helm Chart config | `any` | `{}` | no | 239 | | [sagemaker](#input\_sagemaker) | ACK Sagemaker Helm Chart config | `any` | `{}` | no | 240 | | [secretsmanager](#input\_secretsmanager) | ACK Secrets Manager Helm Chart config | `any` | `{}` | no | 241 | | [sfn](#input\_sfn) | ACK step functions Helm Chart config | `any` | `{}` | no | 242 | | [sns](#input\_sns) | ACK SNS Helm Chart config | `any` | `{}` | no | 243 | | [sqs](#input\_sqs) | ACK SQS Helm Chart config | `any` | `{}` | no | 244 | | [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit`,`XYZ`) | `map(string)` | `{}` | no | 245 | 246 | ## Outputs 247 | 248 | | Name | Description | 249 | |------|-------------| 250 | | [gitops\_metadata](#output\_gitops\_metadata) | GitOps Bridge metadata | 251 | 252 | 253 | ## Community 254 | 255 | - [Code of conduct](https://github.com/aws-ia/terraform-aws-eks-ack-addons/blob/refactor/flatten-modules/.github/CODE_OF_CONDUCT.md) 256 | - [Contributing](https://github.com/aws-ia/terraform-aws-eks-ack-addons/blob/refactor/flatten-modules/.github/CONTRIBUTING.md) 257 | - [Security issue notifications](https://github.com/aws-ia/terraform-aws-eks-ack-addons/blob/refactor/flatten-modules/.github/CONTRIBUTING.md#security-issue-notifications) 258 | 259 | ## License 260 | 261 | Apache-2.0 Licensed. See [LICENSE](https://github.com/aws-ia/terraform-aws-eks-ack-addons/blob/main/LICENSE). 262 | -------------------------------------------------------------------------------- /outputs.tf: -------------------------------------------------------------------------------- 1 | 2 | ################################################################################ 3 | # GitOps Bridge 4 | ################################################################################ 5 | /* 6 | This output is intended to be used with GitOps when the addons' Helm charts 7 | are going to be installed by a GitOps tool such as ArgoCD or FluxCD. 8 | We guarantee that this output will be maintained any time a new addon is 9 | added or an addon is updated, and new metadata for the Helm chart is needed. 10 | */ 11 | output "gitops_metadata" { 12 | description = "GitOps Bridge metadata" 13 | value = merge( 14 | { for k, v in { 15 | iam_role_arn = module.networkfirewall.iam_role_arn 16 | namespace = try(var.networkfirewall.namespace, "ack-system") 17 | service_account = local.networkfirewall_name 18 | } : "ack_iam_${k}" => v if var.enable_networkfirewall 19 | }, 20 | { for k, v in { 21 | iam_role_arn = module.cloudwatchlogs.iam_role_arn 22 | namespace = try(var.cloudwatchlogs.namespace, "ack-system") 23 | service_account = local.cloudwatchlogs_name 24 | } : "ack_iam_${k}" => v if var.enable_cloudwatchlogs 25 | }, 26 | { for k, v in { 27 | iam_role_arn = module.kinesis.iam_role_arn 28 | namespace = try(var.kinesis.namespace, "ack-system") 29 | service_account = local.kinesis_name 30 | } : "ack_iam_${k}" => v if var.enable_kinesis 31 | }, 32 | { for k, v in { 33 | iam_role_arn = module.secretsmanager.iam_role_arn 34 | namespace = try(var.secretsmanager.namespace, "ack-system") 35 | service_account = local.secretsmanager_name 36 | } : "ack_iam_${k}" => v if var.enable_secretsmanager 37 | }, 38 | { for k, v in { 39 | iam_role_arn = module.route53resolver.iam_role_arn 40 | namespace = try(var.route53resolver.namespace, "ack-system") 41 | service_account = local.route53resolver_name 42 | } : "ack_iam_${k}" => v if var.enable_route53resolver 43 | }, 44 | { for k, v in { 45 | iam_role_arn = module.route53.iam_role_arn 46 | namespace = try(var.route53.namespace, "ack-system") 47 | service_account = local.route53_name 48 | } : "ack_iam_${k}" => v if var.enable_route53 49 | }, 50 | { for k, v in { 51 | iam_role_arn = module.organizations.iam_role_arn 52 | namespace = try(var.organizations.namespace, "ack-system") 53 | service_account = local.organizations_name 54 | } : "ack_iam_${k}" => v if var.enable_organizations 55 | }, 56 | { for k, v in { 57 | iam_role_arn = module.mq.iam_role_arn 58 | namespace = try(var.mq.namespace, "ack-system") 59 | service_account = local.mq_name 60 | } : "ack_iam_${k}" => v if var.enable_mq 61 | }, 62 | { for k, v in { 63 | iam_role_arn = module.cloudwatch.iam_role_arn 64 | namespace = try(var.cloudwatch.namespace, "ack-system") 65 | service_account = local.cloudwatch_name 66 | } : "ack_iam_${k}" => v if var.enable_cloudwatch 67 | }, 68 | { for k, v in { 69 | iam_role_arn = module.keyspaces.iam_role_arn 70 | namespace = try(var.keyspaces.namespace, "ack-system") 71 | service_account = local.keyspaces_name 72 | } : "ack_iam_${k}" => v if var.enable_keyspaces 73 | }, 74 | { for k, v in { 75 | iam_role_arn = module.kafka.iam_role_arn 76 | namespace = try(var.kafka.namespace, "ack-system") 77 | service_account = local.kafka_name 78 | } : "ack_iam_${k}" => v if var.enable_kafka 79 | }, 80 | { for k, v in { 81 | iam_role_arn = module.efs.iam_role_arn 82 | namespace = try(var.efs.namespace, "ack-system") 83 | service_account = local.efs_name 84 | } : "ack_iam_${k}" => v if var.enable_efs 85 | }, 86 | { for k, v in { 87 | iam_role_arn = module.ecs.iam_role_arn 88 | namespace = try(var.ecs.namespace, "ack-system") 89 | service_account = local.ecs_name 90 | } : "ack_iam_${k}" => v if var.enable_ecs 91 | }, 92 | { for k, v in { 93 | iam_role_arn = module.cloudtrail.iam_role_arn 94 | namespace = try(var.cloudtrail.namespace, "ack-system") 95 | service_account = local.cloudtrail_name 96 | } : "ack_iam_${k}" => v if var.enable_cloudtrail 97 | }, 98 | { for k, v in { 99 | iam_role_arn = module.cloudfront.iam_role_arn 100 | namespace = try(var.cloudfront.namespace, "ack-system") 101 | service_account = local.cloudfront_name 102 | } : "ack_iam_${k}" => v if var.enable_cloudfront 103 | }, 104 | { for k, v in { 105 | iam_role_arn = module.applicationautoscaling.iam_role_arn 106 | namespace = try(var.applicationautoscaling.namespace, "ack-system") 107 | service_account = local.applicationautoscaling_name 108 | } : "ack_iam_${k}" => v if var.enable_applicationautoscaling 109 | }, 110 | { for k, v in { 111 | iam_role_arn = module.sagemaker.iam_role_arn 112 | namespace = try(var.sagemaker.namespace, "ack-system") 113 | service_account = local.sagemaker_name 114 | } : "ack_iam_${k}" => v if var.enable_sagemaker 115 | }, 116 | { for k, v in { 117 | iam_role_arn = module.memorydb.iam_role_arn 118 | namespace = try(var.memorydb.namespace, "ack-system") 119 | service_account = local.memorydb_name 120 | } : "ack_iam_${k}" => v if var.enable_memorydb 121 | }, 122 | { for k, v in { 123 | iam_role_arn = module.opensearchservice.iam_role_arn 124 | namespace = try(var.opensearchservice.namespace, "ack-system") 125 | service_account = local.opensearchservice_name 126 | } : "ack_iam_${k}" => v if var.enable_opensearchservice 127 | }, 128 | { for k, v in { 129 | iam_role_arn = module.ecr.iam_role_arn 130 | namespace = try(var.ecr.namespace, "ack-system") 131 | service_account = local.ecr_name 132 | } : "ack_iam_${k}" => v if var.enable_ecr 133 | }, 134 | { for k, v in { 135 | iam_role_arn = module.sns.iam_role_arn 136 | namespace = try(var.sns.namespace, "ack-system") 137 | service_account = local.sns_name 138 | } : "ack_iam_${k}" => v if var.enable_sns 139 | }, 140 | { for k, v in { 141 | iam_role_arn = module.sqs.iam_role_arn 142 | namespace = try(var.sqs.namespace, "ack-system") 143 | service_account = local.sqs_name 144 | } : "ack_iam_${k}" => v if var.enable_sqs 145 | }, 146 | { for k, v in { 147 | iam_role_arn = module.lambda.iam_role_arn 148 | namespace = try(var.lambda.namespace, "ack-system") 149 | service_account = local.lambda_name 150 | } : "ack_iam_${k}" => v if var.enable_lambda 151 | }, 152 | { for k, v in { 153 | iam_role_arn = module.iam.iam_role_arn 154 | namespace = try(var.iam.namespace, "ack-system") 155 | service_account = local.iam_name 156 | } : "ack_iam_${k}" => v if var.enable_iam 157 | }, 158 | { for k, v in { 159 | iam_role_arn = module.ec2.iam_role_arn 160 | namespace = try(var.ec2.namespace, "ack-system") 161 | service_account = local.ec2_name 162 | } : "ack_ec2_${k}" => v if var.enable_ec2 163 | }, 164 | { for k, v in { 165 | iam_role_arn = module.eks.iam_role_arn 166 | namespace = try(var.eks.namespace, "ack-system") 167 | service_account = local.eks_name 168 | } : "ack_eks_${k}" => v if var.enable_eks 169 | }, 170 | { for k, v in { 171 | iam_role_arn = module.kms.iam_role_arn 172 | namespace = try(var.kms.namespace, "ack-system") 173 | service_account = local.kms_name 174 | } : "ack_kms_${k}" => v if var.enable_kms 175 | }, 176 | { for k, v in { 177 | iam_role_arn = module.acm.iam_role_arn 178 | namespace = try(var.acm.namespace, "ack-system") 179 | service_account = local.acm_name 180 | } : "ack_acm_${k}" => v if var.enable_acm 181 | }, 182 | { for k, v in { 183 | iam_role_arn = module.apigatewayv2.iam_role_arn 184 | namespace = try(var.apigatewayv2.namespace, "ack-system") 185 | service_account = local.apigatewayv2_name 186 | } : "ack_apigatewayv2_${k}" => v if var.enable_apigatewayv2 187 | }, 188 | { for k, v in { 189 | iam_role_arn = module.dynamodb.iam_role_arn 190 | namespace = try(var.dynamodb.namespace, "ack-system") 191 | service_account = local.dynamodb_name 192 | } : "ack_dynamodb_${k}" => v if var.enable_dynamodb 193 | }, 194 | { for k, v in { 195 | iam_role_arn = module.s3.iam_role_arn 196 | namespace = try(var.s3.namespace, "ack-system") 197 | service_account = local.s3_name 198 | } : "ack_s3_${k}" => v if var.enable_s3 199 | }, 200 | { for k, v in { 201 | iam_role_arn = module.rds.iam_role_arn 202 | namespace = try(var.rds.namespace, "ack-system") 203 | service_account = local.rds_name 204 | } : "ack_rds_${k}" => v if var.enable_rds 205 | }, 206 | { for k, v in { 207 | iam_role_arn = module.prometheusservice.iam_role_arn 208 | namespace = try(var.prometheusservice.namespace, "ack-system") 209 | service_account = local.prometheusservice_name 210 | } : "ack_prometheusservice_${k}" => v if var.enable_prometheusservice 211 | }, 212 | { for k, v in { 213 | iam_role_arn = module.emrcontainers.iam_role_arn 214 | namespace = try(var.emrcontainers.namespace, "ack-system") 215 | service_account = local.emrcontainers_name 216 | } : "ack_emrcontainers_${k}" => v if var.enable_emrcontainers 217 | }, 218 | { for k, v in { 219 | iam_role_arn = module.sfn.iam_role_arn 220 | namespace = try(var.sfn.namespace, "ack-system") 221 | service_account = local.sfn_name 222 | } : "ack_sfn_${k}" => v if var.enable_sfn 223 | }, 224 | { for k, v in { 225 | iam_role_arn = module.eventbridge.iam_role_arn 226 | namespace = try(var.eventbridge.namespace, "ack-system") 227 | service_account = local.eventbridge_name 228 | } : "ack_eventbridge_${k}" => v if var.enable_eventbridge 229 | }, 230 | { for k, v in { 231 | iam_role_arn = module.elasticache.iam_role_arn 232 | namespace = try(var.elasticache.namespace, "ack-system") 233 | service_account = local.elasticache_name 234 | } : "ack_elasticache_${k}" => v if var.enable_elasticache 235 | } 236 | ) 237 | } 238 | -------------------------------------------------------------------------------- /tests/complete/README.md: -------------------------------------------------------------------------------- 1 | # Complete Example 2 | 3 | Configuration in this directory creates an AWS EKS cluster with the following ACK addons: 4 | - Amazon Network Firewall 5 | - Amazon CloudWatch Logs 6 | - Amazon Kinesis 7 | - AWS Secrets Manager 8 | - Amazon Route53Resolver 9 | - Amazon Route 53 10 | - Amazon Organizations 11 | - Amazon MQ 12 | - Amazon CloudWatch 13 | - Amazon Keyspaces 14 | - Amazon Kafka 15 | - Amazon EFS 16 | - Amazon ECS 17 | - Amazon CloudTrail 18 | - Amazon CloudFront 19 | - Amazon Application Auto Scaling 20 | - Amazon ACM Controller 21 | - Amazon ApiGatewayV2 Controller 22 | - Amazon DynamoDB Controller 23 | - Amazon EC2 Controller 24 | - Amazon ECR Controller 25 | - Amazon EKS Controller 26 | - Amazon ElastiCache Controller 27 | - Amazon EMR Containers Controller 28 | - Amazon EventBridge Controller 29 | - Amazon IAM Controller 30 | - Amazon KMS Controller 31 | - AWS Lambda Controller 32 | - Amazon MemoryDB Controller 33 | - Amazon OpenSearch Service Controller 34 | - Amazon Prometheus Service Controller 35 | - Amazon RDS Controller 36 | - Amazon S3 Controller 37 | - Amazon SageMaker Controller 38 | - AWS SFN Controller 39 | - Amazon SNS Controller 40 | - Amazon SQS Controller 41 | 42 | In addition, this example provisions a sample application which demonstrates using the ACK controllers for resource provisioning. 43 | The arhchitecture looks like this:
44 | ![overall architecture](images/ACK_microservice.png) 45 | 46 | ## Prerequisites: 47 | 48 | Ensure that you have the following tools installed locally: 49 | 50 | 1. [aws cli](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) 51 | 2. [kubectl](https://Kubernetes.io/docs/tasks/tools/) 52 | 3. [terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) 53 | 54 | ## Deploy 55 | 56 | To provision this example: 57 | 58 | ```sh 59 | terraform init 60 | terraform apply -var aws_region= # defaults to us-west-2 61 | ``` 62 | 63 | Enter `yes` at command prompt to apply 64 | 65 | ## Validate 66 | 67 | The following command will update the `kubeconfig` on your local machine and allow you to interact with your EKS Cluster using `kubectl` to validate the CoreDNS deployment for Fargate. 68 | 69 | 1. Run `update-kubeconfig` command: 70 | 71 | ```sh 72 | aws eks --region update-kubeconfig --name 73 | ``` 74 | 75 | 2. Verify ACK controllers for the services that are enabled are running: 76 | 77 | ```sh 78 | kubectl get pods -A 79 | 80 | NAMESPACE NAME READY STATUS RESTARTS AGE 81 | ack-system ack-acm-5697f4c5b4-czd5b 1/1 Running 0 11m 82 | ack-system ack-apigatewayv2-76d6bbd788-77t8p 1/1 Running 0 10m 83 | ack-system ack-applicationautoscaling-5fd6c8bf8f-zqn4p 1/1 Running 0 11m 84 | ack-system ack-cloudfront-544f4887c4-jhw5b 1/1 Running 0 12m 85 | ack-system ack-cloudtrail-5dc78b7576-2bwds 1/1 Running 0 11m 86 | ack-system ack-cloudwatch-5b844f47db-6fb5d 1/1 Running 0 11m 87 | ack-system ack-cloudwatchlogs-757f9879fb-jtvhh 1/1 Running 0 11m 88 | ack-system ack-dynamodb-7f4b47488d-btjff 1/1 Running 0 12m 89 | ack-system ack-ec2-5fbf6f55d9-hn8jw 1/1 Running 0 11m 90 | ack-system ack-ecr-5b4699f87b-rt5xt 1/1 Running 0 11m 91 | ack-system ack-ecs-74d8d67695-zbv97 1/1 Running 0 10m 92 | ack-system ack-efs-7b9f965b96-qbc6q 1/1 Running 0 13m 93 | ack-system ack-eks-54945d94d4-mflgw 1/1 Running 0 12m 94 | ack-system ack-elasticache-5758ff66bd-mmj27 1/1 Running 0 12m 95 | ack-system ack-emrcontainers-74c5d7b8c-9htg9 1/1 Running 0 11m 96 | ack-system ack-eventbridge-b76bd85b8-dtvxr 1/1 Running 0 13m 97 | ack-system ack-iam-89dd5d6b5-wf8tm 1/1 Running 0 11m 98 | ack-system ack-kafka-7bd95bd59-dvcf6 1/1 Running 0 10m 99 | ack-system ack-keyspaces-6cc9bbc575-lfjwr 1/1 Running 0 11m 100 | ack-system ack-kinesis-687bf76869-kqshn 1/1 Running 0 11m 101 | ack-system ack-kms-58b89848db-hrf8v 1/1 Running 0 11m 102 | ack-system ack-lambda-65bd7fbc8d-fjqfj 1/1 Running 0 11m 103 | ack-system ack-memorydb-76c988f6dd-4v8cz 1/1 Running 0 10m 104 | ack-system ack-mq-85b69db6c-tlt2p 1/1 Running 0 11m 105 | ack-system ack-networkfirewall-c6676fddc-tlvzr 1/1 Running 0 12m 106 | ack-system ack-opensearchservice-7fd9d8c866-9kkdx 1/1 Running 0 11m 107 | ack-system ack-organizations-784c69d659-cpn2r 1/1 Running 0 13m 108 | ack-system ack-prometheusservice-6d657cd878-7h7jw 1/1 Running 0 12m 109 | ack-system ack-rds-7df84bf989-hh7z7 1/1 Running 0 12m 110 | ack-system ack-route53-5d45dcbf66-9f82r 1/1 Running 0 12m 111 | ack-system ack-route53resolver-696cf68868-k825q 1/1 Running 0 12m 112 | ack-system ack-s3-6ffc4698c6-jtv6k 1/1 Running 0 12m 113 | ack-system ack-sagemaker-74f65d4cb9-g9ngl 1/1 Running 0 12m 114 | ack-system ack-secretsmanager-7974695c58-xkgbx 1/1 Running 0 13m 115 | ack-system ack-sfn-6b875794cb-c7pcv 1/1 Running 0 11m 116 | ack-system ack-sns-5c75794dbc-v5fgb 1/1 Running 0 11m 117 | ack-system ack-sqs-55dfc46cd6-wtz7d 1/1 Running 0 13m 118 | kube-system aws-load-balancer-controller-84b5bf9c5f-cd2kn 1/1 Running 0 12m 119 | kube-system aws-load-balancer-controller-84b5bf9c5f-z5mkm 1/1 Running 0 12m 120 | kube-system aws-node-5lv6j 2/2 Running 0 11m 121 | kube-system aws-node-c8ncz 2/2 Running 0 11m 122 | kube-system aws-node-d4tcw 2/2 Running 0 10m 123 | kube-system coredns-787cb67946-82m2k 1/1 Running 0 16m 124 | kube-system coredns-787cb67946-kf4vn 1/1 Running 0 16m 125 | kube-system eks-pod-identity-agent-cnklq 1/1 Running 0 11m 126 | kube-system eks-pod-identity-agent-fdjvk 1/1 Running 0 11m 127 | kube-system eks-pod-identity-agent-jzzsb 1/1 Running 0 11m 128 | kube-system kube-proxy-9x5js 1/1 Running 0 12m 129 | kube-system kube-proxy-f4hk9 1/1 Running 0 12m 130 | kube-system kube-proxy-gxcxt 1/1 Running 0 12m 131 | kube-system metrics-server-7577444cf8-mhx97 1/1 Running 0 14m 132 | ``` 133 | 134 | ## Sample Application Deployment 135 | 136 | 1. Update `sample-app/app.yaml` file and deploy: 137 | 138 | ```yaml 139 | apiVersion: apps/v1 140 | kind: Deployment 141 | metadata: 142 | name: deploy-api-dynamodb 143 | namespace: ack-demo 144 | ... 145 | env: 146 | - name: tableName # match with your dynamodb table setting 147 | value: ack-demo-table 148 | - name: aws_region 149 | value: "" 150 | ``` 151 | 152 | ```sh 153 | kubectl apply -f sample-app/app.yaml 154 | ``` 155 | 156 | Note: app.yaml deploys a simple nodeJS image from docker hub. The source code can be found [here](https://github.com/season1946/ack-microservices/tree/main/sample-app-code) 157 | 158 | 2. Get the listener ARN of the provisioned ALB: 159 | 160 | ```sh 161 | aws elbv2 describe-listeners \ 162 | --region \ 163 | --load-balancer-arn $(aws elbv2 describe-load-balancers \ 164 | --region \ 165 | --query "LoadBalancers[?contains(DNSName, '$(kubectl get ingress ingress-api-dynamodb -n ack-demo -o=jsonpath="{.status.loadBalancer.ingress[].hostname}")')].LoadBalancerArn" \ 166 | --output text) \ 167 | --query "Listeners[0].ListenerArn" \ 168 | --output text 169 | ``` 170 | 171 | > Replace `` in the command above with the correspoding region you deployed the cluster 172 | 173 | 3. Update `sample-app/apigwv2-httpapi.yaml` file and deploy: 174 | 175 | ```yaml 176 | apiVersion: apigatewayv2.services.k8s.aws/v1alpha1 177 | kind: Integration 178 | metadata: 179 | name: 'vpc-integration' 180 | spec: 181 | apiRef: 182 | from: 183 | name: 'ack-api' 184 | integrationType: HTTP_PROXY 185 | integrationURI: '' 186 | integrationMethod: ANY 187 | payloadFormatVersion: '1.0' 188 | connectionID: '' # api_gatewayv2_vpc_link_id in Terraform output 189 | connectionType: 'VPC_LINK' 190 | ``` 191 | 192 | ```sh 193 | kubectl apply -f sample-app/apigwv2-httpapi.yaml 194 | ``` 195 | 196 | Verify the status 197 | ```sh 198 | echo API=$(kubectl get api.apigatewayv2.services.k8s.aws/ack-api -o jsonpath='{.status.conditions[?(@.type=="ACK.ResourceSynced")].status}') 199 | echo Stage=$(kubectl get stage.apigatewayv2.services.k8s.aws/default-stage -o jsonpath='{.status.conditions[?(@.type=="ACK.ResourceSynced")].status}') 200 | echo Route=$(kubectl get route.apigatewayv2.services.k8s.aws/ack-route-vpclink -o jsonpath='{.status.conditions[?(@.type=="ACK.ResourceSynced")].status}') 201 | echo Integration=$(kubectl get integration.apigatewayv2.services.k8s.aws/vpc-integration -o jsonpath='{.status.conditions[?(@.type=="ACK.ResourceSynced")].status}') 202 | ``` 203 | 204 | Expected output 205 | ``` 206 | API=True 207 | Stage=True 208 | Route=True 209 | Integration=True 210 | ``` 211 | 212 | 4. Deploy DynamoDB table 213 | 214 | ```sh 215 | kubectl apply -f sample-app/dynamodb-table.yaml 216 | ``` 217 | 218 | Verify the status 219 | ```sh 220 | echo DynamoDB=$(kubectl get table.dynamodb.services.k8s.aws/ack-demo -o jsonpath='{.status.conditions[?(@.type=="ACK.ResourceSynced")].status}') 221 | ``` 222 | 223 | Expected output 224 | ``` 225 | DynamoDB=True 226 | ``` 227 | 228 | 5. Test the API created. Get the api domain: 229 | 230 | ```sh 231 | kubectl get -n ack-demo api ack-api -o jsonpath="{.status.apiEndpoint}" 232 | ``` 233 | 234 | 6. Post data to dynamodb with `post` and query data with `get` 235 | 236 | ``` 237 | curl -X POST \ 238 | -H 'Content-Type: application/json' \ 239 | -d '{ "name": "external" }' \ 240 | $(kubectl get -n ack-demo api ack-api -o jsonpath="{.status.apiEndpoint}")/rows/add 241 | 242 | curl $(kubectl get -n ack-demo api ack-api -o jsonpath="{.status.apiEndpoint}")/rows/all 243 | ``` 244 | 245 | ## Destroy 246 | 247 | To teardown and remove the resources created in this example: 248 | 249 | ```sh 250 | kubectl delete -f sample-app 251 | 252 | terraform destroy -target="module.eks_ack_addons" -target="module.eks_blueprints_kubernetes_addons" -auto-approve 253 | terraform destroy -target="module.eks_blueprints" -auto-approve 254 | terraform destroy -auto-approve 255 | ``` 256 | -------------------------------------------------------------------------------- /tests/complete/images/ACK_microservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-ia/terraform-aws-eks-ack-addons/a67416f076938461a302bf2a4692304cd15c300e/tests/complete/images/ACK_microservice.png -------------------------------------------------------------------------------- /tests/complete/main.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = local.region 3 | } 4 | 5 | # This provider is required for ECR to autheticate with public repos. Please note ECR authetication requires us-east-1 as region hence its hardcoded below. 6 | # If your region is same as us-east-1 then you can just use one aws provider 7 | provider "aws" { 8 | alias = "ecr" 9 | region = "us-east-1" 10 | } 11 | 12 | data "aws_ecrpublic_authorization_token" "token" { 13 | provider = aws.ecr 14 | } 15 | 16 | provider "kubernetes" { 17 | host = module.eks.cluster_endpoint 18 | cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) 19 | 20 | exec { 21 | api_version = "client.authentication.k8s.io/v1beta1" 22 | command = "aws" 23 | # This requires the awscli to be installed locally where Terraform is executed 24 | args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name] 25 | } 26 | } 27 | 28 | provider "helm" { 29 | kubernetes { 30 | host = module.eks.cluster_endpoint 31 | cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) 32 | 33 | exec { 34 | api_version = "client.authentication.k8s.io/v1beta1" 35 | command = "aws" 36 | # This requires the awscli to be installed locally where Terraform is executed 37 | args = ["eks", "get-token", "--cluster-name", module.eks.cluster_name] 38 | } 39 | } 40 | } 41 | 42 | data "aws_availability_zones" "available" {} 43 | data "aws_caller_identity" "current" {} 44 | 45 | locals { 46 | name = basename(path.cwd) 47 | region = var.aws_region 48 | 49 | vpc_cidr = "10.0.0.0/16" 50 | azs = slice(data.aws_availability_zones.available.names, 0, 3) 51 | 52 | tags = { 53 | Blueprint = local.name 54 | GithubRepo = "github.com/aws-ia/terraform-aws-eks-blueprints-addons" 55 | } 56 | } 57 | 58 | ################################################################################ 59 | # EKS Cluster 60 | ################################################################################ 61 | 62 | #tfsec:ignore:aws-eks-enable-control-plane-logging 63 | module "eks" { 64 | source = "terraform-aws-modules/eks/aws" 65 | version = "~> 20.11" 66 | 67 | cluster_name = local.name 68 | cluster_version = "1.30" 69 | 70 | # Give the Terraform identity admin access to the cluster 71 | # which will allow it to deploy resources into the cluster 72 | enable_cluster_creator_admin_permissions = true 73 | cluster_endpoint_public_access = true 74 | 75 | cluster_addons = { 76 | coredns = {} 77 | eks-pod-identity-agent = {} 78 | kube-proxy = {} 79 | vpc-cni = {} 80 | } 81 | 82 | vpc_id = module.vpc.vpc_id 83 | subnet_ids = module.vpc.private_subnets 84 | 85 | eks_managed_node_groups = { 86 | initial = { 87 | instance_types = ["m5.xlarge"] 88 | max_size = 3 89 | min_size = 3 90 | desired_size = 3 91 | } 92 | } 93 | 94 | tags = local.tags 95 | } 96 | 97 | ################################################################################ 98 | # EKS Blueprints Addons 99 | ################################################################################ 100 | 101 | module "eks_blueprints_addons" { 102 | source = "aws-ia/eks-blueprints-addons/aws" 103 | version = "~> 1.16" 104 | 105 | cluster_name = module.eks.cluster_name 106 | cluster_endpoint = module.eks.cluster_endpoint 107 | cluster_version = module.eks.cluster_version 108 | oidc_provider_arn = module.eks.oidc_provider_arn 109 | 110 | # Add-ons 111 | enable_aws_load_balancer_controller = true 112 | enable_metrics_server = true 113 | 114 | tags = local.tags 115 | } 116 | 117 | ################################################################################ 118 | # ACK Addons 119 | ################################################################################ 120 | 121 | module "eks_ack_addons" { 122 | source = "../../" 123 | 124 | # Cluster Info 125 | cluster_name = module.eks.cluster_name 126 | cluster_endpoint = module.eks.cluster_endpoint 127 | oidc_provider_arn = module.eks.oidc_provider_arn 128 | 129 | # ECR Credentials 130 | ecrpublic_username = data.aws_ecrpublic_authorization_token.token.user_name 131 | ecrpublic_token = data.aws_ecrpublic_authorization_token.token.password 132 | 133 | # Controllers to enable 134 | enable_networkfirewall = true 135 | enable_cloudwatchlogs = true 136 | enable_kinesis = true 137 | enable_secretsmanager = true 138 | enable_route53resolver = true 139 | enable_route53 = true 140 | enable_organizations = true 141 | enable_mq = true 142 | enable_cloudwatch = true 143 | enable_keyspaces = true 144 | enable_kafka = true 145 | enable_efs = true 146 | enable_ecs = true 147 | enable_cloudtrail = true 148 | enable_cloudfront = true 149 | enable_applicationautoscaling = true 150 | enable_sagemaker = true 151 | enable_memorydb = true 152 | enable_opensearchservice = true 153 | enable_ecr = true 154 | enable_sns = true 155 | enable_sqs = true 156 | enable_lambda = true 157 | enable_iam = true 158 | enable_ec2 = true 159 | enable_eks = true 160 | enable_kms = true 161 | enable_acm = true 162 | enable_apigatewayv2 = true 163 | enable_dynamodb = true 164 | enable_s3 = true 165 | enable_elasticache = true 166 | enable_rds = true 167 | enable_prometheusservice = true 168 | enable_emrcontainers = true 169 | enable_sfn = true 170 | enable_eventbridge = true 171 | 172 | tags = local.tags 173 | } 174 | 175 | ################################################################################ 176 | # Supporting Resources 177 | ################################################################################ 178 | 179 | module "vpc" { 180 | source = "terraform-aws-modules/vpc/aws" 181 | version = "~> 5.0" 182 | 183 | name = local.name 184 | cidr = local.vpc_cidr 185 | 186 | azs = local.azs 187 | public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k)] 188 | private_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 10)] 189 | 190 | enable_nat_gateway = true 191 | single_nat_gateway = true 192 | 193 | public_subnet_tags = { 194 | "kubernetes.io/role/elb" = 1 195 | } 196 | 197 | private_subnet_tags = { 198 | "kubernetes.io/role/internal-elb" = 1 199 | } 200 | 201 | tags = local.tags 202 | } 203 | 204 | # create irsa for api app read and write dynamodb 205 | data "aws_iam_policy_document" "dynamodb_access" { 206 | statement { 207 | actions = [ 208 | "dynamodb:BatchGet*", 209 | "dynamodb:DescribeStream", 210 | "dynamodb:DescribeTable", 211 | "dynamodb:Get*", 212 | "dynamodb:Query", 213 | "dynamodb:Scan", 214 | "dynamodb:BatchWrite*", 215 | "dynamodb:CreateTable", 216 | "dynamodb:Delete*", 217 | "dynamodb:Update*", 218 | "dynamodb:PutItem" 219 | ] 220 | resources = ["arn:aws:dynamodb:${local.region}:${data.aws_caller_identity.current.account_id}:table/ack-demo-table"] 221 | } 222 | 223 | statement { 224 | actions = [ 225 | "dynamodb:List*", 226 | "dynamodb:DescribeReservedCapacity*", 227 | "dynamodb:DescribeLimits", 228 | "dynamodb:DescribeTimeToLive" 229 | ] 230 | resources = ["*"] 231 | } 232 | } 233 | 234 | locals { 235 | app = "ack-demo" 236 | } 237 | 238 | resource "aws_iam_policy" "dynamodb_access" { 239 | name = "${module.eks.cluster_name}-dynamodb-irsa-policy" 240 | description = "iam policy for dynamodb access" 241 | policy = data.aws_iam_policy_document.dynamodb_access.json 242 | 243 | tags = local.tags 244 | } 245 | 246 | resource "kubernetes_namespace_v1" "ack_demo" { 247 | metadata { 248 | name = local.app 249 | } 250 | } 251 | 252 | resource "kubernetes_service_account_v1" "ack_demo" { 253 | metadata { 254 | name = local.app 255 | namespace = kubernetes_namespace_v1.ack_demo.id 256 | } 257 | automount_service_account_token = false 258 | } 259 | 260 | module "irsa" { 261 | source = "aws-ia/eks-blueprints-addon/aws" 262 | version = "~> 1.1.1" 263 | 264 | # Disable helm release 265 | create_release = false 266 | 267 | # IAM role for service account (IRSA) 268 | create_role = true 269 | role_name = "${local.name}-${local.app}" 270 | role_name_use_prefix = true 271 | create_policy = false 272 | role_policies = { 273 | DynamoDbAccess = aws_iam_policy.dynamodb_access.arn 274 | } 275 | 276 | oidc_providers = { 277 | this = { 278 | provider_arn = module.eks.oidc_provider_arn 279 | namespace = kubernetes_namespace_v1.ack_demo.id 280 | service_account = basename(kubernetes_service_account_v1.ack_demo.id) 281 | } 282 | } 283 | 284 | tags = local.tags 285 | } 286 | 287 | 288 | resource "aws_security_group" "vpc_link_sg" { 289 | # checkov:skip=CKV2_AWS_5 290 | name = "${local.name}-vpc-link" 291 | description = "Security group for API Gateway v2 VPC link" 292 | vpc_id = module.vpc.vpc_id 293 | 294 | ingress { 295 | description = "Ingress all from VPC" 296 | from_port = 0 297 | to_port = 0 298 | protocol = "-1" 299 | cidr_blocks = [local.vpc_cidr] 300 | } 301 | 302 | egress { 303 | description = "Egress all to VPC" 304 | from_port = 0 305 | to_port = 0 306 | protocol = "-1" 307 | cidr_blocks = [local.vpc_cidr] 308 | } 309 | 310 | tags = local.tags 311 | } 312 | 313 | resource "aws_apigatewayv2_vpc_link" "vpc_link" { 314 | name = local.name 315 | security_group_ids = [resource.aws_security_group.vpc_link_sg.id] 316 | subnet_ids = module.vpc.private_subnets 317 | 318 | tags = local.tags 319 | } 320 | -------------------------------------------------------------------------------- /tests/complete/outputs.tf: -------------------------------------------------------------------------------- 1 | output "configure_kubectl" { 2 | description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig" 3 | value = "aws eks update-kubeconfig --region ${local.region} --name ${module.eks.cluster_name} --alias ${module.eks.cluster_name}" 4 | } 5 | 6 | output "api_gatewayv2_vpc_link_id" { 7 | description = "API Gateway v2 VPC link ID" 8 | value = resource.aws_apigatewayv2_vpc_link.vpc_link.id 9 | } 10 | -------------------------------------------------------------------------------- /tests/complete/sample-app/apigwv2-httpapi.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # create http api gw 3 | apiVersion: apigatewayv2.services.k8s.aws/v1alpha1 4 | kind: API 5 | metadata: 6 | name: "ack-api" 7 | namespace: ack-demo 8 | spec: 9 | name: "ack-api" 10 | protocolType: HTTP 11 | --- 12 | # stage 13 | apiVersion: apigatewayv2.services.k8s.aws/v1alpha1 14 | kind: Stage 15 | metadata: 16 | name: "default-stage" 17 | namespace: ack-demo 18 | spec: 19 | apiRef: 20 | from: 21 | name: "ack-api" 22 | stageName: "$default" 23 | autoDeploy: true 24 | description: "auto deployed stage for ack-api" 25 | --- 26 | # route-key used in path 27 | apiVersion: apigatewayv2.services.k8s.aws/v1alpha1 28 | kind: Route 29 | metadata: 30 | name: "ack-route-vpclink" 31 | namespace: ack-demo 32 | spec: 33 | apiRef: 34 | from: 35 | name: "ack-api" 36 | routeKey: "ANY /{proxy+}" 37 | targetRef: 38 | from: 39 | name: "vpc-integration" 40 | --- 41 | # hook with route. this one uses a public http site as backend 42 | apiVersion: apigatewayv2.services.k8s.aws/v1alpha1 43 | kind: Integration 44 | metadata: 45 | name: "vpc-integration" 46 | namespace: ack-demo 47 | spec: 48 | apiRef: 49 | from: 50 | name: "ack-api" 51 | integrationType: HTTP_PROXY 52 | integrationURI: "" 53 | integrationMethod: ANY 54 | payloadFormatVersion: "1.0" 55 | connectionID: "" # api_gatewayv2_vpc_link_id in terraform output 56 | connectionType: "VPC_LINK" 57 | -------------------------------------------------------------------------------- /tests/complete/sample-app/app.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: deploy-api-dynamodb 6 | namespace: ack-demo 7 | spec: 8 | selector: 9 | matchLabels: 10 | app.kubernetes.io/name: api-dynamodb 11 | replicas: 1 12 | template: 13 | metadata: 14 | labels: 15 | app.kubernetes.io/name: api-dynamodb 16 | spec: 17 | serviceAccountName: ack-demo 18 | automountServiceAccountToken: false 19 | securityContext: 20 | seccompProfile: 21 | type: RuntimeDefault 22 | containers: 23 | # https://github.com/season1946/ack-microservices/tree/main/sample-app-code 24 | - image: victorgucanada/new-dynamo-nodejs@sha256:457d364897719c6136b21685ee950c19fa0df0ad45aa20fa4790bc4304a940c1 25 | imagePullPolicy: Always 26 | name: api-dynamodb 27 | ports: 28 | - containerPort: 3000 # match with expose port in dockerfile 29 | securityContext: 30 | allowPrivilegeEscalation: false 31 | readOnlyRootFilesystem: true 32 | runAsNonRoot: true 33 | runAsUser: 10001 34 | capabilities: 35 | drop: 36 | - NET_RAW 37 | - ALL 38 | env: 39 | - name: tableName # match with your dynamodb table setting 40 | value: ack-demo-table 41 | - name: aws_region 42 | value: '' 43 | resources: 44 | requests: 45 | memory: '64Mi' 46 | cpu: '250m' 47 | limits: 48 | memory: '128Mi' 49 | cpu: '500m' 50 | livenessProbe: 51 | httpGet: 52 | path: / 53 | port: 3000 54 | readinessProbe: 55 | httpGet: 56 | path: / 57 | port: 3000 58 | initialDelaySeconds: 5 59 | periodSeconds: 10 60 | --- 61 | apiVersion: v1 62 | kind: Service 63 | metadata: 64 | name: service-api-dynamodb 65 | namespace: ack-demo 66 | spec: 67 | ports: 68 | - port: 80 69 | targetPort: 3000 70 | protocol: TCP 71 | type: NodePort 72 | selector: 73 | app.kubernetes.io/name: api-dynamodb 74 | --- 75 | apiVersion: networking.k8s.io/v1 76 | kind: Ingress 77 | metadata: 78 | name: ingress-api-dynamodb 79 | namespace: ack-demo 80 | annotations: 81 | alb.ingress.kubernetes.io/scheme: internal 82 | alb.ingress.kubernetes.io/target-type: ip 83 | spec: 84 | ingressClassName: alb 85 | rules: 86 | - http: 87 | paths: 88 | - path: / 89 | pathType: Prefix 90 | backend: 91 | service: 92 | name: service-api-dynamodb 93 | port: 94 | number: 80 95 | -------------------------------------------------------------------------------- /tests/complete/sample-app/dynamodb-table.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dynamodb.services.k8s.aws/v1alpha1 2 | kind: Table 3 | metadata: 4 | name: ack-demo 5 | namespace: ack-demo 6 | spec: 7 | keySchema: 8 | - attributeName: Id 9 | keyType: HASH 10 | attributeDefinitions: 11 | - attributeName: Id 12 | attributeType: 'S' 13 | provisionedThroughput: 14 | readCapacityUnits: 1 15 | writeCapacityUnits: 1 16 | tableName: "ack-demo-table" # match with the table name used by sample application 17 | -------------------------------------------------------------------------------- /tests/complete/sample-app/elasticache.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # https://aws-controllers-k8s.github.io/community/reference/elasticache/v1alpha1/cacheparametergroup/ 3 | apiVersion: elasticache.services.k8s.aws/v1alpha1 4 | kind: CacheParameterGroup 5 | metadata: 6 | name: # cache parameter group name 7 | spec: 8 | cacheParameterGroupName: # cache parameter group name 9 | cacheParameterGroupFamily: # cache parameter group family 10 | description: # cache parameter group description 11 | parameterNameValues: 12 | # below is an example 13 | - parameterName: "TIMEOUT" # parameter name 14 | parameterValue: "100" # parameter value 15 | # Add more parameter name and value pairs as needed 16 | 17 | --- 18 | 19 | # https://aws-controllers-k8s.github.io/community/reference/ec2/v1alpha1/securitygroup/ 20 | apiVersion: ec2.services.k8s.aws/v1alpha1 21 | kind: SecurityGroup 22 | metadata: 23 | name: # security group name 24 | spec: 25 | description: # security group description 26 | ingressRules: 27 | - fromPort: 6379 # allow redis port 28 | toPort: 6379 # allow redis port 29 | ipProtocol: tcp 30 | ipRanges: 31 | - cidrIP: # allow traffic from the same VPC ... 32 | description: 33 | egressRules: 34 | - fromPort: 0 35 | toPort: 65535 36 | ipProtocol: tcp 37 | --- 38 | 39 | # https://aws-controllers-k8s.github.io/community/reference/elasticache/v1alpha1/cachesubnetgroup/ 40 | apiVersion: elasticache.services.k8s.aws/v1alpha1 41 | kind: CacheSubnetGroup 42 | metadata: 43 | name: # cache subnet group name 44 | spec: 45 | cacheSubnetGroupName: # cache subnet group name 46 | cacheSubnetGroupDescription: # cache subnet group description 47 | description: # cache subnet group description 48 | subnetIDs: 49 | - # subnet ID 1 50 | - # subnet ID 2 51 | - # subnet ID 3 52 | # Add more subnet IDs as needed 53 | 54 | --- 55 | 56 | # https://aws-controllers-k8s.github.io/community/reference/elasticache/v1alpha1/replicationgroup/ 57 | apiVersion: elasticache.services.k8s.aws/v1alpha1 58 | kind: ReplicationGroup 59 | metadata: 60 | name: # resource name 61 | spec: 62 | engine: redis 63 | engineVersion: 7.1 # or 6.x, check https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/supported-engine-versions.html 64 | replicationGroupID: # replication group id 65 | replicationGroupDescription: # replication group description 66 | automaticFailoverEnabled: true # or false 67 | cacheNodeType: cache.t2.micro # check https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html 68 | numNodeGroups: 1 # depending on your usage 69 | replicasPerNodeGroup: 1 # depending on your usage 70 | multiAZEnabled: false # or true 71 | atRestEncryptionEnabled: false # or true 72 | port: 6379 # or 6379 73 | snapshotRetentionLimit: 0 # or any number 74 | cacheParameterGroupRef: 75 | from: 76 | name: # cache parameter group name 77 | cacheSubnetGroupRef: 78 | from: 79 | name: # cache subnet group name 80 | securityGroupRefs: 81 | from: 82 | name: # security group name 83 | -------------------------------------------------------------------------------- /tests/complete/variables.tf: -------------------------------------------------------------------------------- 1 | variable "aws_region" { 2 | description = "AWS Region" 3 | type = string 4 | default = "us-west-2" 5 | } 6 | -------------------------------------------------------------------------------- /tests/complete/versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.3.2" 3 | 4 | required_providers { 5 | aws = { 6 | source = "hashicorp/aws" 7 | version = ">= 5.38" 8 | } 9 | helm = { 10 | source = "hashicorp/helm" 11 | version = ">= 2.8" 12 | } 13 | kubernetes = { 14 | source = "hashicorp/kubernetes" 15 | version = ">= 2.20" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /variables.tf: -------------------------------------------------------------------------------- 1 | variable "cluster_name" { 2 | description = "Name of the EKS cluster" 3 | type = string 4 | } 5 | 6 | variable "cluster_endpoint" { 7 | description = "Endpoint for your Kubernetes API server" 8 | type = string 9 | } 10 | 11 | variable "oidc_provider_arn" { 12 | description = "The ARN of the cluster OIDC Provider" 13 | type = string 14 | } 15 | 16 | variable "create_delay_duration" { 17 | description = "The duration to wait before creating resources" 18 | type = string 19 | default = "30s" 20 | } 21 | 22 | variable "create_delay_dependencies" { 23 | description = "Dependency attribute which must be resolved before starting the `create_delay_duration`" 24 | type = list(string) 25 | default = [] 26 | } 27 | 28 | variable "ecrpublic_username" { 29 | description = "User name decoded from the authorization token for accessing public ECR" 30 | type = string 31 | default = "" 32 | } 33 | 34 | variable "ecrpublic_token" { 35 | description = "Password decoded from the authorization token for accessing public ECR" 36 | type = string 37 | default = "" 38 | } 39 | 40 | variable "tags" { 41 | description = "Additional tags (e.g. `map('BusinessUnit`,`XYZ`)" 42 | type = map(string) 43 | default = {} 44 | } 45 | 46 | ################################################################################ 47 | # Amazon Network Firewall 48 | ################################################################################ 49 | 50 | variable "enable_networkfirewall" { 51 | description = "Enable ACK Network Firewall add-on" 52 | type = bool 53 | default = false 54 | } 55 | 56 | variable "networkfirewall" { 57 | description = "ACK Network Firewall Helm Chart config" 58 | type = any 59 | default = {} 60 | } 61 | 62 | ################################################################################ 63 | # Amazon CloudWatch Logs 64 | ################################################################################ 65 | 66 | variable "enable_cloudwatchlogs" { 67 | description = "Enable ACK CloudWatch Logs add-on" 68 | type = bool 69 | default = false 70 | } 71 | 72 | variable "cloudwatchlogs" { 73 | description = "ACK CloudWatch Logs Helm Chart config" 74 | type = any 75 | default = {} 76 | } 77 | 78 | ################################################################################ 79 | # Kinesis 80 | ################################################################################ 81 | 82 | variable "enable_kinesis" { 83 | description = "Enable ACK Kinesis add-on" 84 | type = bool 85 | default = false 86 | } 87 | 88 | variable "kinesis" { 89 | description = "ACK Kinesis Helm Chart config" 90 | type = any 91 | default = {} 92 | } 93 | 94 | ################################################################################ 95 | # Secrets Manager 96 | ################################################################################ 97 | 98 | variable "enable_secretsmanager" { 99 | description = "Enable ACK Secrets Manager add-on" 100 | type = bool 101 | default = false 102 | } 103 | 104 | variable "secretsmanager" { 105 | description = "ACK Secrets Manager Helm Chart config" 106 | type = any 107 | default = {} 108 | } 109 | 110 | ################################################################################ 111 | # Route 53 Resolver 112 | ################################################################################ 113 | 114 | variable "enable_route53resolver" { 115 | description = "Enable ACK Route 53 Resolver add-on" 116 | type = bool 117 | default = false 118 | } 119 | 120 | variable "route53resolver" { 121 | description = "ACK Route 53 Resolver Helm Chart config" 122 | type = any 123 | default = {} 124 | } 125 | 126 | ################################################################################ 127 | # Route 53 128 | ################################################################################ 129 | 130 | variable "enable_route53" { 131 | description = "Enable ACK Route 53 add-on" 132 | type = bool 133 | default = false 134 | } 135 | 136 | variable "route53" { 137 | description = "ACK Route 53 Helm Chart config" 138 | type = any 139 | default = {} 140 | } 141 | 142 | ################################################################################ 143 | # Organizations 144 | ################################################################################ 145 | 146 | variable "enable_organizations" { 147 | description = "Enable ACK Organizations add-on" 148 | type = bool 149 | default = false 150 | } 151 | 152 | variable "organizations" { 153 | description = "ACK Organizations Helm Chart config" 154 | type = any 155 | default = {} 156 | } 157 | 158 | ################################################################################ 159 | # MQ 160 | ################################################################################ 161 | 162 | variable "enable_mq" { 163 | description = "Enable ACK MQ add-on" 164 | type = bool 165 | default = false 166 | } 167 | 168 | variable "mq" { 169 | description = "ACK MQ Helm Chart config" 170 | type = any 171 | default = {} 172 | } 173 | 174 | ################################################################################ 175 | # CloudWatch 176 | ################################################################################ 177 | 178 | variable "enable_cloudwatch" { 179 | description = "Enable ACK CloudWatch add-on" 180 | type = bool 181 | default = false 182 | } 183 | 184 | variable "cloudwatch" { 185 | description = "ACK CloudWatch Helm Chart config" 186 | type = any 187 | default = {} 188 | } 189 | 190 | ################################################################################ 191 | # Keyspaces 192 | ################################################################################ 193 | 194 | variable "enable_keyspaces" { 195 | description = "Enable ACK Keyspaces add-on" 196 | type = bool 197 | default = false 198 | } 199 | 200 | variable "keyspaces" { 201 | description = "ACK Keyspaces Helm Chart config" 202 | type = any 203 | default = {} 204 | } 205 | 206 | 207 | ################################################################################ 208 | # Kafka 209 | ################################################################################ 210 | 211 | variable "enable_kafka" { 212 | description = "Enable ACK Kafka add-on" 213 | type = bool 214 | default = false 215 | } 216 | 217 | variable "kafka" { 218 | description = "ACK Kafka Helm Chart config" 219 | type = any 220 | default = {} 221 | } 222 | 223 | ################################################################################ 224 | # EFS 225 | ################################################################################ 226 | 227 | variable "enable_efs" { 228 | description = "Enable ACK EFS add-on" 229 | type = bool 230 | default = false 231 | } 232 | 233 | variable "efs" { 234 | description = "ACK EFS Helm Chart config" 235 | type = any 236 | default = {} 237 | } 238 | 239 | ################################################################################ 240 | # ECS 241 | ################################################################################ 242 | 243 | variable "enable_ecs" { 244 | description = "Enable ACK ECS add-on" 245 | type = bool 246 | default = false 247 | } 248 | 249 | variable "ecs" { 250 | description = "ACK ECS Helm Chart config" 251 | type = any 252 | default = {} 253 | } 254 | 255 | ################################################################################ 256 | # Cloudtrail 257 | ################################################################################ 258 | 259 | variable "enable_cloudtrail" { 260 | description = "Enable ACK Cloudtrail add-on" 261 | type = bool 262 | default = false 263 | } 264 | 265 | variable "cloudtrail" { 266 | description = "ACK Cloudtrail Helm Chart config" 267 | type = any 268 | default = {} 269 | } 270 | 271 | ################################################################################ 272 | # Cloudfront 273 | ################################################################################ 274 | 275 | variable "enable_cloudfront" { 276 | description = "Enable ACK Cloudfront add-on" 277 | type = bool 278 | default = false 279 | } 280 | 281 | variable "cloudfront" { 282 | description = "ACK cloudfront Helm Chart config" 283 | type = any 284 | default = {} 285 | } 286 | 287 | ################################################################################ 288 | # Application Autoscaling 289 | ################################################################################ 290 | 291 | variable "enable_applicationautoscaling" { 292 | description = "Enable ACK Application Autoscaling add-on" 293 | type = bool 294 | default = false 295 | } 296 | 297 | variable "applicationautoscaling" { 298 | description = "ACK Application Autoscaling Helm Chart config" 299 | type = any 300 | default = {} 301 | } 302 | 303 | ################################################################################ 304 | # Sagemaker 305 | ################################################################################ 306 | 307 | variable "enable_sagemaker" { 308 | description = "Enable ACK Sagemaker add-on" 309 | type = bool 310 | default = false 311 | } 312 | 313 | variable "sagemaker" { 314 | description = "ACK Sagemaker Helm Chart config" 315 | type = any 316 | default = {} 317 | } 318 | 319 | ################################################################################ 320 | # MemoryDB 321 | ################################################################################ 322 | 323 | variable "enable_memorydb" { 324 | description = "Enable ACK MemoryDB add-on" 325 | type = bool 326 | default = false 327 | } 328 | 329 | variable "memorydb" { 330 | description = "ACK MemoryDB Helm Chart config" 331 | type = any 332 | default = {} 333 | } 334 | 335 | ################################################################################ 336 | # OpenSearch Service 337 | ################################################################################ 338 | 339 | variable "enable_opensearchservice" { 340 | description = "Enable ACK Opensearch Service add-on" 341 | type = bool 342 | default = false 343 | } 344 | 345 | variable "opensearchservice" { 346 | description = "ACK Opensearch Service Helm Chart config" 347 | type = any 348 | default = {} 349 | } 350 | 351 | ################################################################################ 352 | # ECR 353 | ################################################################################ 354 | 355 | variable "enable_ecr" { 356 | description = "Enable ACK ECR add-on" 357 | type = bool 358 | default = false 359 | } 360 | 361 | variable "ecr" { 362 | description = "ACK ECR Helm Chart config" 363 | type = any 364 | default = {} 365 | } 366 | 367 | ################################################################################ 368 | # SNS 369 | ################################################################################ 370 | 371 | variable "enable_sns" { 372 | description = "Enable ACK SNS add-on" 373 | type = bool 374 | default = false 375 | } 376 | 377 | variable "sns" { 378 | description = "ACK SNS Helm Chart config" 379 | type = any 380 | default = {} 381 | } 382 | 383 | ################################################################################ 384 | # SQS 385 | ################################################################################ 386 | 387 | variable "enable_sqs" { 388 | description = "Enable ACK SQS add-on" 389 | type = bool 390 | default = false 391 | } 392 | 393 | variable "sqs" { 394 | description = "ACK SQS Helm Chart config" 395 | type = any 396 | default = {} 397 | } 398 | 399 | ################################################################################ 400 | # Lambda 401 | ################################################################################ 402 | 403 | variable "enable_lambda" { 404 | description = "Enable ACK Lambda add-on" 405 | type = bool 406 | default = false 407 | } 408 | 409 | variable "lambda" { 410 | description = "ACK Lambda Helm Chart config" 411 | type = any 412 | default = {} 413 | } 414 | 415 | ################################################################################ 416 | # IAM 417 | ################################################################################ 418 | 419 | variable "enable_iam" { 420 | description = "Enable ACK iam add-on" 421 | type = bool 422 | default = false 423 | } 424 | 425 | variable "iam" { 426 | description = "ACK iam Helm Chart config" 427 | type = any 428 | default = {} 429 | } 430 | 431 | ################################################################################ 432 | # EC2 433 | ################################################################################ 434 | 435 | variable "enable_ec2" { 436 | description = "Enable ACK ec2 add-on" 437 | type = bool 438 | default = false 439 | } 440 | 441 | variable "ec2" { 442 | description = "ACK ec2 Helm Chart config" 443 | type = any 444 | default = {} 445 | } 446 | 447 | ################################################################################ 448 | # EKS 449 | ################################################################################ 450 | 451 | variable "enable_eks" { 452 | description = "Enable ACK eks add-on" 453 | type = bool 454 | default = false 455 | } 456 | 457 | variable "eks" { 458 | description = "ACK eks Helm Chart config" 459 | type = any 460 | default = {} 461 | } 462 | 463 | ################################################################################ 464 | # KMS 465 | ################################################################################ 466 | 467 | variable "enable_kms" { 468 | description = "Enable ACK kms add-on" 469 | type = bool 470 | default = false 471 | } 472 | 473 | variable "kms" { 474 | description = "ACK kms Helm Chart config" 475 | type = any 476 | default = {} 477 | } 478 | 479 | ################################################################################ 480 | # ACM 481 | ################################################################################ 482 | 483 | variable "enable_acm" { 484 | description = "Enable ACK acm add-on" 485 | type = bool 486 | default = false 487 | } 488 | 489 | variable "acm" { 490 | description = "ACK acm Helm Chart config" 491 | type = any 492 | default = {} 493 | } 494 | 495 | ################################################################################ 496 | # API Gateway 497 | ################################################################################ 498 | 499 | variable "enable_apigatewayv2" { 500 | description = "Enable ACK API gateway v2 add-on" 501 | type = bool 502 | default = false 503 | } 504 | 505 | variable "apigatewayv2" { 506 | description = "ACK API gateway v2 Helm Chart config" 507 | type = any 508 | default = {} 509 | } 510 | 511 | ################################################################################ 512 | # DynamoDB 513 | ################################################################################ 514 | 515 | variable "enable_dynamodb" { 516 | description = "Enable ACK dynamodb add-on" 517 | type = bool 518 | default = false 519 | } 520 | 521 | variable "dynamodb" { 522 | description = "ACK dynamodb Helm Chart config" 523 | type = any 524 | default = {} 525 | } 526 | 527 | ################################################################################ 528 | # S3 529 | ################################################################################ 530 | 531 | variable "enable_s3" { 532 | description = "Enable ACK s3 add-on" 533 | type = bool 534 | default = false 535 | } 536 | 537 | variable "s3" { 538 | description = "ACK s3 Helm Chart config" 539 | type = any 540 | default = {} 541 | } 542 | 543 | ################################################################################ 544 | # elasticache 545 | ################################################################################ 546 | 547 | variable "enable_elasticache" { 548 | description = "Enable ACK elasticache add-on" 549 | type = bool 550 | default = false 551 | } 552 | 553 | variable "elasticache" { 554 | description = "ACK elasticache Helm Chart config" 555 | type = any 556 | default = {} 557 | } 558 | 559 | ################################################################################ 560 | # RDS 561 | ################################################################################ 562 | 563 | variable "enable_rds" { 564 | description = "Enable ACK rds add-on" 565 | type = bool 566 | default = false 567 | } 568 | 569 | variable "rds" { 570 | description = "ACK rds Helm Chart config" 571 | type = any 572 | default = {} 573 | } 574 | 575 | ################################################################################ 576 | # EMR Containers 577 | ################################################################################ 578 | 579 | variable "enable_emrcontainers" { 580 | description = "Enable ACK EMR container add-on" 581 | type = bool 582 | default = false 583 | } 584 | 585 | variable "emrcontainers" { 586 | description = "ACK EMR container Helm Chart config" 587 | type = any 588 | default = {} 589 | } 590 | 591 | ################################################################################ 592 | # AMP 593 | ################################################################################ 594 | 595 | variable "enable_prometheusservice" { 596 | description = "Enable ACK prometheusservice add-on" 597 | type = bool 598 | default = false 599 | } 600 | 601 | variable "prometheusservice" { 602 | description = "ACK prometheusservice Helm Chart config" 603 | type = any 604 | default = {} 605 | } 606 | 607 | ################################################################################ 608 | # Step Functions 609 | ################################################################################ 610 | 611 | variable "enable_sfn" { 612 | description = "Enable ACK step functions add-on" 613 | type = bool 614 | default = false 615 | } 616 | 617 | variable "sfn" { 618 | description = "ACK step functions Helm Chart config" 619 | type = any 620 | default = {} 621 | } 622 | 623 | ################################################################################ 624 | # Event Bridge 625 | ################################################################################ 626 | 627 | variable "enable_eventbridge" { 628 | description = "Enable ACK EventBridge add-on" 629 | type = bool 630 | default = false 631 | } 632 | 633 | variable "eventbridge" { 634 | description = "ACK EventBridge Helm Chart config" 635 | type = any 636 | default = {} 637 | } 638 | 639 | ################################################################################ 640 | # GitOps Bridge 641 | ################################################################################ 642 | 643 | variable "create_kubernetes_resources" { 644 | description = "Create Kubernetes resource with Helm or Kubernetes provider" 645 | type = bool 646 | default = true 647 | } 648 | -------------------------------------------------------------------------------- /versions.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">= 1.0" 3 | 4 | required_providers { 5 | aws = { 6 | source = "hashicorp/aws" 7 | version = ">= 5.0" 8 | } 9 | time = { 10 | source = "hashicorp/time" 11 | version = ">= 0.9" 12 | } 13 | } 14 | } 15 | --------------------------------------------------------------------------------