-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ibm): add IBM Cloud snippets (#39)
- Loading branch information
1 parent
75e01aa
commit 5ed3446
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"ibmcloud": { | ||
"prefix": "tf-ibm_provider", | ||
"description": "define IBM Cloud provider.", | ||
"body": [ | ||
"provider \"ibm\" {", | ||
" bluemix_api_key = \"\\${var.ibm_bmx_api_key}\"", | ||
" softlayer_username = \"\\${var.ibm_sl_username}\"", | ||
" softlayer_api_key = \"\\${var.ibm_sl_api_key}\"", | ||
"}" | ||
] | ||
}, | ||
"ibm_compute_ssh_key": { | ||
"prefix": "tf-ibm_compute_ssh_key", | ||
"description": "create IBM Cloud infranstructure SSH key resource.", | ||
"body": [ | ||
"resource \"ibm_compute_ssh_key\" \"${myResourceName}\" {", | ||
" label = \"${myResourceName}\"", | ||
" public_key = \"${var.ssh_public_key}\"", | ||
"}" | ||
] | ||
}, | ||
"ibm_compute_vm_instance": { | ||
"prefix": "tf-ibm_compute_vm_instance", | ||
"description": "Create virtual server with SSH key.", | ||
"body": [ | ||
"resource \"ibm_compute_vm_instance\" \"${myResourceName}\" {", | ||
" name = \"my-${myResourceName}\"", | ||
" domain = \"example.com\"", | ||
" image = \"DEBIAN_7_64\"", | ||
" region = \"ams01\"", | ||
" public_network_speed = 10", | ||
" hourly_billing = true", | ||
" private_network_only = false", | ||
" cpu = 1", | ||
" ram = 1024", | ||
" disks = [25, 10, 20]", | ||
" local_disk = false", | ||
"}" | ||
] | ||
} | ||
} |