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" {
|
data "vault_generic_secret" "vmware" {
|
||||||
path = "secret/vmware"
|
path = "secret/vmware"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "vsphere_datacenter" "dc" {
|
data "vsphere_datacenter" "dc" {
|
||||||
|
|||||||
8
main.tf
8
main.tf
@ -12,10 +12,10 @@ resource "vsphere_resource_pool" "resource_groups" {
|
|||||||
name = each.value.name
|
name = each.value.name
|
||||||
parent_resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
|
parent_resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id
|
||||||
|
|
||||||
cpu_reservation = each.value.cpu_reservation
|
cpu_reservation = each.value.cpu_reservation
|
||||||
cpu_expandable = each.value.cpu_expandable
|
cpu_expandable = each.value.cpu_expandable
|
||||||
cpu_limit = each.value.cpu_limit
|
cpu_limit = each.value.cpu_limit
|
||||||
cpu_shares = lookup(local.shares_mapping, each.value.cpu_shares, 1000)
|
cpu_shares = lookup(local.shares_mapping, each.value.cpu_shares, 1000)
|
||||||
|
|
||||||
memory_reservation = each.value.memory_reservation
|
memory_reservation = each.value.memory_reservation
|
||||||
memory_expandable = each.value.memory_expandable
|
memory_expandable = each.value.memory_expandable
|
||||||
|
|||||||
16
provider.tf
16
provider.tf
@ -15,15 +15,15 @@ terraform {
|
|||||||
|
|
||||||
# Configure the Vault provider
|
# Configure the Vault provider
|
||||||
provider "vault" {
|
provider "vault" {
|
||||||
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
|
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
|
||||||
skip_tls_verify = true
|
skip_tls_verify = true
|
||||||
auth_login {
|
auth_login {
|
||||||
path = "auth/approle/login"
|
path = "auth/approle/login"
|
||||||
parameters = {
|
parameters = {
|
||||||
role_id = var.role_id
|
role_id = var.role_id
|
||||||
secret_id = var.secret_id
|
secret_id = var.secret_id
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# vSphere Provider
|
# vSphere Provider
|
||||||
|
|||||||
30
variables.tf
30
variables.tf
@ -21,15 +21,15 @@ variable "environment" {
|
|||||||
# Resource Groups
|
# Resource Groups
|
||||||
variable "resource_groups" {
|
variable "resource_groups" {
|
||||||
type = map(object({
|
type = map(object({
|
||||||
name = string
|
name = string
|
||||||
cpu_reservation = optional(number, 0)
|
cpu_reservation = optional(number, 0)
|
||||||
cpu_expandable = optional(bool, true)
|
cpu_expandable = optional(bool, true)
|
||||||
cpu_limit = optional(number, -1)
|
cpu_limit = optional(number, -1)
|
||||||
cpu_shares = optional(string, "normal")
|
cpu_shares = optional(string, "normal")
|
||||||
memory_reservation = optional(number, 0)
|
memory_reservation = optional(number, 0)
|
||||||
memory_expandable = optional(bool, true)
|
memory_expandable = optional(bool, true)
|
||||||
memory_limit = optional(number, -1)
|
memory_limit = optional(number, -1)
|
||||||
memory_shares = optional(string, "normal")
|
memory_shares = optional(string, "normal")
|
||||||
}))
|
}))
|
||||||
description = "Map of resource groups to create"
|
description = "Map of resource groups to create"
|
||||||
default = {
|
default = {
|
||||||
@ -53,13 +53,13 @@ variable "resource_groups" {
|
|||||||
|
|
||||||
# Vault approle
|
# Vault approle
|
||||||
variable "role_id" {
|
variable "role_id" {
|
||||||
description = "Role ID for Vault AppRole authentication"
|
description = "Role ID for Vault AppRole authentication"
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "secret_id" {
|
variable "secret_id" {
|
||||||
description = "Secret ID for Vault AppRole authentication"
|
description = "Secret ID for Vault AppRole authentication"
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user