Skip to content

Commit

Permalink
Merge pull request #78 from crayon/dev/outputs-1
Browse files Browse the repository at this point in the history
feat(outputs): added primary private ip as output
  • Loading branch information
molldk authored Oct 27, 2022
2 parents a252e73 + 32a5b0a commit 6b8da1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ jobs:
- uses: hashicorp/setup-terraform@v1
- run: terraform fmt -check -recursive

Analysis:
runs-on: ubuntu-latest

steps:
- name: Analyze with SonarCloud
uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args:
-Dsonar.projectKey=crayon_terraform-azurerm-vm
-Dsonar.organization=crayongroup
tfsec:
name: Run tfsec sarif report
runs-on: ubuntu-latest
Expand All @@ -60,4 +47,4 @@ jobs:
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: tfsec.sarif
sarif_file: tfsec.sarif
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ output "os_type" {
description = "The OS used on this virtual machine."
value = title(local.os_type)
}
output "private_ip_address" {
description = "The primary private IP addresses assigned to the virtual machine."
value = local.os_type != "windows" ? azurerm_linux_virtual_machine.machine[0].private_ip_address : azurerm_windows_virtual_machine.machine[0].private_ip_address
}

0 comments on commit 6b8da1b

Please sign in to comment.