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

Issue12 update tf version #13

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Available targets:
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
| <a name="input_tfc_address"></a> [tfc\_address](#input\_tfc\_address) | The HTTP or HTTPS address of the Terraform Cloud API. | `string` | `"https://app.terraform.io"` | no |
| <a name="input_tfc_agent_data_dir"></a> [tfc\_agent\_data\_dir](#input\_tfc\_agent\_data\_dir) | The path to a directory to store all agent-related data, including<br>Terraform configurations, cached Terraform release archives, etc. It is<br>important to ensure that the given directory is backed by plentiful<br>storage. | `string` | `null` | no |
| <a name="input_tfc_agent_disable_update"></a> [tfc\_agent\_disable\_update](#input\_tfc\_agent\_disable\_update) | Disable automatic core updates. | `bool` | `false` | no |
| <a name="input_tfc_agent_auto_update"></a> [tfc\_agent\_auto\_update](#input\_tfc\_agent\_auto\_update) | Disable automatic core updates. | `string` | ["minor","patch","disabled"] | no |
| <a name="input_tfc_agent_log_level"></a> [tfc\_agent\_log\_level](#input\_tfc\_agent\_log\_level) | The log verbosity expressed as a level string. Level options include<br>"trace", "debug", "info", "warn", and "error" | `string` | `"info"` | no |
| <a name="input_tfc_agent_single"></a> [tfc\_agent\_single](#input\_tfc\_agent\_single) | Enable single mode. This causes the agent to handle at most one job and<br>immediately exit thereafter. Useful for running agents as ephemeral<br>containers, VMs, or other isolated contexts with a higher-level scheduler<br>or process supervisor. | `bool` | `false` | no |
| <a name="input_tfc_agent_token"></a> [tfc\_agent\_token](#input\_tfc\_agent\_token) | The agent token to use when making requests to the Terraform Cloud API.<br>This token must be obtained from the API or UI. It is recommended to use<br>the environment variable whenever possible for configuring this setting due<br>to the sensitive nature of API tokens. | `string` | `""` | no |
Expand Down
2 changes: 1 addition & 1 deletion context.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

module "this" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.25.0"

enabled = var.enabled
namespace = var.namespace
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |
| <a name="input_tfc_address"></a> [tfc\_address](#input\_tfc\_address) | The HTTP or HTTPS address of the Terraform Cloud API. | `string` | `"https://app.terraform.io"` | no |
| <a name="input_tfc_agent_data_dir"></a> [tfc\_agent\_data\_dir](#input\_tfc\_agent\_data\_dir) | The path to a directory to store all agent-related data, including<br>Terraform configurations, cached Terraform release archives, etc. It is<br>important to ensure that the given directory is backed by plentiful<br>storage. | `string` | `null` | no |
| <a name="input_tfc_agent_disable_update"></a> [tfc\_agent\_disable\_update](#input\_tfc\_agent\_disable\_update) | Disable automatic core updates. | `bool` | `false` | no |
| <a name="input_tfc_agent_auto_update"></a> [tfc\_agent\_auto\_update](#input\_tfc\_agent\_auto\_update) | Disable automatic core updates. | `string` | `minor`,`patch`,`disabled` | no |
| <a name="input_tfc_agent_log_level"></a> [tfc\_agent\_log\_level](#input\_tfc\_agent\_log\_level) | The log verbosity expressed as a level string. Level options include<br>"trace", "debug", "info", "warn", and "error" | `string` | `"info"` | no |
| <a name="input_tfc_agent_single"></a> [tfc\_agent\_single](#input\_tfc\_agent\_single) | Enable single mode. This causes the agent to handle at most one job and<br>immediately exit thereafter. Useful for running agents as ephemeral<br>containers, VMs, or other isolated contexts with a higher-level scheduler<br>or process supervisor. | `bool` | `false` | no |
| <a name="input_tfc_agent_token"></a> [tfc\_agent\_token](#input\_tfc\_agent\_token) | The agent token to use when making requests to the Terraform Cloud API.<br>This token must be obtained from the API or UI. It is recommended to use<br>the environment variable whenever possible for configuring this setting due<br>to the sensitive nature of API tokens. | `string` | `""` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/context.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

module "this" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.25.0"

enabled = var.enabled
namespace = var.namespace
Expand Down
3 changes: 3 additions & 0 deletions examples/complete/fixtures.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ environment = "ue2"
stage = "test"

name = "example"

tags = { test = "test"}

4 changes: 1 addition & 3 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
provider "kubernetes" {
version = "~> 1.12"
}


module "tfc_agent" {
source = "../.."
Expand Down
14 changes: 12 additions & 2 deletions examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
terraform {
required_version = ">= 0.12.0, < 0.14"
// required_version = ">= 0.12.0, < 0.14"
required_version = ">= 0.14"

required_providers {
kubernetes = "~> 1.12"
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.7.1"
}
}
}

provider "kubernetes" {
# Configuration options

config_path = "~/.kube/config"
}
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ resource "kubernetes_deployment" "tfc_cloud_agent" {
value = var.tfc_agent_single
}
env {
name = "TFC_AGENT_DISABLE_UPDATE"
value = var.tfc_agent_disable_update
name = "TFC_AGENT_AUTO_UPDATE"
aknysh marked this conversation as resolved.
Show resolved Hide resolved
value = var.tfc_agent_auto_update
}
env {
name = "TFC_ADDRESS"
Expand All @@ -104,11 +104,11 @@ resource "kubernetes_deployment" "tfc_cloud_agent" {
}
}
resources {
limits {
limits = {
cpu = var.resource_limits_cpu
memory = var.resource_limits_memory
}
requests {
requests = {
cpu = var.resource_requests_cpu
memory = var.resource_requests_memory
}
Expand Down
16 changes: 8 additions & 8 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ variable "replicas" {
}

variable "deployment_annotations" {
type = map
type = map(any)
default = {}
description = "Annotations to add to the Kubernetes deployment"
}

variable "service_account_annotations" {
type = map
type = map(any)
default = {}
description = "Annotations to add to the Kubernetes service account"
}
Expand All @@ -41,13 +41,13 @@ variable "agent_image" {
}

variable "agent_cli_args" {
type = list
type = list(any)
default = []
description = "Extra command line arguments to pass to tfc-agent"
}

variable "agent_envs" {
type = map
type = map(any)
default = {}
description = "A map of any extra environment variables to pass to the TFC agent"
}
Expand Down Expand Up @@ -94,10 +94,10 @@ variable "tfc_agent_single" {
EOF
}

variable "tfc_agent_disable_update" {
type = bool
default = false
description = "Disable automatic core updates."
variable "tfc_agent_auto_update" {
type = string
default = "disabled"
description = "Disable automatic core updates. ['minor','patch','disabled']"
}

variable "tfc_address" {
Expand Down
12 changes: 9 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
terraform {
required_version = ">= 0.12.0, < 0.14.0"

# required_version = ">= 0.12.0, < 0.14.0"
required_version = ">= 0.14.0"
required_providers {
kubernetes = ">= 1.12.0"
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.7.1"
}
}
}