Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11359

Call to function "templatefile" failed

$
0
0

Hi @apparentlymart ,

I need your help once again with terraform v0.13.0-beta3. I was checking the following snippet under

and have the following definition

resource "cloudfoundry_service_instance" "xsuaa_broker" {
  name  = var.xsuaa_broker_name
  space = data.cloudfoundry_space.landscape_helper_services_space.id
  service_plan = data.cloudfoundry_service.xsuaa_broker_service.service_plans["broker"]
  json_params = templatefile("${path.module}/templates/xsuaa-broker.json.tmpl", {
          xsuaa_landscape_name = var.xsuaa_landscape_name
          xsuaa_app_name = var.xsuaa_app_name
        })
}

${jsonencode({
 "description": "Systemsin-${xsuaa_landscape_name}",
 "foreign-scope-references": [
         "uaa.user"
  ],
  "oauth2-configuration": {
        "redirect-uris": [
               "http://localhost:*/**"
         ]
  },
 "xsappname": ${xsuaa_app_name}
})}

I get the following error when i do a terrafrom plan under the module which i am creating

  on main.tf line 55, in resource "cloudfoundry_service_instance" "xsuaa_broker":
  55:   json_params = templatefile("${path.module}/templates/xsuaa-broker.json.tmpl", {
  56:           xsuaa_landscape_name = var.xsuaa_landscape_name
  57:           xsuaa_app_name = var.xsuaa_app_name
  58:         })
    |----------------
    | path.module is "."

Call to function "templatefile" failed:
./templates/xsuaa-broker.json.tmpl:11,15-16: Invalid character; This character
is not used within the language., and 1 other diagnostic(s).

Kevin

9 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 11359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>