You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
# SSH key template
2
2
3
-
An [IBM Cloud Schematics](https://console.bluemix.net/docs/services/schematics/index.html) template that creates an [IBM Cloud SSH Key](https://ibm-bluemix.github.io/tf-ibm-docs/v0.4.0/r/compute_ssh_key.html) (`ibm_compute_ssh_key`). This template creates am SSH key in the specified IBM Cloud account. This is not a module, it is a Terraform configuration that should be cloned or forked to be used.
3
+
An [IBM Cloud Schematics](https://cloud.ibm.com/docs/services/schematics/) template that creates an [IBM Cloud SSH Key](https://ibm-cloud.github.io/tf-ibm-docs/v0.17.3/r/compute_ssh_key.html) (`ibm_compute_ssh_key`). This template creates am SSH key in the specified IBM Cloud account. This is not a module, it is a Terraform configuration that should be cloned or forked to be used.
4
4
5
-
Schematics uses [Terraform](https://www.terraform.io/) as the infrastructure as code engine. With this template, you can provision and manage infrastructure as a single unit. **Note**: To create the resources that this template requests, your [IBM Cloud Infrastructure (Softlayer) account](https://console.bluemix.net/docs/iam/mnginfra.html#managing-infrastructure-access) and [IBM Cloud account](https://console.bluemix.net/docs/iam/mngiam.html#iammanidaccser) must have sufficient permissions.
5
+
Schematics uses [Terraform](https://www.terraform.io/) as the infrastructure as code engine. With this template, you can provision and manage infrastructure as a single unit. **Note**: To create the resources that this template requests, your [IBM Cloud Infrastructure (Softlayer) account](https://cloud.ibm.com/docs/iam?topic=iam-mngclassicinfra#managing-infrastructure-access) and [IBM Cloud account](https://cloud.ibm.com/docs/iam?topic=iam-iammanidaccser#iammanidaccser) must have sufficient permissions.
6
6
7
-
See the [Terraform provider docs](https://ibm-bluemix.github.io/tf-ibm-docs/) for available resources for the IBM Cloud.
7
+
See the [Terraform provider docs](https://ibm-cloud.github.io/tf-ibm-docs/) for available resources for the IBM Cloud.
8
8
9
9
**This configuration template is written for IBM Cloud provider version `v0.4.0`**
10
10
11
11
## Create an environment with this template
12
12
13
13
Environments can be used to separate software components into development tiers (e.g. staging, QA, and production).
14
14
15
-
1. In IBM Cloud, go to the menu and select the [Schematics dashboard](https://console.bluemix.net/schematics).
15
+
1. In IBM Cloud, go to the menu and select the [Schematics dashboard](https://cloud.ibm.com/schematics).
16
16
2. In the left navigation menu, select **Templates** to access the template catalog.
17
17
3. Click **Create** on the SSH key template. You are taken to a configuration page where you can define metadata about your environment.
18
18
4. Define values for your variables according to the following table.
@@ -21,8 +21,8 @@ Environments can be used to separate software components into development tiers
21
21
22
22
|Variable Name|Description|Default Value|
23
23
|-------------|-----------|-------------|
24
-
|bxapikey|Your IBM Cloud API key. You can get the value by running `bx iam api-key-create <key name>`.||
25
-
|datacenter|The data center for the SSH key. You can run `bluemix cs locations` to see a list of all data centers in your region.||
24
+
|icapikey|Your IBM Cloud API key. You can get the value by running `ic iam api-key-create <key name>`.||
25
+
|datacenter|The data center for the SSH key. You can run `ic cs zones` to see a list of all data centers in your region.||
26
26
|key_label|An identifying label to assign to the SSH key.||
27
27
|key_note|Notes to store with the SSH key. ||
28
28
|public_key|The public key contents for the SSH keypair. ||
@@ -34,7 +34,7 @@ Environments can be used to separate software components into development tiers
34
34
After setting up your environment with this template, you can run **Plan** to preview how Schematics will deploy resources to your environment. When you are ready to deploy the cluster, run **Apply**.
35
35
36
36
## Using the Terraform binary on your local workstation
37
-
You will need to [set up up IBM Cloud provider credentials](#setting-up-provider-credentials) on your local machine. Then you will need the [Terraform binary](https://www.terraform.io/intro/getting-started/install.html) and the [IBM Cloud Provider Plugin](https://github.com/IBM-Bluemix/terraform/releases). Then follow the instructions at [https://ibm-bluemix.github.io/tf-ibm-docs/v0.4.0/#developing-locally](https://ibm-bluemix.github.io/tf-ibm-docs/v0.4.0/#developing-locally).
37
+
You will need to [set up up IBM Cloud provider credentials](#setting-up-provider-credentials) on your local machine. Then you will need the [Terraform binary](https://www.terraform.io/intro/getting-started/install.html) and the [IBM Cloud Provider Plugin](https://github.com/IBM-Cloud/terraform-provider-ibm/releases/). Then follow the instructions at [https://github.com/IBM-Cloud/terraform-provider-ibm.git](https://github.com/IBM-Cloud/terraform-provider-ibm.git).
38
38
39
39
To run this project locally, complete the following steps:
40
40
@@ -44,11 +44,11 @@ To run this project locally, complete the following steps:
44
44
-`terraform plan`: This command performs a dry run to show what infrastructure Terraform intends to create.
45
45
-`terraform apply`: This command creates actual infrastructure.
46
46
- Infrastructure can be seen in IBM Cloud under the following URLs:
-`terraform destroy`: This command destroy all infrastructure that has been created.
49
49
50
50
### Available data centers
51
-
You can run `bluemix cs locations` to see a list of all data centers in your region.
51
+
You can run `ic cs zones` to see a list of all data centers in your region.
52
52
53
53
### Running in multiple data centers
54
54
You can run `terraform plan -var 'datacenter=lon02' -state=lon02.tfstate` or whatever your preferred data center is (replace `lon02` for both arguments), and repeat for `terraform apply` with the same arguments.
@@ -59,15 +59,15 @@ To set up the IBM Cloud provider to work with this example there are a few optio
59
59
### Exporting environment variables using IBMid credentials
60
60
You'll need to export the following environment variables:
61
61
62
-
-`TF_VAR_bxapikey` - Your IBM Cloud API Key
63
-
-`TF_VAR_slusername` - Your IBM Cloud Infrastructure (SoftLayer) username
64
-
-`TF_VAR_slapikey` - Your IBM Cloud Infrastructure user name.
62
+
-`IC_API_KEY` - Your IBM Cloud API Key
63
+
-`SL_USERNAME` - Your IBM Cloud Infrastructure (SoftLayer) username
64
+
-`SL_API_KEY` - Your IBM Cloud Infrastructure user name.
65
65
66
66
On OS X, you can enter the following commands into your terminal:
67
67
68
-
-`export TF_VAR_bxapikey=<value>`
69
-
-`export TF_VAR_slusername=<value>`
70
-
-`export TF_VAR_slapikey=<value>`
68
+
-`export IC_API_KEY=<value>`
69
+
-`export SL_USERNAME=<value>`
70
+
-`export SL_API_KEY=<value>`
71
71
72
72
This is only temporary to your current terminal session. To make this permanent, add these export statements to your `~/.profile`, `~/.bashrc`, `~/.bash_profile` or preferred terminal configuration file. If you go this route without running `export ...` in your command prompt, you'll need to source your terminal configuration file from the command prompt like so: `source ~/.bashrc` (or your preferred config file).
0 commit comments