@@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
-
18
17
// Provides access to available Google Container Engine versions in a zone for a given project.
19
18
// https://www.terraform.io/docs/providers/google/d/google_container_engine_versions.html
20
19
data "google_container_engine_versions" "on-prem" {
21
- zone = " ${ var . zone } "
22
- project = " ${ var . project } "
20
+ zone = var. zone
21
+ project = var. project
23
22
}
24
23
25
24
// https://www.terraform.io/docs/providers/google/d/google_container_cluster.html
@@ -28,9 +27,9 @@ data "google_container_engine_versions" "on-prem" {
28
27
// Create the GKE Cluster
29
28
resource "google_container_cluster" "primary" {
30
29
name = " tracing-demo-space"
31
- zone = " ${ var . zone } "
30
+ zone = var. zone
32
31
initial_node_count = 1
33
- min_master_version = " ${ data . google_container_engine_versions . on-prem . latest_master_version } "
32
+ min_master_version = data. google_container_engine_versions . on-prem . latest_master_version
34
33
35
34
// Scopes were a pre-IAM method of giving instances API access
36
35
// They are still around we need to give our cluster nodes
@@ -46,6 +45,8 @@ resource "google_container_cluster" "primary" {
46
45
]
47
46
}
48
47
48
+ // Here we use gcloud to gather authentication information about our new cluster and write that
49
+ // information to kubectls config file
49
50
// Here we use gcloud to gather authentication information about our new cluster and write that
50
51
// information to kubectls config file
51
52
provisioner "local-exec" {
@@ -62,13 +63,14 @@ resource "google_pubsub_topic" "tracing-demo-topic" {
62
63
// You need a subscription to pull messages from a topic
63
64
resource "google_pubsub_subscription" "tracing-demo-subscription" {
64
65
name = " tracing-demo-cli"
65
- topic = " ${ google_pubsub_topic . tracing-demo-topic . name } "
66
+ topic = google_pubsub_topic. tracing-demo-topic . name
66
67
}
67
68
68
69
output "cluster_name" {
69
- value = " ${ google_container_cluster . primary . name } "
70
+ value = google_container_cluster. primary . name
70
71
}
71
72
72
73
output "primary_zone" {
73
- value = " ${ google_container_cluster . primary . zone } "
74
+ value = google_container_cluster. primary . zone
74
75
}
76
+
0 commit comments