From 64d9826107863c5035aa177101b26df758a8bddf Mon Sep 17 00:00:00 2001 From: Engin Polat Date: Mon, 5 Apr 2021 20:47:52 +0300 Subject: [PATCH 1/9] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1be3b7c5b..27dc1dbe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ name: ci-workflow # target_pr: pr number on the source repo (e.g. 14, 25, etc.) on: + push: + branches: master workflow_dispatch: inputs: repo: From 1f555a8b8db5b9b3b35d16faa2c416d9aa2e7791 Mon Sep 17 00:00:00 2001 From: Rob Cameron Date: Thu, 22 Apr 2021 09:39:38 -0400 Subject: [PATCH 2/9] updated output variables with sensitive attribute --- examples/azure/terraform-azure-aks-example/output.tf | 3 ++- examples/azure/terraform-azure-cosmosdb-example/outputs.tf | 3 ++- examples/azure/terraform-azure-vm-example/outputs.tf | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/azure/terraform-azure-aks-example/output.tf b/examples/azure/terraform-azure-aks-example/output.tf index 74f91291b..a06b6ca89 100644 --- a/examples/azure/terraform-azure-aks-example/output.tf +++ b/examples/azure/terraform-azure-aks-example/output.tf @@ -19,7 +19,8 @@ output "cluster_password" { } output "kube_config" { - value = azurerm_kubernetes_cluster.k8s.kube_config_raw + value = azurerm_kubernetes_cluster.k8s.kube_config_raw + sensitive = true } output "host" { diff --git a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf index 87c3ad803..843d70795 100644 --- a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf +++ b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf @@ -11,5 +11,6 @@ output "endpoint" { } output "primary_key" { - value = azurerm_cosmosdb_account.test.primary_key + value = azurerm_cosmosdb_account.test.primary_key + sensitive = true } diff --git a/examples/azure/terraform-azure-vm-example/outputs.tf b/examples/azure/terraform-azure-vm-example/outputs.tf index 4f2044539..f02e681a7 100644 --- a/examples/azure/terraform-azure-vm-example/outputs.tf +++ b/examples/azure/terraform-azure-vm-example/outputs.tf @@ -40,7 +40,8 @@ output "virtual_network_name" { } output "vm_admin_username" { - value = azurerm_virtual_machine.vm_example.os_profile[*].admin_username + value = azurerm_virtual_machine.vm_example.os_profile[*].admin_username + sensitive = true } output "vm_image_sku" { From a55e05b4965d66bb98e93b6fee8c0ef483eabcd4 Mon Sep 17 00:00:00 2001 From: Rob Cameron Date: Mon, 26 Apr 2021 17:42:04 -0400 Subject: [PATCH 3/9] changed timeout from 90m to 120m --- .github/workflows/ci.yml | 2 +- .gitignore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27dc1dbe9..55a7afb46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: export ARM_SKIP_PROVIDER_REGISTRATION=${{ github.event.inputs.skip_provider_registration }} # run the unit tests under the `azure` subfolder - go test ./azure/* -v -timeout 90m + go test ./azure/* -v -timeout 120m - name: run go test for azure id: azure_test env: diff --git a/.gitignore b/.gitignore index 7751910c0..11d25e00f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ terraform.tfvars *.tfstate* .terragrunt .terragrunt-cache - +.terraform.lock.hcl # IDE files .idea .vscode From d4801c6ba03b17ad23d9fee068a6ae9d7e2d21e0 Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Tue, 27 Apr 2021 14:26:54 -0700 Subject: [PATCH 4/9] adding nonsenstive function and dropping timeout on go test --- .github/workflows/ci.yml | 2 +- examples/azure/terraform-azure-aks-example/output.tf | 3 +-- examples/azure/terraform-azure-cosmosdb-example/outputs.tf | 3 +-- examples/azure/terraform-azure-vm-example/outputs.tf | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55a7afb46..27dc1dbe9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: export ARM_SKIP_PROVIDER_REGISTRATION=${{ github.event.inputs.skip_provider_registration }} # run the unit tests under the `azure` subfolder - go test ./azure/* -v -timeout 120m + go test ./azure/* -v -timeout 90m - name: run go test for azure id: azure_test env: diff --git a/examples/azure/terraform-azure-aks-example/output.tf b/examples/azure/terraform-azure-aks-example/output.tf index a06b6ca89..5ed14bfc8 100644 --- a/examples/azure/terraform-azure-aks-example/output.tf +++ b/examples/azure/terraform-azure-aks-example/output.tf @@ -19,8 +19,7 @@ output "cluster_password" { } output "kube_config" { - value = azurerm_kubernetes_cluster.k8s.kube_config_raw - sensitive = true + value = nonsensitive(azurerm_kubernetes_cluster.k8s.kube_config_raw) } output "host" { diff --git a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf index 843d70795..11eb9ae93 100644 --- a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf +++ b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf @@ -11,6 +11,5 @@ output "endpoint" { } output "primary_key" { - value = azurerm_cosmosdb_account.test.primary_key - sensitive = true + value = nonsensitive(azurerm_cosmosdb_account.test.primary_key) } diff --git a/examples/azure/terraform-azure-vm-example/outputs.tf b/examples/azure/terraform-azure-vm-example/outputs.tf index f02e681a7..b5563f496 100644 --- a/examples/azure/terraform-azure-vm-example/outputs.tf +++ b/examples/azure/terraform-azure-vm-example/outputs.tf @@ -40,8 +40,7 @@ output "virtual_network_name" { } output "vm_admin_username" { - value = azurerm_virtual_machine.vm_example.os_profile[*].admin_username - sensitive = true + value = nonsensitive(azurerm_virtual_machine.vm_example.os_profile[*].admin_username) } output "vm_image_sku" { From 380f541bb6511d4eda675d6b056cd74050f98d57 Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Tue, 27 Apr 2021 14:34:38 -0700 Subject: [PATCH 5/9] adjusting format of output files --- examples/azure/terraform-azure-aks-example/output.tf | 2 +- examples/azure/terraform-azure-cosmosdb-example/outputs.tf | 2 +- examples/azure/terraform-azure-vm-example/outputs.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/azure/terraform-azure-aks-example/output.tf b/examples/azure/terraform-azure-aks-example/output.tf index 5ed14bfc8..115778a75 100644 --- a/examples/azure/terraform-azure-aks-example/output.tf +++ b/examples/azure/terraform-azure-aks-example/output.tf @@ -19,7 +19,7 @@ output "cluster_password" { } output "kube_config" { - value = nonsensitive(azurerm_kubernetes_cluster.k8s.kube_config_raw) + value = nonsensitive(azurerm_kubernetes_cluster.k8s.kube_config_raw) } output "host" { diff --git a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf index 11eb9ae93..313bd45d9 100644 --- a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf +++ b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf @@ -11,5 +11,5 @@ output "endpoint" { } output "primary_key" { - value = nonsensitive(azurerm_cosmosdb_account.test.primary_key) + value = nonsensitive(azurerm_cosmosdb_account.test.primary_key) } diff --git a/examples/azure/terraform-azure-vm-example/outputs.tf b/examples/azure/terraform-azure-vm-example/outputs.tf index b5563f496..ff5b6ccec 100644 --- a/examples/azure/terraform-azure-vm-example/outputs.tf +++ b/examples/azure/terraform-azure-vm-example/outputs.tf @@ -40,7 +40,7 @@ output "virtual_network_name" { } output "vm_admin_username" { - value = nonsensitive(azurerm_virtual_machine.vm_example.os_profile[*].admin_username) + value = nonsensitive(azurerm_virtual_machine.vm_example.os_profile[*].admin_username) } output "vm_image_sku" { From 51ecac55ffae57e0b9ec6b50f31ff32bb3190c9c Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Wed, 28 Apr 2021 09:35:00 -0700 Subject: [PATCH 6/9] ping to terraform 14.9 in ci workflow --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27dc1dbe9..36f699b1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,9 @@ jobs: ci-job: runs-on: [ubuntu-latest] steps: + - uses: hashicorp/setup-terraform@v1 + with: + terraform_version: 0.14.9 - name: checkout to repo uses: actions/checkout@v2 with: From 9fabb794877b4ba7ccfd0747edd909e19321b443 Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Wed, 28 Apr 2021 12:33:28 -0700 Subject: [PATCH 7/9] removing non-sensitive function from output --- examples/azure/terraform-azure-aks-example/output.tf | 2 +- examples/azure/terraform-azure-cosmosdb-example/outputs.tf | 2 +- examples/azure/terraform-azure-vm-example/outputs.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/azure/terraform-azure-aks-example/output.tf b/examples/azure/terraform-azure-aks-example/output.tf index 115778a75..74f91291b 100644 --- a/examples/azure/terraform-azure-aks-example/output.tf +++ b/examples/azure/terraform-azure-aks-example/output.tf @@ -19,7 +19,7 @@ output "cluster_password" { } output "kube_config" { - value = nonsensitive(azurerm_kubernetes_cluster.k8s.kube_config_raw) + value = azurerm_kubernetes_cluster.k8s.kube_config_raw } output "host" { diff --git a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf index 313bd45d9..87c3ad803 100644 --- a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf +++ b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf @@ -11,5 +11,5 @@ output "endpoint" { } output "primary_key" { - value = nonsensitive(azurerm_cosmosdb_account.test.primary_key) + value = azurerm_cosmosdb_account.test.primary_key } diff --git a/examples/azure/terraform-azure-vm-example/outputs.tf b/examples/azure/terraform-azure-vm-example/outputs.tf index ff5b6ccec..4f2044539 100644 --- a/examples/azure/terraform-azure-vm-example/outputs.tf +++ b/examples/azure/terraform-azure-vm-example/outputs.tf @@ -40,7 +40,7 @@ output "virtual_network_name" { } output "vm_admin_username" { - value = nonsensitive(azurerm_virtual_machine.vm_example.os_profile[*].admin_username) + value = azurerm_virtual_machine.vm_example.os_profile[*].admin_username } output "vm_image_sku" { From 2fc620eedfc265ae42a1960fa253dded7e1fc076 Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Wed, 28 Apr 2021 13:58:30 -0700 Subject: [PATCH 8/9] adding terraform wrapper to set up tf action --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36f699b1c..77df11898 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,8 @@ jobs: steps: - uses: hashicorp/setup-terraform@v1 with: - terraform_version: 0.14.9 + terraform_version: 0.14.9 + terraform_wrapper: false - name: checkout to repo uses: actions/checkout@v2 with: From 5755126288ec7556d7c31d77d5cffe825f288e0e Mon Sep 17 00:00:00 2001 From: Hattan Shobokshi Date: Wed, 28 Apr 2021 16:12:21 -0700 Subject: [PATCH 9/9] pinning to terraform 0.15.1 and adding senstive values back --- .github/workflows/ci.yml | 2 +- examples/azure/terraform-azure-aks-example/output.tf | 3 ++- examples/azure/terraform-azure-cosmosdb-example/outputs.tf | 3 ++- examples/azure/terraform-azure-vm-example/outputs.tf | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77df11898..88e74a43f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: steps: - uses: hashicorp/setup-terraform@v1 with: - terraform_version: 0.14.9 + terraform_version: 0.15.1 terraform_wrapper: false - name: checkout to repo uses: actions/checkout@v2 diff --git a/examples/azure/terraform-azure-aks-example/output.tf b/examples/azure/terraform-azure-aks-example/output.tf index 74f91291b..a06b6ca89 100644 --- a/examples/azure/terraform-azure-aks-example/output.tf +++ b/examples/azure/terraform-azure-aks-example/output.tf @@ -19,7 +19,8 @@ output "cluster_password" { } output "kube_config" { - value = azurerm_kubernetes_cluster.k8s.kube_config_raw + value = azurerm_kubernetes_cluster.k8s.kube_config_raw + sensitive = true } output "host" { diff --git a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf index 87c3ad803..843d70795 100644 --- a/examples/azure/terraform-azure-cosmosdb-example/outputs.tf +++ b/examples/azure/terraform-azure-cosmosdb-example/outputs.tf @@ -11,5 +11,6 @@ output "endpoint" { } output "primary_key" { - value = azurerm_cosmosdb_account.test.primary_key + value = azurerm_cosmosdb_account.test.primary_key + sensitive = true } diff --git a/examples/azure/terraform-azure-vm-example/outputs.tf b/examples/azure/terraform-azure-vm-example/outputs.tf index 4f2044539..ff5b6ccec 100644 --- a/examples/azure/terraform-azure-vm-example/outputs.tf +++ b/examples/azure/terraform-azure-vm-example/outputs.tf @@ -40,7 +40,7 @@ output "virtual_network_name" { } output "vm_admin_username" { - value = azurerm_virtual_machine.vm_example.os_profile[*].admin_username + value = nonsensitive(azurerm_virtual_machine.vm_example.os_profile[*].admin_username) } output "vm_image_sku" {