Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IaC tools for azure applications #453

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class AzureGeneratorComponent implements OnInit {
hideAuthenticationType: true,
hideHibernateCache: true,
hideDevDatabaseType: true,
hideIaCTool: true,
hideDatabaseTypeOptions: ['cassandra', 'couchbase', 'neo4j', 'no'],
hideProdDatabaseTypeOptions: ['mysql', 'mariadb', 'oracle', 'mssql', 'cassandra', 'couchbase', 'neo4j', 'no'],
hideDevDatabaseTypeOptions: ['h2Disk', 'h2Memory', 'mysql', 'mariadb', 'oracle', 'mssql', 'cassandra', 'couchbase', 'neo4j', 'no'],
Expand Down
7 changes: 7 additions & 0 deletions src/main/webapp/app/home/generator/generator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ <h4>Server side options</h4>
<option value="no" [hidden]="config.disableNoDatabaseOptions == true" *ngIf="!isProdDatabaseOptionHidden('no', 'no') || !config.hideDatabaseType">No database</option>
</select>
</div>
<div class="form-group" *ngIf="config.hideIaCTool">
<label for="iaCTools">Do you want to use Infrastructure as Code tool(multiple choice)?</label>
<select id="iaCTools" [(ngModel)]="model.iaCTools" name="iaCTools" class="form-control"
#iaCTools="ngModel" multiple>
<option *ngFor="let option of iaCToolOptions" [value]="option.value">{{option.name}}</option>
</select>
</div>
<div class="form-group" *ngIf="!config.hideDevDatabaseType">
<label for="devDatabaseType">Which <i>development</i> database would you like to use?</label>
<select id="devDatabaseType" [(ngModel)]="model.devDatabaseType" name="devDatabaseType"
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/app/home/generator/generator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class GeneratorComponent implements OnInit {
submitted = false;

languageOptions: any;
iaCToolOptions: any;

selectedGitProvider: string | undefined;
selectedGitCompany: string | undefined;
Expand Down Expand Up @@ -123,6 +124,10 @@ export class GeneratorComponent implements OnInit {
ngOnInit(): void {
this.newGenerator();
this.languageOptions = GeneratorComponent.getAllSupportedLanguageOptions();
this.iaCToolOptions = [
{ name: 'Terraform', value: 'terraform' },
{ name: 'Bicep', value: 'bicep' }
];
this.gitConfig = this.gitConfigurationService.gitConfig;
if (this.gitConfig) {
this.gitlabConfigured = this.gitConfig.gitlabConfigured ?? false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ export interface GeneratorConfigurationModel {
hideTestingOptions?: boolean;
hideHibernateCache?: boolean;
disableNoDatabaseOptions?: boolean;
hideIaCTool?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class JHipsterConfigurationModel {
public jhiPrefix = 'jhi';
public withAdminUi = true;
public blueprints: BlueprintModel[] = [];
public iaCTools = ['bicep', 'terraform'];

constructor(data?: Partial<JHipsterConfigurationModel>) {
if (data) {
Expand Down
Loading