Skip to content

Commit 6764bc3

Browse files
rahul-infrarahul-infragithub-actions[bot]
authored
fix: Provision for making force deletion of s3
* fix: Provision for making force deletion of s3. * terraform-docs: automated action * terraform-docs: automated action * fix(ci): Allow semantic-release to analyze PR merge commits The release preview workflow was failing because semantic-release detected it was running on refs/pull/*/merge instead of the actual branch, causing it to skip release analysis. Changes: - Unset GITHUB_EVENT_NAME to remove pull_request context - Set GITHUB_EVENT_NAME=push to treat PR as push event - Add PR merge ref to allowed branches list This allows the preview to show what release version will be created. * ci: check preview release. --------- Co-authored-by: rahul-infra <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 2e78792 commit 6764bc3

File tree

13 files changed

+32
-1
lines changed

13 files changed

+32
-1
lines changed

.github/workflows/release-preview.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ jobs:
4747
export GITHUB_REF_NAME="${{ github.event.pull_request.head.ref }}"
4848
4949
# Run semantic-release with inline configuration using CLI options
50+
# Add PR merge ref to allowed branches since GitHub Actions runs PRs on refs/pull/*/merge
5051
OUTPUT=$(npx --package semantic-release@${{ env.SEMANTIC_RELEASE_VERSION }} \
5152
--package @semantic-release/exec \
5253
--package conventional-changelog-conventionalcommits \
5354
semantic-release \
5455
--dry-run \
5556
--no-ci \
5657
--debug \
57-
--branches ${{ github.event.pull_request.head.ref }} 2>&1 || true)
58+
--branches '${{ github.event.pull_request.head.ref }}' \
59+
--branches 'refs/pull/${{ github.event.pull_request.number }}/merge' 2>&1 || true)
5860
echo "$OUTPUT"
5961
6062
# Extract version information

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ aws ssm put-parameter --name "/rds/POSTGRES_DB_NAME" --value "value" --type "Sec
9595
| <a name="input_rds_db_tags"></a> [rds\_db\_tags](#input\_rds\_db\_tags) | List of tags | `map(string)` | `{}` | no |
9696
| <a name="input_rds_instance_class"></a> [rds\_instance\_class](#input\_rds\_instance\_class) | The RDS instance class for Kong database (e.g., db.t3.micro, db.r5.large) | `string` | `"db.t3.micro"` | no |
9797
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | ARN of the IAM role to assume in the hosted-zone account (should be null for same-account). | `string` | `null` | no |
98+
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | Whether to force destroy the S3 bucket used for Kong logs | `bool` | `false` | no |
9899
| <a name="input_ssl_policy"></a> [ssl\_policy](#input\_ssl\_policy) | Name of the SSL Policy for the listener. | `string` | `"ELBSecurityPolicy-2016-08"` | no |
99100
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC where Kong infrastructure will be deployed | `string` | n/a | yes |
100101

examples/complete/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ No resources.
101101
| <a name="input_rds_instance_class"></a> [rds\_instance\_class](#input\_rds\_instance\_class) | The instance class to use | `string` | n/a | yes |
102102
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
103103
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | IAM role ARN for cross-account Route53 access. | `string` | n/a | yes |
104+
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | Whether to force destroy the S3 bucket used for Kong logs | `bool` | n/a | yes |
104105
| <a name="input_ssl_policy"></a> [ssl\_policy](#input\_ssl\_policy) | (Optional) Name of the SSL Policy for the listener. | `string` | n/a | yes |
105106
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
106107

examples/complete/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ module "kong" {
4949
postgres_engine_version = var.postgres_engine_version
5050
postgres_major_engine_version = var.postgres_major_engine_version
5151
route53_assume_role_arn = var.route53_assume_role_arn
52+
s3_bucket_force_destroy = var.s3_bucket_force_destroy
5253
}

examples/complete/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,7 @@ variable "region" {
142142
description = "The AWS region"
143143
type = string
144144
}
145+
variable "s3_bucket_force_destroy" {
146+
description = "Whether to force destroy the S3 bucket used for Kong logs"
147+
type = bool
148+
}

examples/cross-account/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ No resources.
4949
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
5050
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
5151
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | The ARN of the DNS role | `string` | `null` | no |
52+
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | Whether to force destroy the S3 bucket used for Kong logs | `bool` | `false` | no |
5253
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
5354

5455
## Outputs

examples/cross-account/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ module "kong" {
2828
postgres_engine_version = var.postgres_engine_version
2929
postgres_major_engine_version = var.postgres_major_engine_version
3030
route53_assume_role_arn = var.route53_assume_role_arn
31+
s3_bucket_force_destroy = var.s3_bucket_force_destroy
3132
}

examples/cross-account/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ variable "region" {
4848
description = "The AWS region"
4949
type = string
5050
}
51+
52+
variable "s3_bucket_force_destroy" {
53+
description = "Whether to force destroy the S3 bucket used for Kong logs"
54+
type = bool
55+
default = false
56+
}

examples/same-account/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ No resources.
4848
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
4949
| <a name="input_region"></a> [region](#input\_region) | The AWS region | `string` | n/a | yes |
5050
| <a name="input_route53_assume_role_arn"></a> [route53\_assume\_role\_arn](#input\_route53\_assume\_role\_arn) | The ARN of the DNS role | `string` | `null` | no |
51+
| <a name="input_s3_bucket_force_destroy"></a> [s3\_bucket\_force\_destroy](#input\_s3\_bucket\_force\_destroy) | Whether to force destroy the S3 bucket used for Kong logs | `bool` | n/a | yes |
5152
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes |
5253

5354
## Outputs

examples/same-account/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ module "kong" {
2020
postgres_engine_version = var.postgres_engine_version
2121
postgres_major_engine_version = var.postgres_major_engine_version
2222
route53_assume_role_arn = var.route53_assume_role_arn
23+
s3_bucket_force_destroy = var.s3_bucket_force_destroy
2324
}

0 commit comments

Comments
 (0)