Skip to content

Commit

Permalink
Enable GKE Cost allocation in the vpc-native-beta module (#58)
Browse files Browse the repository at this point in the history
* Enable GKE Cost allocation in the vpc-native-beta module

* Update changelog

* Fix string for boolean var
  • Loading branch information
AbdulAhadAkhter authored Sep 19, 2023
1 parent 483abe4 commit debfc3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions vpc-native-beta/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## vpc-native-beta-v1.5.2

- Enables GCP cost allocation for clusters

## vpc-native-beta-v1.5.1

- Enables utilizing GCP managed prometheus
Expand Down
5 changes: 5 additions & 0 deletions vpc-native-beta/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,8 @@ variable "enable_managed_prometheus" {
description = "Boolean to enable Google Managed Prometheus on clusters"
default = false
}
variable "enable_cost_allocation" {
type = bool
description = "Boolean to enable GKE Cost Allocation"
default = false
}
4 changes: 3 additions & 1 deletion vpc-native-beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ resource "google_container_cluster" "cluster" {
enable_private_nodes = var.enable_private_nodes
master_ipv4_cidr_block = var.master_ipv4_cidr_block
}

cost_management_config {
enabled = var.enable_cost_allocation
}
addons_config {
network_policy_config {
disabled = false
Expand Down

0 comments on commit debfc3d

Please sign in to comment.