Last active
July 16, 2024 18:59
Revisions
-
rafaelpontezup revised this gist
Jul 16, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,8 +42,8 @@ Prompt_content: > Por fim, valide se o código Terraform gerado e ajustado segue os padrões do Itau. Isto é, se ele segue todas as regras obrigatórias. Siga as instruções: 1. Se o código Terraform está de acordo com regras simplesmente responda com "Sem erros de validação"; 2. Caso contrário, liste as regras incorretas ou ausentes do código; Knowledged_sources: - boas-praticas-de-terraform-no-itau ``` -
rafaelpontezup revised this gist
Jul 16, 2024 . 3 changed files with 12 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ ## Quick Command: `generate-terraform-from-mermaid` O objetivo deste Quick Command é gerar templates Terraform para provisionar infraestrutura a partir de diagramas Mermaid seguindo um conjunto de regras do time ou empresa. Este conjunto de regras é configurado como Knowledge Source em alguns passos do Quick Command. Para criar o Quick Command, basta configurá-lo com o passos abaixo: ### Start ```yaml This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ ## Knowledge Source: `boas-praticas-de-terraform-no-itau` Este Knowledged Source contém todas as regras e boas práticas do time ou empresa para construção e escrita de templates Terraform. ```yaml Name: Boas práticas de Terraform no Itau Slug: boas-praticas-de-terraform-no-itau This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ ## Mermaid samples Examplos de diagramas de arquitetura Mermaid que podem ser utilizados nas DEMOs de StackSpot AI. ### Frontend estático: > **Prompts-01: site estático** > @@ -18,7 +22,7 @@ graph TD end ``` ### Frontend Application: > **Prompts-02: site estático + lambda** > -
rafaelpontezup revised this gist
Jul 16, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Description: > Knowledged Source com boas práticas e regras obrigatórias e opcionais de Terraform no Itau. Content: > # Boas práticas de Terraform no Itau Dentro do Itau, todos os templates Terraform devem seguir um padrão de tags, Ou seja, todo script Terraform deve conter as seguintes tags obrigatórias: -
rafaelpontezup revised this gist
Jul 16, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,8 @@ Description: > Knowledged Source com boas práticas e regras obrigatórias e opcionais de Terraform no Itau. Content: > # Boas práticas de Terraform no Itau Dentro do Itau, todos os templates Terraform devem seguir um padrão de tags, Ou seja, todo script Terraform deve conter as seguintes tags obrigatórias: """yaml owner_team_email -
rafaelpontezup revised this gist
Jul 16, 2024 . 2 changed files with 17 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ ## Knowledge Source: `boas-praticas-de-terraform-no-itau` ```yaml Name: Boas práticas de Terraform no Itau Slug: boas-praticas-de-terraform-no-itau Description: > Knowledged Source com boas práticas e regras obrigatórias e opcionais de Terraform no Itau. Content: > # Boas práticas de Terraform no Itau Dentro do Itau, todos os templates Terraform devem seguir um padrão de tags, Ou seja, todo script Terraform deve conter as seguintes tags obrigatórias: """yaml owner_team_email tech_team_email """ ``` File renamed without changes. -
rafaelpontezup revised this gist
Jul 16, 2024 . 1 changed file with 63 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,63 @@ ## Quick Command: `generate-terraform-from-mermaid` ### Start ```yaml Name: generate-terraform-from-mermaid Description: > Gera arquivos Terraform a partir de um diagrama Mermaid. A ideia é selecionar a representação textual do Mermaid e pedir para AI gerar código Terraform. ``` ### Step 01: `step-01-gerar-terraform` ```yaml Prompt_name: step-01-gerar-terraform Prompt_content: > Com base no código Mermaid abaixo, gere templates Terraform para provisionar infraestrutura na AWS. """code {{selected_code}} """ ``` ### Step 02: `step-02-ajustar-terraform` ```yaml Prompt_name: step-02-ajustar-terraform Prompt_content: > Agora, ajuste o código Terraform seguindo os padrões do Itau. Knowledged_sources: - boas-praticas-de-terraform-no-itau ``` ### Step 03: `step-03-validar-terraform` ```yaml Prompt_name: step-03-validar-terraform Prompt_content: > Por fim, valide se o código Terraform gerado e ajustado segue os padrões do Itau. Isto é, se ele segue todas as regras obrigatórias. Siga as instruções: 1. Se o código Terraforma segue todas as regras simplesmente responda com "Sem erros de validação"; 2. Caso contrário, liste as regras incorretas ou ausentes no código; Knowledged_sources: - boas-praticas-de-terraform-no-itau ``` ### End ```yaml Output: Chat Use_chat_context: No Final_result: > # Passo 1: Gerar Terraform {{step-01-gerar-terraform.answer}} # Passo 2: Ajustar Terraform {{step-02-ajustar-terraform.answer}} # Passo 3: Validar Terraform {{step-03-validar-terraform.answer}} ``` -
rafaelpontezup created this gist
Jun 25, 2024 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ ## Frontend estático: > **Prompts-01: site estático** > >p1: Usando Mermaid, construa uma diagrama para hospedar um frontend estático utilizando os serviços da AWS, como Cloudfront e S3. > >p2: Agora, com base no diagrama do Mermaid selecionado, gere os arquivos Terraform para provisionar a infraestrutura na AWS. ```mermaid graph TD A[Usuário] -->|Acessa| B[CloudFront] B -->|Distribui| C[S3 Bucket] C -->|Armazena| D[Arquivos Estáticos] subgraph AWS B C end ``` ## Frontend Application: > **Prompts-02: site estático + lambda** > >p1: Usando Mermaid, construa uma diagrama para uma aplicação frontend utilizando os serviços da AWS, como Cloudfront e S3. > >p2: Agora, com base no diagrama do Mermaid selecionado, gere os arquivos Terraform para provisionar a infra estrutura na AWS. ```mermaid graph TD; A[Usuário] -->|Acessa| B[CloudFront] B -->|Distribui conteúdo| C[S3 Bucket] B -->|Distribui conteúdo| D[Lambda@Edge] D -->|Processa requisições| C C -->|Armazena arquivos estáticos| E[Arquivos Estáticos] C -->|Armazena dados| F[Dados da Aplicação] ```