locals {
prefix = random_string.prefix.result
tags = [
"provider:ibm",
"workspace:${terraform.workspace}",
"owner:${var.owner}"
]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer | |
from prettytable import PrettyTable | |
import click | |
from datetime import datetime | |
from rich.console import Console | |
from rich.table import Column, Table | |
class VSIExample(): | |
def __init__(self): | |
client = SoftLayer.Client() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer | |
from prettytable import PrettyTable | |
import click | |
class LBaasExample(): | |
def __init__(self): | |
client = SoftLayer.Client() | |
self.lbaas_service = client['Network_LBaaS_LoadBalancer'] | |
def get_list(self, dc=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[ryan@europa] - [~/Desktop/ibmcloud-icd-mysql] - [Tue Jul 18, 10:10] | |
└─[$] <> export TF_LOG=DEBUG | |
┌─[ryan@europa] - [~/Desktop/ibmcloud-icd-mysql] - [Tue Jul 18, 10:11] | |
└─[$] <> terraform apply | |
2023-07-18T10:11:18.531-0500 [INFO] Terraform version: 1.5.3 | |
2023-07-18T10:11:18.531-0500 [DEBUG] using github.com/hashicorp/go-tfe v1.26.0 | |
2023-07-18T10:11:18.531-0500 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2 | |
2023-07-18T10:11:18.531-0500 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0 | |
2023-07-18T10:11:18.531-0500 [DEBUG] using github.com/zclconf/go-cty v1.12.2 | |
2023-07-18T10:11:18.531-0500 [INFO] Go runtime version: go1.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: Strict-Transport-Security: max-age=63072000; includeSubDomains | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Content-Type-Options: nosniff | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Download-Options: noopen | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Envoy-Upstream-Service-Time: 1038 | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Permitted-Cross-Domain-Policies: none | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Request-Id: d1b0443a-82fd-4a11-ba59-afa650267ba5 | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Runtime: 1.034365 | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: X-Xss-Protection: 1; mode=block | |
2023-07-18T10:01:06.313-0500 [DEBUG] provider.terraform-provider-ibm_v1.55.0: | |
2023-07-18T10:01:06. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNAME:= $(shell uname) | |
ifeq ($(UNAME),Darwin) | |
OS_X := true | |
SHELL := /bin/zsh | |
else | |
OS_DEB := true | |
SHELL := /bin/bash | |
endif | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "ibm_compute_bare_metal" "monthly_bm1" { | |
package_key_name = "DUAL_INTEL_XEON_PROC_CASCADE_LAKE_SCALABLE_FAMILY_12_DRIVES" | |
process_key_name = "INTEL_INTEL_XEON_8260_2_40" | |
memory = 384 | |
os_key_name = "OS_VMWARE_SERVER_VIRTUALIZATION_7_0_UPDATE_3I_UEFI" | |
hostname = var.prefix | |
domain = "example.com | |
datacenter = var.datacenter | |
network_speed = 10000 | |
public_bandwidth = 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import time | |
from logdna import LogDNAHandler | |
import logging | |
from ibm_cloud_sdk_core import ApiException | |
from ibm_schematics.schematics_v1 import SchematicsV1 | |
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator | |
import SoftLayer | |
from SoftLayer import HardwareManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "resource_group" { | |
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-resource-group.git?ref=v1.0.5" | |
resource_group_name = var.existing_resource_group == null ? "${local.prefix}-resource-group" : null | |
existing_resource_group_name = var.existing_resource_group | |
} | |
resource "random_string" "prefix" { | |
length = 4 | |
special = false | |
upper = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "deployment" { | |
description = "Deployment options to use based on var.os. This also determines the Datacenter and VLANs." | |
type = map(object({ | |
os_reference_code = string | |
name = string | |
user_metadata = string | |
})) | |
default = { | |
windows = { | |
os_reference_code = "OS_WINDOWS_2022_FULL_STD_64_BIT" |
NewerOlder