-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from sbp-akamai/new_features
new features
- Loading branch information
Showing
11 changed files
with
212 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: ci-checks-tf | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, labeled, unlabeled] | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
pull-requests: write | ||
|
||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/antonbabenko/pre-commit-terraform:v1.79.1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: 'pre-commit::add-github-repo-safe' | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
- name: 'pre-commit::run-all-checks' | ||
run: | | ||
pre-commit run -a --show-diff-on-failure -v | ||
module-required-files: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: 'tf-module::check-required-files' | ||
id: check_files | ||
uses: andstor/file-existence-action@v2 | ||
with: | ||
files: "variables.tf, main.tf, README.md, versions.tf" | ||
fail: true | ||
|
||
label-required-semver: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'pr::check-required-semver' | ||
uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
prefix_mode: true | ||
one_of: "release/" # patch , minor , major | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
label-required-pr-type: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'pr::check-required-pr-type' | ||
uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
any_of: bug,enhancement,documentation,security | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
label-do-not-merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'pr::check-required-semver' | ||
uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
none_of: do-not-merge | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: v1-func-create-tag-and-release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
create-new-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-ecosystem/action-release-label@v1 | ||
id: release-label | ||
if: ${{ github.event.pull_request.merged == true }} | ||
|
||
- uses: actions-ecosystem/action-get-latest-tag@v1 | ||
id: get-latest-tag | ||
if: ${{ steps.release-label.outputs.level != null }} | ||
|
||
- uses: actions-ecosystem/action-bump-semver@v1 | ||
id: bump-semver | ||
if: ${{ steps.release-label.outputs.level != null }} | ||
with: | ||
current_version: ${{ steps.get-latest-tag.outputs.tag }} | ||
level: ${{ steps.release-label.outputs.level }} | ||
|
||
- uses: actions-ecosystem/action-push-tag@v1 | ||
if: ${{ steps.release-label.outputs.level != null }} | ||
with: | ||
tag: ${{ steps.bump-semver.outputs.new_version }} | ||
message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}' | ||
|
||
- name: 'gh::release' | ||
if: ${{ steps.release-label.outputs.level != null }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.bump-semver.outputs.new_version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ | |
*.tfstate.* | ||
|
||
# .tfvars files | ||
*.tfvars | ||
*.tfvars | ||
|
||
# .terraform.lock.hcl files | ||
.terraform.local.hcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.77.0 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
- id: terraform_validate |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
output "opensearch_domain_arn" { | ||
description = "Return ARN of the OpenSearch cluster domain." | ||
value = aws_elasticsearch_domain.opensearch.arn | ||
value = aws_elasticsearch_domain.opensearch[*].arn | ||
} | ||
|
||
output "opensearch_domain_id" { | ||
description = "The domain id of the OpenSearch cluster." | ||
value = aws_elasticsearch_domain.opensearch.id | ||
value = aws_elasticsearch_domain.opensearch[*].id | ||
} | ||
|
||
output "cluster_name" { | ||
description = "The name of the OpenSearch cluster." | ||
value = aws_elasticsearch_domain.opensearch.domain_name | ||
value = aws_elasticsearch_domain.opensearch[*].domain_name | ||
} | ||
|
||
output "cluster_endpoint" { | ||
description = "The endpoint URL of the OpenSearch cluster." | ||
value = aws_elasticsearch_domain.opensearch.endpoint | ||
value = aws_elasticsearch_domain.opensearch[*].endpoint | ||
} | ||
|
||
output "cluster_version" { | ||
description = "The version of the OpenSearch cluster." | ||
value = replace(aws_elasticsearch_domain.opensearch.elasticsearch_version, "OpenSearch_", "") | ||
value = [for i in aws_elasticsearch_domain.opensearch[*] : replace(i.elasticsearch_version, "OpenSearch_", "")] | ||
} | ||
|
||
output "kibana_endpoint" { | ||
description = "The endpoint URL of Kibana." | ||
value = aws_elasticsearch_domain.opensearch.kibana_endpoint | ||
value = aws_elasticsearch_domain.opensearch[*].kibana_endpoint | ||
} |
Oops, something went wrong.