feat(terraform): add support for terraform repos

Add terraform as a project type, make the language optional, and add a
.gitignore and justfile template for Terraform repositories.
This commit is contained in:
Oliver Davies 2023-09-27 18:57:04 +01:00
parent 9176f34444
commit af24a4b4fa
5 changed files with 79 additions and 2 deletions

View file

@ -115,6 +115,13 @@ final class CreateListOfFilesToGenerate
);
}
break;
case (strtolower(ProjectType::Terraform->name)):
$filesToGenerate = collect([
new TemplateFile(data: 'terraform/.gitignore', name: '.gitignore'),
new TemplateFile(data: 'terraform/justfile', name: 'justfile'),
]);
break;
}
$filesToGenerate[] = new TemplateFile(

View file

@ -47,14 +47,13 @@ final class Config
public array $experimental;
#[Assert\Choice(choices: ['javascript', 'php', 'typescript'])]
#[Assert\NotBlank]
public string $language;
#[Assert\Length(min: 1)]
#[Assert\NotBlank]
public string $name;
#[Assert\Choice(choices: ['astro', 'drupal', 'fractal', 'laravel', 'php-library', 'vuejs'])]
#[Assert\Choice(choices: ['astro', 'drupal', 'fractal', 'laravel', 'php-library', 'terraform', 'vuejs'])]
#[Assert\NotBlank]
public string $type;

View file

@ -9,4 +9,5 @@ enum ProjectType
case Astro;
case Drupal;
case Fractal;
case Terraform;
}