-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6406fae
commit bcc14af
Showing
20 changed files
with
365 additions
and
25 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
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,39 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| terraform | >= 1.3.0 | | ||
| humanitec | ~> 0 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| humanitec | ~> 0 | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [humanitec_resource_definition.main](https://registry.terraform.io/providers/humanitec/humanitec/latest/docs/resources/resource_definition) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| access\_key | n/a | `string` | n/a | yes | | ||
| policy | Name of the exposed policy | `string` | n/a | yes | | ||
| prefix | n/a | `string` | n/a | yes | | ||
| region | n/a | `string` | n/a | yes | | ||
| resource\_packs\_aws\_rev | AWS Resource Pack git branch | `string` | n/a | yes | | ||
| s3\_resource\_class | n/a | `string` | n/a | yes | | ||
| secret\_key | n/a | `string` | n/a | yes | | ||
| resource\_packs\_aws\_url | AWS Resource Pack git url | `string` | `"https://github.com/humanitec-architecture/resource-packs-aws.git"` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| id | n/a | | ||
<!-- END_TF_DOCS --> |
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
File renamed without changes.
File renamed without changes.
11 changes: 8 additions & 3 deletions
11
...-policy/s3-admin/terraform.tfvars.example → ...fs/iam-policy/s3/terraform.tfvars.example
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,11 +1,16 @@ | ||
access_key = "" | ||
prefix = "" | ||
region = "" | ||
|
||
# Name of the exposed policy | ||
policy = "" | ||
|
||
prefix = "" | ||
region = "" | ||
|
||
# AWS Resource Pack git branch | ||
resource_packs_aws_rev = "" | ||
|
||
# AWS Resource Pack git url | ||
resource_packs_aws_url = "https://github.com/humanitec-architecture/resource-packs-aws.git" | ||
|
||
secret_key = "" | ||
s3_resource_class = "" | ||
secret_key = "" |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
resource "humanitec_resource_definition" "main" { | ||
driver_type = "humanitec/template" | ||
id = "${var.prefix}s3-${var.s3_resource_class}-${var.policy_resource_class}" | ||
name = "${var.prefix}s3-${var.s3_resource_class}-${var.policy_resource_class}" | ||
type = "s3" | ||
|
||
driver_inputs = { | ||
values_string = jsonencode({ | ||
templates = { | ||
outputs = <<EOL | ||
bucket: "$${resources['s3.${var.s3_resource_class}'].outputs.bucket}" | ||
region: "$${resources['s3.${var.s3_resource_class}'].outputs.region}" | ||
arn: "$${resources['s3.${var.s3_resource_class}'].outputs.arn}" | ||
EOL | ||
} | ||
}) | ||
} | ||
|
||
provision = { | ||
"aws-policy.${var.policy_resource_class}" = { | ||
match_dependents = true | ||
is_dependent = false | ||
} | ||
} | ||
} |
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,3 @@ | ||
output "id" { | ||
value = humanitec_resource_definition.main.id | ||
} |
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,10 @@ | ||
terraform { | ||
required_providers { | ||
humanitec = { | ||
source = "humanitec/humanitec" | ||
version = "~> 0" | ||
} | ||
} | ||
|
||
required_version = ">= 1.3.0" | ||
} |
13 changes: 13 additions & 0 deletions
13
humanitec-resource-defs/s3/passthrough/terraform.tfvars.example
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,13 @@ | ||
access_key = "" | ||
policy_resource_class = "" | ||
prefix = "" | ||
region = "" | ||
|
||
# AWS Resource Pack git branch | ||
resource_packs_aws_rev = "" | ||
|
||
# AWS Resource Pack git url | ||
resource_packs_aws_url = "https://github.com/humanitec-architecture/resource-packs-aws.git" | ||
|
||
s3_resource_class = "" | ||
secret_key = "" |
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,11 @@ | ||
variable "prefix" { | ||
type = string | ||
} | ||
|
||
variable "s3_resource_class" { | ||
type = string | ||
} | ||
|
||
variable "policy_resource_class" { | ||
type = string | ||
} |
Oops, something went wrong.