Skip to content

Commit

Permalink
chore: updated naming
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed Feb 13, 2024
1 parent 80655ff commit c462834
Show file tree
Hide file tree
Showing 88 changed files with 601 additions and 304 deletions.
3 changes: 2 additions & 1 deletion examples/dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ resources:
|------|-------------|------|---------|:--------:|
| access\_key | AWS Access Key | `string` | n/a | yes |
| hosted\_zone\_id | The id of the hosted zone in which this record set will reside. | `string` | n/a | yes |
| name | Name of the example application | `string` | n/a | yes |
| region | AWS Region | `string` | n/a | yes |
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| name | Name of the example application | `string` | `"hum-rp-dns-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-dns-ex-"` | 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 -->
6 changes: 1 addition & 5 deletions examples/dns/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
locals {
res_def_prefix = "${var.name}-"
}

resource "humanitec_application" "example" {
id = var.name
name = var.name
Expand All @@ -16,7 +12,7 @@ module "route53" {
resource_packs_aws_rev = var.resource_packs_aws_rev
region = var.region

prefix = local.res_def_prefix
prefix = var.prefix

hosted_zone_id = var.hosted_zone_id
}
Expand Down
5 changes: 4 additions & 1 deletion examples/dns/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ access_key = ""
hosted_zone_id = ""

# Name of the example application
name = ""
name = "hum-rp-dns-example"

# Prefix of the created resources
prefix = "hum-rp-dns-ex-"

# AWS Region
region = ""
Expand Down
11 changes: 9 additions & 2 deletions examples/dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@ variable "resource_packs_aws_rev" {
default = "refs/heads/main"
}

variable "hosted_zone_id" {
description = "The id of the hosted zone in which this record set will reside."
type = string
}

variable "name" {
description = "Name of the example application"
type = string
default = "hum-rp-dns-example"
}

variable "hosted_zone_id" {
description = "The id of the hosted zone in which this record set will reside."
variable "prefix" {
description = "Prefix of the created resources"
type = string
default = "hum-rp-dns-ex-"
}
3 changes: 2 additions & 1 deletion examples/mysql/aurora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ resources:
| humanitec\_org\_id | Humanitec organization where resource definitions will be applied | `string` | n/a | yes |
| humanitec\_token | Humanitec API token | `string` | n/a | yes |
| k8s\_node\_security\_group\_id | AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster | `string` | n/a | yes |
| name | Name that will be used in resouces' names | `string` | n/a | yes |
| region | AWS Region to create resources | `string` | n/a | yes |
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| subnet\_ids | AWS Subnet IDs to use for the AWS RDS cluster | `set(string)` | n/a | yes |
| vpc\_id | AWS VPC ID | `string` | n/a | yes |
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| name | Name of the example application | `string` | `"hum-rp-mysql-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-mysql-ex-"` | 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 -->
5 changes: 2 additions & 3 deletions examples/mysql/aurora/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ resource "humanitec_application" "app" {
module "mysql" {
source = "../../../humanitec-resource-defs/mysql/aurora"

prefix = "${var.name}-"
resource_packs_aws_rev = var.resource_packs_aws_rev
resource_packs_aws_url = var.resource_packs_aws_url

access_key = var.access_key
secret_key = var.secret_key
region = var.region

name = "${var.name}-database"
prefix = var.prefix
name = var.name
database_name = "my_database"
master_username = "username"
master_password = "password"

vpc = var.vpc_id
subnets = var.subnet_ids
db_subnet_group_name = "${var.name}-subnet-group"
create_db_subnet_group = true
security_group_rules = {
ingress = {
Expand Down
7 changes: 5 additions & 2 deletions examples/mysql/aurora/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ humanitec_token = ""
# AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster
k8s_node_security_group_id = ""

# Name that will be used in resouces' names
name = ""
# Name of the example application
name = "hum-rp-mysql-example"

# Prefix of the created resources
prefix = "hum-rp-mysql-ex-"

# AWS Region to create resources
region = ""
Expand Down
17 changes: 12 additions & 5 deletions examples/mysql/aurora/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "name" {
type = string
description = "Name that will be used in resouces' names"
}

variable "access_key" {
type = string
description = "AWS Access Key"
Expand Down Expand Up @@ -60,3 +55,15 @@ variable "k8s_node_security_group_id" {
description = "AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster"
type = string
}

variable "name" {
description = "Name of the example application"
type = string
default = "hum-rp-mysql-example"
}

variable "prefix" {
description = "Prefix of the created resources"
type = string
default = "hum-rp-mysql-ex-"
}
3 changes: 2 additions & 1 deletion examples/mysql/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ resources:
| humanitec\_org\_id | Humanitec organization where resource definitions will be applied | `string` | n/a | yes |
| humanitec\_token | Humanitec API token | `string` | n/a | yes |
| k8s\_node\_security\_group\_id | AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster | `string` | n/a | yes |
| name | Name that will be used in resouces' names | `string` | n/a | yes |
| region | AWS Region to create resources | `string` | n/a | yes |
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| subnet\_ids | AWS Subnet IDs to use for the AWS RDS cluster | `set(string)` | n/a | yes |
| vpc\_id | AWS VPC ID | `string` | n/a | yes |
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| name | Name of the example application | `string` | `"hum-rp-mysql-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-mysql-ex-"` | 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 -->
5 changes: 2 additions & 3 deletions examples/mysql/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ resource "humanitec_application" "app" {
module "mysql" {
source = "../../../humanitec-resource-defs/mysql/basic"

prefix = "${var.name}-"
resource_packs_aws_rev = var.resource_packs_aws_rev
resource_packs_aws_url = var.resource_packs_aws_url

access_key = var.access_key
secret_key = var.secret_key
region = var.region

name = "${var.name}-database"
prefix = var.prefix
name = var.name
database_name = "my_database"
username = "username"
password = "password"

create_db_subnet_group = true
db_subnet_group_name = "${var.name}-subnet-group"
subnet_ids = var.subnet_ids

vpc_security_group_ids = [aws_security_group.mysql.id]
Expand Down
7 changes: 5 additions & 2 deletions examples/mysql/basic/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ humanitec_token = ""
# AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster
k8s_node_security_group_id = ""

# Name that will be used in resouces' names
name = ""
# Name of the example application
name = "hum-rp-mysql-example"

# Prefix of the created resources
prefix = "hum-rp-mysql-ex-"

# AWS Region to create resources
region = ""
Expand Down
17 changes: 12 additions & 5 deletions examples/mysql/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "name" {
type = string
description = "Name that will be used in resouces' names"
}

variable "access_key" {
type = string
description = "AWS Access Key"
Expand Down Expand Up @@ -60,3 +55,15 @@ variable "k8s_node_security_group_id" {
description = "AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster"
type = string
}

variable "name" {
description = "Name of the example application"
type = string
default = "hum-rp-mysql-example"
}

variable "prefix" {
description = "Prefix of the created resources"
type = string
default = "hum-rp-mysql-ex-"
}
3 changes: 2 additions & 1 deletion examples/postgres/aurora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ resources:
| humanitec\_org\_id | Humanitec organization where resource definitions will be applied | `string` | n/a | yes |
| humanitec\_token | Humanitec API token | `string` | n/a | yes |
| k8s\_node\_security\_group\_id | AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster | `string` | n/a | yes |
| name | Name that will be used in resouces' names | `string` | n/a | yes |
| region | AWS Region to create resources | `string` | n/a | yes |
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| subnet\_ids | AWS Subnet IDs to use for the AWS RDS cluster | `set(string)` | n/a | yes |
| vpc\_id | AWS VPC ID | `string` | n/a | yes |
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| name | Name of the example application | `string` | `"hum-rp-postgres-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-postgres-ex-"` | 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 -->
5 changes: 2 additions & 3 deletions examples/postgres/aurora/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ resource "humanitec_application" "app" {
module "postgres" {
source = "../../../humanitec-resource-defs/postgres/aurora"

prefix = "${var.name}-"
resource_packs_aws_rev = var.resource_packs_aws_rev
resource_packs_aws_url = var.resource_packs_aws_url

access_key = var.access_key
secret_key = var.secret_key
region = var.region

name = "${var.name}-database"
prefix = var.prefix
name = var.name
database_name = "my_database"
master_username = "username"
master_password = "password"

vpc = var.vpc_id
subnets = var.subnet_ids
db_subnet_group_name = "${var.name}-subnet-group"
create_db_subnet_group = true
security_group_rules = {
ingress = {
Expand Down
7 changes: 5 additions & 2 deletions examples/postgres/aurora/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ humanitec_token = ""
# AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster
k8s_node_security_group_id = ""

# Name that will be used in resouces' names
name = ""
# Name of the example application
name = "hum-rp-postgres-example"

# Prefix of the created resources
prefix = "hum-rp-postgres-ex-"

# AWS Region to create resources
region = ""
Expand Down
17 changes: 12 additions & 5 deletions examples/postgres/aurora/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "name" {
type = string
description = "Name that will be used in resouces' names"
}

variable "access_key" {
type = string
description = "AWS Access Key"
Expand Down Expand Up @@ -60,3 +55,15 @@ variable "k8s_node_security_group_id" {
description = "AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster"
type = string
}

variable "name" {
description = "Name of the example application"
type = string
default = "hum-rp-postgres-example"
}

variable "prefix" {
description = "Prefix of the created resources"
type = string
default = "hum-rp-postgres-ex-"
}
3 changes: 2 additions & 1 deletion examples/postgres/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ resources:
| humanitec\_org\_id | Humanitec organization where resource definitions will be applied | `string` | n/a | yes |
| humanitec\_token | Humanitec API token | `string` | n/a | yes |
| k8s\_node\_security\_group\_id | AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster | `string` | n/a | yes |
| name | Name that will be used in resouces' names | `string` | n/a | yes |
| region | AWS Region to create resources | `string` | n/a | yes |
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| subnet\_ids | AWS Subnet IDs to use for the AWS RDS cluster | `set(string)` | n/a | yes |
| vpc\_id | AWS VPC ID | `string` | n/a | yes |
| humanitec\_host | Humanitec API host url | `string` | `"https://api.humanitec.io"` | no |
| name | Name of the example application | `string` | `"hum-rp-postgres-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-postgres-ex-"` | 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 -->
5 changes: 2 additions & 3 deletions examples/postgres/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ resource "humanitec_application" "app" {
module "postgres" {
source = "../../../humanitec-resource-defs/postgres/basic"

prefix = "${var.name}-"
resource_packs_aws_rev = var.resource_packs_aws_rev
resource_packs_aws_url = var.resource_packs_aws_url

access_key = var.access_key
secret_key = var.secret_key
region = var.region

name = "${var.name}-database"
prefix = var.prefix
name = var.name
database_name = "my_database"
username = "username"
password = "password"

create_db_subnet_group = true
db_subnet_group_name = "${var.name}-subnet-group"
subnet_ids = var.subnet_ids

vpc_security_group_ids = [aws_security_group.postgres.id]
Expand Down
7 changes: 5 additions & 2 deletions examples/postgres/basic/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ humanitec_token = ""
# AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster
k8s_node_security_group_id = ""

# Name that will be used in resouces' names
name = ""
# Name of the example application
name = "hum-rp-postgres-example"

# Prefix of the created resources
prefix = "hum-rp-postgres-ex-"

# AWS Region to create resources
region = ""
Expand Down
17 changes: 12 additions & 5 deletions examples/postgres/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "name" {
type = string
description = "Name that will be used in resouces' names"
}

variable "access_key" {
type = string
description = "AWS Access Key"
Expand Down Expand Up @@ -60,3 +55,15 @@ variable "k8s_node_security_group_id" {
description = "AWS Security Group ID of the kubernetes nodes to allow access to the AWS RDS cluster"
type = string
}

variable "name" {
description = "Name of the example application"
type = string
default = "hum-rp-postgres-example"
}

variable "prefix" {
description = "Prefix of the created resources"
type = string
default = "hum-rp-postgres-ex-"
}
3 changes: 2 additions & 1 deletion examples/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ resources:
| secret\_key | AWS Secret Key | `string` | n/a | yes |
| subnet\_ids | AWS Subnet IDs to use for the AWS ElastiCache cluster | `set(string)` | n/a | yes |
| vpc\_id | AWS VPC ID | `string` | n/a | yes |
| name | Name of the example application | `string` | `"redis-test"` | no |
| name | Name of the example application | `string` | `"hum-rp-redis-example"` | no |
| prefix | Prefix of the created resources | `string` | `"hum-rp-redis-ex-"` | 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 -->
Loading

0 comments on commit c462834

Please sign in to comment.