Skip to content

Commit 31bfc1a

Browse files
docs: update readme
1 parent c9635dc commit 31bfc1a

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

README.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
CloudStack Terraform Provider
2-
=============================
1+
# CloudStack Terraform Provider
32

4-
Requirements
5-
------------
3+
## Requirements
64

7-
- [Terraform](https://www.terraform.io/downloads.html) 1.0.x
8-
- [Go](https://golang.org/doc/install) 1.20+ (to build the provider plugin)
5+
- [Terraform](https://www.terraform.io/downloads.html) 1.0.x
6+
- [Go](https://golang.org/doc/install) 1.20+ (to build the provider plugin)
97

108
See wiki: https://github.com/apache/cloudstack-terraform-provider/wiki
119

12-
Installing from Github Release
13-
------------------------------
10+
## Installing from Github Release
1411

1512
User can install the CloudStack Terraform Provider using the [Github Releases](https://github.com/apache/cloudstack-terraform-provider/releases) with the installation steps below.
1613

@@ -59,9 +56,10 @@ provider "cloudstack" {
5956

6057
Note: this can be used when users are not able to install using the Terraform registry.
6158

62-
Installing from Terrafrom registry
63-
----------------------------------
59+
## Installing from Terrafrom registry
60+
6461
To install the CloudStack provider, copy and paste the below code into your Terraform configuration. Then, run terraform init.
62+
6563
```sh
6664
terraform {
6765
required_providers {
@@ -79,15 +77,13 @@ provider "cloudstack" {
7977

8078
User hitting installation issue using registry can install using the local install method.
8179

82-
Documentation
83-
-------------
80+
## Documentation
8481

8582
For more details on how to use the provider, click [here](website/) or visit https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs
8683

87-
Developing the Provider
88-
---------------------------
84+
## Developing the Provider
8985

90-
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.16+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
86+
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.16+ is _required_). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
9187

9288
Clone repository to: `$GOPATH/src/github.com/apache/cloudstack-terraform-provider`
9389

@@ -105,6 +101,7 @@ $ cd $GOPATH/src/github.com/apache/cloudstack-terraform-provider
105101
$ make build
106102
$ ls $GOPATH/bin/terraform-provider-cloudstack
107103
```
104+
108105
Once the build is ready, you have to copy the binary into Terraform locally (version appended).
109106

110107
On Linux and Mac this path is at ~/.terraform.d/plugins,
@@ -116,8 +113,7 @@ $ mkdir -p ~/.terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_a
116113
$ cp $GOPATH/bin/terraform-provider-cloudstack ~/.terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64
117114
```
118115

119-
Testing the Provider
120-
--------------------
116+
## Testing the Provider
121117

122118
In order to test the provider, you can simply run `make test`.
123119

@@ -132,13 +128,13 @@ docker pull apache/cloudstack-simulator
132128

133129
or pull it with a particular build tag
134130

135-
docker pull apache/cloudstack-simulator:4.17.2.0
131+
docker pull apache/cloudstack-simulator:4.19.0.0
136132

137133
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator
138134

139135
or
140136

141-
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.17.2.0
137+
docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.19.0.0
142138
```
143139

144140
When Docker started the container you can go to http://localhost:8080/client and login to the CloudStack UI as user `admin` with password `password`. It can take a few minutes for the container is fully ready, so you probably need to wait and refresh the page for a few minutes before the login page is shown.
@@ -163,8 +159,8 @@ In order for all the tests to pass, you will need to create a new (empty) projec
163159
$ make testacc
164160
```
165161

166-
Sample Terraform configuration when testing locally
167-
------------------------------------------------------------
162+
## Sample Terraform configuration when testing locally
163+
168164
Below is an example configuration to initialize provider and create a Virtual Machine instance
169165

170166
```sh
@@ -180,9 +176,9 @@ terraform {
180176

181177
provider "cloudstack" {
182178
# Configuration options
183-
api_url = "${var.cloudstack_api_url}"
184-
api_key = "${var.cloudstack_api_key}"
185-
secret_key = "${var.cloudstack_secret_key}"
179+
api_url = var.cloudstack_api_url
180+
api_key = var.cloudstack_api_key
181+
secret_key = var.cloudstack_secret_key
186182
}
187183

188184
resource "cloudstack_instance" "web" {
@@ -193,6 +189,7 @@ resource "cloudstack_instance" "web" {
193189
zone = "2b61ed5d-e8bd-431d-bf52-d127655dffab"
194190
}
195191
```
192+
196193
## History
197194

198195
This codebase relicensed under APLv2 and donated to the Apache CloudStack

0 commit comments

Comments
 (0)