diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 01ede6d..d5256d4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* traveloka/techops +* @traveloka/techops diff --git a/README.md b/README.md index f17ffef..b23c847 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,8 @@ Don't forget to also add the resource that you added to [Supported Resources lis Terraform Version ----------------- -This module was created using Terraform 0.11.6. -So to be more safe, Terraform version 0.11.6 or newer is required to use this module. +This module was originally created using Terraform 0.11.6. +Terraform version 0.11.6 or newer is required to use this module. Authors diff --git a/examples/autoscaling-policy-example/main.tf b/examples/autoscaling-policy-example/main.tf index c2b15a6..b2aaf7b 100644 --- a/examples/autoscaling-policy-example/main.tf +++ b/examples/autoscaling-policy-example/main.tf @@ -8,7 +8,7 @@ module "this" { source = "../../" name_prefix = "${local.service_name}-${local.cluster_role}-${local.scaling_description}" - resource_type = "scaling_policy" + resource_type = "autoscaling_policy" keepers = { FirstKeeper = "TestValue" diff --git a/main.tf b/main.tf index a378760..10dc57d 100644 --- a/main.tf +++ b/main.tf @@ -1,3 +1,9 @@ +# This module was created using Terraform 0.11.6 on 2018/04/10 +# Tested working on Terraform 0.12.0 on 2019/05/28 +terraform { + required_version = ">= 0.11.6, < 0.13.0" +} + locals { # Randomly generated hexadecimal value should not exceed 16 characters. max_byte_length = 8 @@ -7,7 +13,7 @@ locals { # * var.name_prefix = "txtdata-app" --> prefix = "txtdata-app-" # * var.name_prefix = "txtdata-app-" --> prefix = "txtdata-app-" # * var.name_prefix = "txtdata-app--" --> prefix = "txtdata-app--" - prefix = "${substr(var.name_prefix, -1, 1) == "-" ? substr(var.name_prefix, 0, length(var.name_prefix)-1) : var.name_prefix}-" + prefix = "${substr(var.name_prefix, -1, 1) == "-" ? substr(var.name_prefix, 0, length(var.name_prefix) - 1) : var.name_prefix}-" prefix_length = "${length(local.prefix)}" resource_max_character_length = "${lookup(local.max_character_length, var.resource_type, 0)}" @@ -16,22 +22,11 @@ locals { random_byte_length = "${min(local.max_byte_length, local.random_max_byte_length)}" } -# Null Provider. This module was created on 2018/04/10 -provider "null" { - version = ">= 1.0.0, < 3.0.0" -} - # Random Provider. This module was created on 2018/04/10 provider "random" { version = ">= 1.2.0, < 3.0.0" } -# Throws error when resource_type is not suppported by the module yet -resource "null_resource" "unsupported_resource_type" { - count = "${local.resource_max_character_length == 0 ? 1 : 0}" - "\n\nCurrently supported resource types: \n* ${join("\n* ", keys(local.max_character_length))}" = true -} - # Provides random id in hex format resource "random_id" "this" { prefix = "${local.prefix}"