Skip to content

Commit

Permalink
Merge pull request #1304 from HadwaAbdelhalem/update_azure_workflow
Browse files Browse the repository at this point in the history
Update azure workflow golangcli-lint version
  • Loading branch information
denis256 authored Jun 20, 2023
2 parents 60601b4 + 143565f commit 6308579
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
ref: ${{ github.event.inputs.branch }}
- name: install golangci-lint binary
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.31.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.53.2
- name: lint modules/azure folder
id: azure_module_lint
run: |
Expand Down
15 changes: 10 additions & 5 deletions examples/azure/terraform-azure-aks-example/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ output "client_key" {
}

output "client_certificate" {
value = azurerm_kubernetes_cluster.k8s.kube_config.0.client_certificate
value = azurerm_kubernetes_cluster.k8s.kube_config.0.client_certificate
sensitive = true
}

output "cluster_ca_certificate" {
value = azurerm_kubernetes_cluster.k8s.kube_config.0.cluster_ca_certificate
value = azurerm_kubernetes_cluster.k8s.kube_config.0.cluster_ca_certificate
sensitive = true
}

output "cluster_username" {
value = azurerm_kubernetes_cluster.k8s.kube_config.0.username
value = azurerm_kubernetes_cluster.k8s.kube_config.0.username
sensitive = true
}

output "cluster_password" {
value = azurerm_kubernetes_cluster.k8s.kube_config.0.password
value = azurerm_kubernetes_cluster.k8s.kube_config.0.password
sensitive = true
}

output "kube_config" {
Expand All @@ -24,5 +28,6 @@ output "kube_config" {
}

output "host" {
value = azurerm_kubernetes_cluster.k8s.kube_config.0.host
value = azurerm_kubernetes_cluster.k8s.kube_config.0.host
sensitive = true
}
Binary file modified examples/azure/terraform-azure-keyvault-example/example.pfx
Binary file not shown.
50 changes: 26 additions & 24 deletions examples/azure/terraform-azure-keyvault-example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# ---------------------------------------------------------------------------------------------------------------------

provider "azurerm" {
version = "~>2.20"
version = "~>3.0"
features {
key_vault {
purge_soft_delete_on_destroy = false
Expand Down Expand Up @@ -70,35 +70,37 @@ resource "azurerm_key_vault" "key_vault" {
object_id = data.azurerm_client_config.current.object_id

key_permissions = [
"create",
"get",
"list",
"delete",
"purge",
"Create",
"Get",
"List",
"Delete",
"Purge",
"SetRotationPolicy",
"GetRotationPolicy"
]

secret_permissions = [
"set",
"get",
"list",
"delete",
"purge",
"Set",
"Get",
"List",
"Delete",
"Purge",
]

certificate_permissions = [
"create",
"delete",
"deleteissuers",
"get",
"getissuers",
"import",
"list",
"listissuers",
"managecontacts",
"manageissuers",
"setissuers",
"update",
"purge",
"Create",
"Delete",
"DeleteIssuers",
"Get",
"GetIssuers",
"Import",
"List",
"ListIssuers",
"ManageContacts",
"ManageIssuers",
"SetIssuers",
"Update",
"Purge",
]
}
}
Expand Down
3 changes: 0 additions & 3 deletions modules/azure/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"

"github.com/gruntwork-io/terratest/modules/collections"
"github.com/gruntwork-io/terratest/modules/logger"
"github.com/gruntwork-io/terratest/modules/random"
"github.com/gruntwork-io/terratest/modules/testing"
)
Expand Down Expand Up @@ -115,7 +114,6 @@ func GetRandomRegionE(t testing.TestingT, approvedRegions []string, forbiddenReg
regionsToPickFrom = collections.ListSubtract(regionsToPickFrom, forbiddenRegions)
region := random.RandomString(regionsToPickFrom)

logger.Logf(t, "Using region %s", region)
return region, nil
}

Expand All @@ -138,7 +136,6 @@ func GetAllAzureRegions(t testing.TestingT, subscriptionID string) []string {

// GetAllAzureRegionsE gets the list of Azure regions available in this subscription
func GetAllAzureRegionsE(t testing.TestingT, subscriptionID string) ([]string, error) {
logger.Log(t, "Looking up all Azure regions available in this account")

// Validate Azure subscription ID
subscriptionID, err := getTargetAzureSubscription(subscriptionID)
Expand Down

0 comments on commit 6308579

Please sign in to comment.