Skip to content

Commit

Permalink
Update to TF-1.3 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
snovikov authored Feb 2, 2023
1 parent 1170481 commit b0a7d1a
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TF_MODULES = $(sort $(dir $(wildcard $(CURRENT_DIR)modules/*/)))
# -------------------------------------------------------------------------------------------------
# Container versions
# -------------------------------------------------------------------------------------------------
TF_VERSION = 1.2.9
TF_VERSION = 1.3.7
TFDOCS_VERSION = 0.16.0-0.31
FL_VERSION = 0.4
JL_VERSION = 1.6.0-0.5
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ No providers.

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_github"></a> [github](#requirement\_github) | 5.13.0-fl.1 |

<!-- TFDOCS_REQUIREMENTS_END -->
Expand All @@ -122,12 +122,12 @@ Type:

```hcl
list(object({
ident = string # Unique identifier for each item to guarantee no re-create during list change
name = string # Name of the team as displayed on GitHub
description = optional(string) # Description of the team
privacy = optional(string) # Privacy (closed or secret), default is closed
parent_name = optional(string) # Name of the Parent team
members = optional(list(string)) # List of GitHub usernames to assign to a team
ident = string # Unique identifier for each item to guarantee no re-create during list change
name = string # Name of the team as displayed on GitHub
description = optional(string) # Description of the team
privacy = optional(string, "closed") # Privacy (closed or secret), default is closed
parent_name = optional(string) # Name of the Parent team
members = optional(list(string), []) # List of GitHub usernames to assign to a team
}))
```

Expand Down
7 changes: 2 additions & 5 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
locals {
teams = {
for index, team in var.teams :
# Cannot use defaults function with list because of issue in terraform
# https://github.com/hashicorp/terraform/issues/28406
# TODO: use defaults() function after issue is resolved
team.ident => {
name = team.name
description = team.description
privacy = team.privacy != null ? team.privacy : "closed"
privacy = team.privacy
parent_name = team.parent_name
members = team.members != null ? team.members : tolist([])
members = team.members
}
}
}
2 changes: 1 addition & 1 deletion modules/membership/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_github"></a> [github](#requirement\_github) | 5.13.0-fl.1 |

## Providers
Expand Down
3 changes: 1 addition & 2 deletions modules/membership/versions.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
required_version = ">= 1.0"

required_version = ">= 1.3"
required_providers {
# https://github.com/integrations/terraform-provider-github
# https://github.com/flaconi/terraform-provider-github
Expand Down
2 changes: 1 addition & 1 deletion modules/team/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_github"></a> [github](#requirement\_github) | 5.13.0-fl.1 |

## Providers
Expand Down
3 changes: 1 addition & 2 deletions modules/team/versions.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
required_version = ">= 1.0"

required_version = ">= 1.3"
required_providers {
# https://github.com/integrations/terraform-provider-github
# https://github.com/flaconi/terraform-provider-github
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CURRENT_GID := $(shell id -g)
# -------------------------------------------------------------------------------------------------
# Terraform configuration
# -------------------------------------------------------------------------------------------------
TF_VERSION = 1.2.9
TF_VERSION = 1.3.7
TF_LOG = WARN
LOCK_TIMEOUT = 60s
LOCK_FILE = .terraform.lock.hcl
Expand Down
2 changes: 1 addition & 1 deletion tests/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0"
required_version = ">= 1.3"
required_providers {
github = {
source = "flaconi/github"
Expand Down
12 changes: 6 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
variable "teams" {
description = "GitHub teams to manage."
type = list(object({
ident = string # Unique identifier for each item to guarantee no re-create during list change
name = string # Name of the team as displayed on GitHub
description = optional(string) # Description of the team
privacy = optional(string) # Privacy (closed or secret), default is closed
parent_name = optional(string) # Name of the Parent team
members = optional(list(string)) # List of GitHub usernames to assign to a team
ident = string # Unique identifier for each item to guarantee no re-create during list change
name = string # Name of the team as displayed on GitHub
description = optional(string) # Description of the team
privacy = optional(string, "closed") # Privacy (closed or secret), default is closed
parent_name = optional(string) # Name of the Parent team
members = optional(list(string), []) # List of GitHub usernames to assign to a team
}))
}
3 changes: 1 addition & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
experiments = [module_variable_optional_attrs]
required_version = ">= 1.0"
required_version = ">= 1.3"
required_providers {
# https://github.com/integrations/terraform-provider-github
# https://github.com/flaconi/terraform-provider-github
Expand Down

0 comments on commit b0a7d1a

Please sign in to comment.