fixed Terraform formating
Some checks failed
Code Quality & Security Scan / TFLint (push) Successful in 20s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 25s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 37s
Code Quality & Security Scan / Terraform Tests (push) Failing after 24s
Code Quality & Security Scan / SonarQube Trigger (push) Has been skipped
Code Quality & Security Scan / Terraform Init (push) Has been skipped
Code Quality & Security Scan / Terraform Apply (push) Has been skipped
Some checks failed
Code Quality & Security Scan / TFLint (push) Successful in 20s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 25s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 37s
Code Quality & Security Scan / Terraform Tests (push) Failing after 24s
Code Quality & Security Scan / SonarQube Trigger (push) Has been skipped
Code Quality & Security Scan / Terraform Init (push) Has been skipped
Code Quality & Security Scan / Terraform Apply (push) Has been skipped
This commit is contained in:
parent
cfbe6cbdc4
commit
f06308bdfd
2
data.tf
2
data.tf
@ -1,5 +1,5 @@
|
||||
data "vault_generic_secret" "vmware" {
|
||||
path = "secret/vmware"
|
||||
path = "secret/vmware"
|
||||
}
|
||||
|
||||
data "vsphere_datacenter" "dc" {
|
||||
|
||||
8
main.tf
8
main.tf
@ -12,10 +12,10 @@ resource "vsphere_resource_pool" "resource_groups" {
|
||||
name = each.value.name
|
||||
parent_resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
|
||||
|
||||
cpu_reservation = each.value.cpu_reservation
|
||||
cpu_expandable = each.value.cpu_expandable
|
||||
cpu_limit = each.value.cpu_limit
|
||||
cpu_shares = lookup(local.shares_mapping, each.value.cpu_shares, 1000)
|
||||
cpu_reservation = each.value.cpu_reservation
|
||||
cpu_expandable = each.value.cpu_expandable
|
||||
cpu_limit = each.value.cpu_limit
|
||||
cpu_shares = lookup(local.shares_mapping, each.value.cpu_shares, 1000)
|
||||
|
||||
memory_reservation = each.value.memory_reservation
|
||||
memory_expandable = each.value.memory_expandable
|
||||
|
||||
16
provider.tf
16
provider.tf
@ -15,15 +15,15 @@ terraform {
|
||||
|
||||
# Configure the Vault provider
|
||||
provider "vault" {
|
||||
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
|
||||
skip_tls_verify = true
|
||||
auth_login {
|
||||
path = "auth/approle/login"
|
||||
parameters = {
|
||||
role_id = var.role_id
|
||||
secret_id = var.secret_id
|
||||
}
|
||||
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
|
||||
skip_tls_verify = true
|
||||
auth_login {
|
||||
path = "auth/approle/login"
|
||||
parameters = {
|
||||
role_id = var.role_id
|
||||
secret_id = var.secret_id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# vSphere Provider
|
||||
|
||||
30
variables.tf
30
variables.tf
@ -21,15 +21,15 @@ variable "environment" {
|
||||
# Resource Groups
|
||||
variable "resource_groups" {
|
||||
type = map(object({
|
||||
name = string
|
||||
cpu_reservation = optional(number, 0)
|
||||
cpu_expandable = optional(bool, true)
|
||||
cpu_limit = optional(number, -1)
|
||||
cpu_shares = optional(string, "normal")
|
||||
memory_reservation = optional(number, 0)
|
||||
memory_expandable = optional(bool, true)
|
||||
memory_limit = optional(number, -1)
|
||||
memory_shares = optional(string, "normal")
|
||||
name = string
|
||||
cpu_reservation = optional(number, 0)
|
||||
cpu_expandable = optional(bool, true)
|
||||
cpu_limit = optional(number, -1)
|
||||
cpu_shares = optional(string, "normal")
|
||||
memory_reservation = optional(number, 0)
|
||||
memory_expandable = optional(bool, true)
|
||||
memory_limit = optional(number, -1)
|
||||
memory_shares = optional(string, "normal")
|
||||
}))
|
||||
description = "Map of resource groups to create"
|
||||
default = {
|
||||
@ -53,13 +53,13 @@ variable "resource_groups" {
|
||||
|
||||
# Vault approle
|
||||
variable "role_id" {
|
||||
description = "Role ID for Vault AppRole authentication"
|
||||
type = string
|
||||
sensitive = true
|
||||
description = "Role ID for Vault AppRole authentication"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "secret_id" {
|
||||
description = "Secret ID for Vault AppRole authentication"
|
||||
type = string
|
||||
sensitive = true
|
||||
description = "Secret ID for Vault AppRole authentication"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user