MCPcopy Create free account
hub / github.com/auth0/auth0-cli / createMainFile

Function createMainFile

internal/cli/terraform.go:313–341  ·  view source on GitHub ↗
(input *terraformInputs)

Source from the content-addressed store, hash-verified

311}
312
313func createMainFile(input *terraformInputs) error {
314 filePath := path.Join(input.OutputDIR, "auth0_main.tf")
315
316 file, err := os.Create(filePath)
317 if err != nil {
318 return err
319 }
320 defer func() {
321 _ = file.Close()
322 }()
323
324 fileContent := `terraform {
325 required_version = ">= ` + input.TerraformVersion + `"
326 required_providers {
327 auth0 = {
328 source = "auth0/auth0"
329 version = ">= 1.0.0"
330 }
331 }
332}
333
334provider "auth0" {
335 debug = true
336}
337`
338
339 _, err = file.WriteString(fileContent)
340 return err
341}
342
343func createImportFile(outputDIR string, data importDataList) error {
344 filePath := path.Join(outputDIR, "auth0_import.tf")

Callers 1

Calls 2

CloseMethod · 0.80
CreateMethod · 0.65

Tested by

no test coverage detected