This asset consists of a VPC, subnet, a virtual server with an IOT application installed and the IBM Cloud IOT service.
-
Account must be enabled to access VPC Infrastructure.
-
Prior to runing the terraform, you should set up the IoT Platform components. You will need to create the service, register the device and application, install the IOT starter applicaion on an android device that can communicate with the IoT platform service via the internet and create the Application API key and token. See the steps below.
-
Complete the IBM Cloud Terraform tutorial your desktop environment will be ready to run this example
-
Use the Dockerfile from the IBM Cloud Terraform provider repository.
-
Build IBM Cloud terraform docker container using the steps in the Tutorial noted above.
- docker build -t="terraform-vpc-ibm-docker" . --no-cache
- docker run -it terraform-vpc-ibm-docker /bin/bash
-
Deploy VPC and IoT application
- Change directory to the folder containing the terraform - ./infrastructure-code.
- Review the terraform files (main and variables) in that folder.
- Edit the variable.tf and add your values for the variables.
- Run Terraform (init, plan, apply).
- Refer to the tutorial for instructions.
- Set up the IoT service and mobile application using steps in the IoT guide
-
Test by installing and using the mobile application on your device as noted in the IoT guide
-
Enjoy!