GoogleCloudPlatform / gke-terraform-generator

gke-tf was created to streamline the creation of customized Terraform source files that build GKE clusters and supporting resources in GCP.
Apache License 2.0
55 stars 24 forks source link

Update CFT templates #16

Open chrislovecnm opened 4 years ago

chrislovecnm commented 4 years ago

In order to use CFT we need to update the various files in https://github.com/GoogleCloudPlatform/gke-terraform-generator/tree/master/pkg/terraform/cft

Each of the files needs to be updated to support the various values set in https://github.com/GoogleCloudPlatform/gke-terraform-generator/blob/master/pkg/api/api.go. Those structs define the values that the user provides in the yaml that is used to define a cluster.

The https://github.com/GoogleCloudPlatform/gke-terraform-generator/tree/master/pkg/terraform/vanilla directory containers the currently working templates for vanilla terraform that can be used as a guide on how to implement the CFT terraform.

The CFT go templates, to my best recollection, where working at one point, but need to be improved and tested.

Tests like https://github.com/GoogleCloudPlatform/gke-terraform-generator/blob/master/pkg/templates/templates_test.go#L82 determine if various values are set in the templates. Further unit testing should be implemented.

chrislovecnm commented 4 years ago

Also

gke-tf -t CFT -f my-example.yaml will create CFT based terraform. It already will work, but the templates need updating.