Skip to content

Commit

Permalink
chore: Fix precommit issues (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson authored Jan 4, 2025
1 parent 036b4da commit d475d33
Show file tree
Hide file tree
Showing 136 changed files with 2,749 additions and 2,232 deletions.
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
test-connection.yaml
deploy/kubernetes/charts/**/*.yaml
deploy/kubernetes/charts/**/*.yaml
deploy/kubernetes/charts/**/*.yml
dist
ATTRIBUTION.md
deploy/terraform/eks/**/*.yaml
src/**/target
Empty file added .prettierrc
Empty file.
3 changes: 2 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Code of Conduct

This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
opensource-codeofconduct@amazon.com with any additional questions or comments.
28 changes: 13 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,23 @@ documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment

- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment

## Contributing via Pull Requests

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *main* branch.
1. You are working against the latest source on the _main_ branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.

Expand All @@ -33,28 +32,27 @@ To send us a pull request, please:
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.
3. Ensure local tests pass.
4. Ensure code files are formatted using language provided tools such as `terraform fmt`.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
5. Commit to your fork using clear commit messages.
6. Send us a pull request, answering any default questions in the pull request interface.
7. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
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.

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.

## Code of Conduct

This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.


## Security issue notifications
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.

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.

## Licensing

See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
2 changes: 1 addition & 1 deletion deploy/terraform/apprunner/providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions deploy/terraform/apprunner/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variable "environment_name" {
type = string
default = "retail-store-ar"
type = string
default = "retail-store-ar"
description = "Name of the environment"
}

variable "container_image_overrides" {
Expand All @@ -10,6 +11,7 @@ variable "container_image_overrides" {
}

variable "image_repository_type" {
type = string
description = "The type of image repository where the images will be pulled from"
default = "ECR_PUBLIC"
}
12 changes: 7 additions & 5 deletions deploy/terraform/ecs/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This Terraform module creates all the necessary infrastructure and deploys the retail sample application on [Amazon Elastic Container Service](https://aws.amazon.com/ecs/).

It provides:

- VPC with public and private subnets
- ECS cluster using Fargate for compute
- All application dependencies such as RDS, DynamoDB table, Elasticache etc.
Expand All @@ -14,6 +15,7 @@ NOTE: This will create resources in your AWS account which will incur costs. You
## Usage

Pre-requisites for this are:

- AWS, Terraform and kubectl installed locally
- AWS CLI configured and authenticated with account to deploy to

Expand Down Expand Up @@ -41,12 +43,12 @@ This section documents the variables and outputs of the Terraform configuration.

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store-ecs` | yes |
| Name | Description | Type | Default | Required |
| ------------------ | -------------------------------------------------------------------- | -------- | ------------------ | :------: |
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store-ecs` | yes |

### Outputs

| Name | Description |
|------|-------------|
| Name | Description |
| ----------------- | ----------------------------------------- |
| `application_url` | URL where the application can be accessed |
2 changes: 1 addition & 1 deletion deploy/terraform/ecs/default/providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
source = "hashicorp/aws"
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions deploy/terraform/ecs/default/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variable "environment_name" {
type = string
default = "retail-store-ecs"
type = string
default = "retail-store-ecs"
description = "Name of the environment"
}

variable "container_image_overrides" {
Expand Down
18 changes: 10 additions & 8 deletions deploy/terraform/eks/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This Terraform module creates all the necessary infrastructure and deploys the retail sample application on [Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/) (EKS). This configuration will deploy all application dependencies using AWS managed services such as Amazon RDS and Amazon DynamoDB.

It provides:

- VPC with public and private subnets
- EKS cluster and managed node groups in multiple availability zones
- All application dependencies such as RDS, DynamoDB table, Elasticache etc.
Expand All @@ -15,6 +16,7 @@ NOTE: This will create resources in your AWS account which will incur costs. You
## Usage

Pre-requisites for this are:

- AWS, Terraform and kubectl installed locally
- AWS CLI configured and authenticated with account to deploy to

Expand Down Expand Up @@ -63,14 +65,14 @@ This section documents the variables and outputs of the Terraform configuration.

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store` | yes |
| `opentelemetry_enabled` | Flag to enable OpenTelemetry, which will install the AWS Distro for OpenTelemetry addon in the EKS cluster, create OpenTelemetry collectors and configure the application components appropriately | `bool` | `false` | no |
| `istio_enabled` | Flag to enable Istio, which will install Istio in the EKS cluster and configure the application components appropriately | `bool` | `false` | no |
| Name | Description | Type | Default | Required |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- | :------: |
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store` | yes |
| `opentelemetry_enabled` | Flag to enable OpenTelemetry, which will install the AWS Distro for OpenTelemetry addon in the EKS cluster, create OpenTelemetry collectors and configure the application components appropriately | `bool` | `false` | no |
| `istio_enabled` | Flag to enable Istio, which will install Istio in the EKS cluster and configure the application components appropriately | `bool` | `false` | no |

### Outputs

| Name | Description |
|------|-------------|
| `configure_kubectl` | AWS CLI command to configure `kubectl` for EKS cluster |
| Name | Description |
| ------------------- | ------------------------------------------------------ |
| `configure_kubectl` | AWS CLI command to configure `kubectl` for EKS cluster |
18 changes: 10 additions & 8 deletions deploy/terraform/eks/minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This Terraform module creates all the necessary infrastructure for the retail sample application on [Amazon Elastic Kubernetes Service](https://aws.amazon.com/eks/) (EKS). This configuration will only provision the EKS cluster and other foundational infrastructure such as the VPC. It will not deploy services to fulfill application dependencies such as Amazon RDS or Amazon DynamoDB (see [default configuration](../default/)).

It provides:

- VPC with public and private subnets
- EKS cluster and managed node groups in multiple availability zones

Expand All @@ -11,6 +12,7 @@ NOTE: This will create resources in your AWS account which will incur costs. You
## Usage

Pre-requisites for this are:

- AWS, Terraform and kubectl installed locally
- AWS CLI configured and authenticated with account to deploy to

Expand Down Expand Up @@ -48,14 +50,14 @@ This section documents the variables and outputs of the Terraform configuration.

### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store` | yes |
| `opentelemetry_enabled` | Flag to enable OpenTelemetry, which will install the AWS Distro for OpenTelemetry addon in the EKS cluster and create OpenTelemetry collectors. | `bool` | `false` | no |
| `istio_enabled` | Flag to enable Istio, which will install Istio in the EKS cluster | `bool` | `false` | no |
| Name | Description | Type | Default | Required |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------- | :------: |
| `environment_name` | Name of the environment which will be used for all resources created | `string` | `retail-store` | yes |
| `opentelemetry_enabled` | Flag to enable OpenTelemetry, which will install the AWS Distro for OpenTelemetry addon in the EKS cluster and create OpenTelemetry collectors. | `bool` | `false` | no |
| `istio_enabled` | Flag to enable Istio, which will install Istio in the EKS cluster | `bool` | `false` | no |

### Outputs

| Name | Description |
|------|-------------|
| `configure_kubectl` | AWS CLI command to configure `kubectl` for EKS cluster |
| Name | Description |
| ------------------- | ------------------------------------------------------ |
| `configure_kubectl` | AWS CLI command to configure `kubectl` for EKS cluster |
2 changes: 1 addition & 1 deletion deploy/terraform/lib/apprunner/carts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "app_runner_carts" {
port = 8080
runtime_environment_variables = {
CARTS_DYNAMODB_TABLENAME = var.carts_dynamodb_table_name
SPRING_PROFILES_ACTIVE = "dynamodb"
SPRING_PROFILES_ACTIVE = "dynamodb"
}
}
image_identifier = module.container_images.result.cart.url
Expand Down
3 changes: 3 additions & 0 deletions deploy/terraform/lib/apprunner/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ output "ui_service_url" {

output "catalog_security_group_id" {
value = aws_security_group.catalog.id
description = "Security group ID of the catalog service"
}

output "checkout_security_group_id" {
value = aws_security_group.checkout.id
description = "Security group ID of the checkout service"
}

output "orders_security_group_id" {
value = aws_security_group.orders.id
description = "Security group ID of the orders service"
}
Loading

0 comments on commit d475d33

Please sign in to comment.