Please note: We take Terraform's security and our users' trust very seriously. If you believe you have found a security issue in the Terraform provider for SORACOM, please responsibly disclose it by contacting us at ks6088ts@gmail.com.
Documentation is available on the Terraform website: https://registry.terraform.io/providers/ks6088ts/soracom/latest/docs
-
See SORACOM CLI Getting Started Guide to create configuration profiles for SORACOM CLI. By default, the SORACOM CLI configuration file will be stored in
~/.soracom/myprofile.json
on macOS/Linux orC:\Users\<username>\.soracom\myprofile.json
on Windows. -
Create following usage example.
# Specify the version of the SORACOM Provider to use
terraform {
required_providers {
soracom = {
source = "ks6088ts/soracom"
version = "=0.0.2"
}
}
}
# Configure the SORACOM Provider
provider "soracom" {
# set your own profile
profile = "myprofile"
}
# Create resources (e.g. Create SIM group named as "my_sim_group")
resource "soracom_group" "group" {
tags = {
name = "my_sim_group"
team = "soracom"
}
}
- run the following commands to manage resources
# Initialize a new or existing Terraform working directory
terraform init
# Creates or updates infrastructure according to Terraform configuration files in the current directory.
terraform apply
# Confirm SIM group is created via SORACOM CLI
soracom groups list
[
{
"configuration": {},
"createdAt": 1666314306643,
"createdTime": 1666314306643,
"groupId": "3d3cc5f7-9924-41d6-bc5f-f5b73e6ffe05",
"lastModifiedAt": 1666314306643,
"lastModifiedTime": 1666314306643,
"operatorId": "OP0076153716",
"tags": {
"name": "my_sim_group",
"team": "soracom"
}
}
]
# Destroy Terraform-managed infrastructure.
terraform destroy
# Confirm SIM group is deleted via SORACOM CLI
soracom groups list
[]
Run the following from repository root to generate SORACOM provider in plugins
directory.
make build
All the tests are done on GitHub Actions. Please see details here: .github/workflows/test.yml.
To run tasks related to provider, see Makefile for details. For example, you can run all the tests for provider by the following command.
make ci-test
To run tasks related to HCL examples, see terraform.mk for details. For example, you can run all the tests for examples by the following command.
make -f terraform.mk ci-test-examples
To run tasks related to documents, see terraform.mk for details. For example, you can run all the tests for documents by the following command.
make -f terraform.mk ci-test-docs
- To understand what IaC is: [AWS Black Belt Online Seminar] AWS Cloud Development Kit (CDK)
- To understand what Terraform is: What is Terraform?
- To understand how to implement Terraform Custom Provider: Call APIs with Custom SDK Providers