Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rizalmf committed Aug 13, 2024
1 parent 034c3ce commit ef88b71
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is my personal idcloudhost terraform provider. It allows managing resources within compute and storage resources.


## Usage Example
## Example Usage

```hcl
# 1. Load providers
Expand Down
75 changes: 75 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# IDCloudHost Provider
This is my personal idcloudhost terraform provider. It allows managing resources within compute and storage resources.

## Example Usage

```hcl
# 1. Load providers
terraform {
required_providers {
idcloudhost = {
source = "rizalmf/idcloudhost"
version = "=1.0.0"
}
}
}
# 2. Configure the idcloudhost provider
provider "idcloudhost" {
# you can obtain by create new access as API Token on idcloudhost dashboard
apikey="XXXXXXXXXXXXXXXXX"
}
# 3. Create s3 bucket storage
# changable field:
# - billing_account_id
resource "idcloudhost_s3" "mybucket" {
name = "mybucket"
billing_account_id = 000000
}
# 4. Create a VPC network
# changable field:
# - name
resource "idcloudhost_private_network" "myprivatenetwork" {
# network_uuid = <Computed>
name = "mynetwork"
}
# 5. Create Floating IP
# changable field:
# - name
# - billing_account_id
resource "idcloudhost_float_ip" "myfloatip" {
# address = <Computed>
name = "myfloatnetwork"
billing_account_id = 000000
}
# 6. Create vm
# changable field:
# - name
# - ram
# - vcpu
# - disks
# - float_ip_address
resource "idcloudhost_vm" "myvm" {
# uuid = <Computed>
# disks_uuid = <Computed>
name = "myvm"
billing_account_id = 000000
username = "myusername"
password = "mypassword"
os_name = "ubuntu"
os_version = "22.04"
vcpu = 2
ram = 2048 #mb
disks = 20 #gb
# bind existing private network
private_network_uuid = idcloudhost_private_network.myprivatenetwork.network_uuid
# (optional) assign to floating ip network. if not, vm doesnt have public ip
float_ip_address = idcloudhost_float_ip.myfloatip.address
}
```

0 comments on commit ef88b71

Please sign in to comment.