Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: first docs cleanup #14

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@

---

A collection of AWS resources ready to be used with [Humanitec](https://humanitec.com/).
The AWS Resource Pack contains various reference implementation of connecting AWS with [Humanitec](https://humanitec.com/).
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

You can find more details about Resource Packs and how to use them [inside the Humanitec documentation](https://developer.humanitec.com/platform-orchestrator/resources/resource-packs/).

The following resources are included:

* [dns/basic](./humanitec-resource-defs/dns/basic): A `dns` resource using Route 53.
* [iam-policy/ecr-create-repository](./humanitec-resource-defs/iam-policy/ecr-create-repository): IAM policy for to create ECR repositories.
* [iam-policy/s3-admin](./humanitec-resource-defs/iam-policy/s3-admin): IAM policy for admin access for a S3 bucket.
* [iam-policy/sqs-admin](./humanitec-resource-defs/iam-policy/sqs-admin): IAM policy for admin access for an SQS queue.
* [iam-policy/s3](./humanitec-resource-defs/iam-policy/s3): IAM policy for for an S3 bucket.
* [iam-policy/sqs](./humanitec-resource-defs/iam-policy/sqs): IAM policy for an SQS queue.
* [iam-role/service-account](./humanitec-resource-defs/iam-role/service-account): An assumable IAM role, by a k8s service account.
* [k8s/service-account](./humanitec-resource-defs/k8s/service-account): A k8s service account linked to an IAM role.
* [redis/basic](./humanitec-resource-defs/redis/basic): AWS ElastiCache resource.
* [s3/basic](./humanitec-resource-defs/s3/basic): A basic S3 bucket.
* [sqs/basic](./humanitec-resource-defs/sqs/basic): A basic SQS queue.
* [workload/service-account](./humanitec-resource-defs/workload/service-account): A workload service account.
* [k8s/service-account](./humanitec-resource-defs/k8s/service-account): A `k8s-service-account` linked to an IAM role.
* [rds/aurora](./humanitec-resource-defs/redis/basic): A `postgres` or `mysql` resource using AWS RDS Aurora.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
* [rds/basic](./humanitec-resource-defs/redis/basic): A `postgres` or `mysql` resource using AWS RDS.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
* [redis/basic](./humanitec-resource-defs/redis/basic): A `redis` resource using AWS ElastiCache.
* [s3/basic](./humanitec-resource-defs/s3/basic): A basic `s3` bucket.
* [sqs/basic](./humanitec-resource-defs/sqs/basic): A basic `sqs` queue.
* [workload/service-account](./humanitec-resource-defs/workload/service-account): Inject a k8s service account into a `workload`.

The `humanitec-resource-defs` directory includes the respective resource definitions.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The `modules` directory includes the Terraform modules used by the [Humanitec Terraform Driver](https://developer.humanitec.com/integration-and-extensions/drivers/generic-drivers/terraform/) to provision the actual resources.

Checkout `examples/main.tf` for an example application using S3 & SQS.
Checkout `examples/` for example application using the resource definitions listed above.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 15 additions & 2 deletions examples/route53/README.md → examples/dns/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: dns resource based on AWS Route 53

This example configures a [dns](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#dns) resource definition using AWS Route 53.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created resource definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
dns:
type: dns
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand All @@ -16,7 +29,7 @@

| Name | Source | Version |
|------|--------|---------|
| route53 | ../../humanitec-resource-defs/route53/basic | n/a |
| route53 | ../../humanitec-resource-defs/dns/basic | n/a |

## Resources

Expand All @@ -36,4 +49,4 @@
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
2 changes: 1 addition & 1 deletion examples/route53/main.tf → examples/dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "humanitec_application" "example" {
}

module "route53" {
source = "../../humanitec-resource-defs/route53/basic"
source = "../../humanitec-resource-defs/dns/basic"

access_key = var.access_key
secret_key = var.secret_key
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: mysql resource based on AWS RDS Aurora

This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) resource definition using AWS RDS Aurora.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
db:
type: mysql
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -42,4 +55,4 @@
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: mysql resource based on AWS RDS

This example configures a [mysql](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#mysql) resource definition using AWS RDS.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created resource definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
db:
type: mysql
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -45,4 +58,4 @@
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: postgres resource based on AWS RDS Aurora

This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) resource definition using AWS RDS Aurora.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created resource definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
db:
type: postgres
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -42,4 +55,4 @@
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: postgres resource based on AWS RDS

This example configures a [postgres](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#postgres) resource definition using AWS RDS.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created resource definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
db:
type: postgres
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -45,4 +58,4 @@
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
File renamed without changes.
15 changes: 14 additions & 1 deletion examples/redis/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Example: redis resource based on AWS ElastiCache

This example configures a [redis](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#redis) resource definition using AWS ElastiCache.
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

The created resource definition can be used in your score file using:
johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved

```yaml
resources:
...
redis:
type: redis
```

<!-- BEGIN_TF_DOCS -->
## Requirements

Expand Down Expand Up @@ -43,4 +56,4 @@
| name | Name of the example application | `string` | `"redis-test"` | no |
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | `"refs/heads/main"` | no |
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no |
<!-- END_TF_DOCS -->
<!-- END_TF_DOCS -->
6 changes: 3 additions & 3 deletions examples/s3/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# AWS S3
# Example: s3 resource based on AWS S3

This example configures an S3 bucket resource definition, with two different access policies:
This example configures a [s3](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#s3) resource definition using AWS S3, with two different access policies:

johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
* `basic-admin` (full access)
* `basic-read-only` (read-only access)

Those resources can be used in your score file like:
Those resource definitions can be used in your score file using:

johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
```yaml
resources:
Expand Down
8 changes: 4 additions & 4 deletions examples/sqs/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AWS SQS
# Example: sqs resource based on AWS SQS

This example configures an SQS queue resource definition, with two different access policies:
This example configures a [sqs](https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#sqs) resource definition using AWS SQS, with two different access policies:

johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
* `basic-publisher` (allowed to send messages)
* `basic-consumer` (allowed to receive messages)

Those resources can be used in your score file like:
Those resource definitions can be used in your score file using:

johanneswuerbach marked this conversation as resolved.
Show resolved Hide resolved
```yaml
resources:
...
sqs:
queue:
type: sqs
class: basic-publisher
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "humanitec_resource_definition" "main" {

values_string = jsonencode({
source = {
path = "modules/route53/basic"
path = "modules/dns/basic"
rev = var.resource_packs_aws_rev
url = var.resource_packs_aws_url
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading