Skip to content

Commit

Permalink
update examples (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
code-lucidal58 authored Dec 21, 2020
1 parent f1add94 commit 4a83c3f
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 3 deletions.
15 changes: 12 additions & 3 deletions examples/server_configurations/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "0.1.2"
}
}
}

provider "intersight" {
apikey = var.api_key
secretkeyfile = "changeMe"
endpoint = "changeMe"
apikey = var.api_key
secretkeyfile = var.secretkey_file
endpoint = var.endpoint
}
2 changes: 2 additions & 0 deletions examples/server_configurations/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
api_key = "changeMe"
secret_key = "changeMe"
endpoint = "changeMe"

// ipmi over lay policy props
encryption_key = "changeMe"
Expand Down
10 changes: 10 additions & 0 deletions examples/server_configurations/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ variable "api_key" {
description = "API Key Id from Intersight"
}

variable "secretkey_file" {
type = string
description = "Secret Key File Path"
}

variable "endpoint" {
type = string
description = "Endpoint URL"
}

variable "encryption_key" {
type = string
description = "Encryption key for IPMIOverLan Policy"
Expand Down
21 changes: 21 additions & 0 deletions examples/server_deployment/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "0.1.2"
}
}
}

provider "intersight" {
apikey = var.api_key
secretkeyfile = var.secretkey_file
endpoint = var.endpoint
}

//terraform import intersight_server_profile.server1 <moid>

resource "intersight_server_profile" "server1" {
name="server1"
action="Deploy"
}
39 changes: 39 additions & 0 deletions examples/server_deployment/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
variable "api_key" {
type = string
description = "API Key Id from Intersight"
}

variable "secretkey_file" {
type = string
description = "Secret Key File Path"
}

variable "endpoint" {
type = string
description = "Endpoint URL"
}

variable "encryption_key" {
type = string
description = "Encryption key for IPMIOverLan Policy"
}

variable "auth_password" {
type = string
description = "Auth Password for SNMP Policy"
}

variable "privacy_password" {
type = string
description = "Privacy Password for SNMP Policy"
}

variable "base_properties_password_1" {
type = string
description = "Password field in Base properties in LDAP policy"
}

variable "organization" {
type = string
description = "Organization moid"
}

0 comments on commit 4a83c3f

Please sign in to comment.