Skip to content

Commit 567f8ab

Browse files
authored
Adding documentation for new data sources added to cloudstack-terraform-proivder (#45)
* add documentation for instance data source * add documentation for ipaddress data source * add documentation for network offering data source * add documentation for service offering data source * add documentation for ssh keypair data source * add documentation for user data source * add documentation for volume data source * add documentation for vpc data source * add documentation for vpn connection data source * add documentation for zone data source * fix typos in documentation
1 parent 61f86a9 commit 567f8ab

11 files changed

+364
-1
lines changed

website/docs/d/instance.html.markdown

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_instance"
4+
sidebar_current: "docs-cloudstack-datasource-instance"
5+
description: |-
6+
Gets informations about cloudstack instance.
7+
---
8+
9+
# cloudstack_instance
10+
11+
Use this datasource to get information about an instance for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_instance" "my_instance" {
17+
filter {
18+
name = "name"
19+
value = "server-a"
20+
}
21+
22+
nic {
23+
ip_address="10.1.1.37"
24+
}
25+
```
26+
27+
### Argument Reference
28+
29+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
30+
31+
## Attributes Reference
32+
33+
The following attributes are exported:
34+
35+
* `instance_id` - The ID of the virtual machine.
36+
* `account` - The account associated with the virtual machine.
37+
* `display_name` - The user generated name. The name of the virtual machine is returned if no displayname exists.
38+
* `state` - The state of the virtual machine.
39+
* `host_id` - The ID of the host for the virtual machine.
40+
* `zone_id` - The ID of the availablility zone for the virtual machine.
41+
* `created` - The date when this virtual machine was created.
42+
* `nic` - The list of nics associated with vm.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_ipaddress"
4+
sidebar_current: "docs-cloudstack-cloudstack_ipaddress"
5+
description: |-
6+
Gets information about cloudstack ipaddress.
7+
---
8+
9+
# cloudstack_ipaddress
10+
11+
Use this datasource to get information about a public ipaddress for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_ipaddress" "ipaddress-data-source"{
17+
filter{
18+
name = "zone_name"
19+
value= "DC"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `is_portable` - Is public IP portable across the zones.
33+
* `network_id` - The ID of the Network where ip belongs to.
34+
* `vpc_id` - VPC id the ip belongs to.
35+
* `zone_name` - The name of the zone the public IP address belongs to.
36+
* `project` - The project name of the address.
37+
* `ip_address` - Public IP address.
38+
* `is_source_nat` - True if the IP address is a source nat address, false otherwise.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_network_offerings"
4+
sidebar_current: "docs-cloudstack-cloudstack_network_offering"
5+
description: |-
6+
Gets information about cloudstack network offering.
7+
---
8+
9+
# cloudstack_network_offering
10+
11+
Use this datasource to get information about a network offering for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_network_offering" "net-off-data-source"{
17+
filter{
18+
name = "name"
19+
value="TestNetworkDisplay12"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `name` - The name of the network offering.
33+
* `display_text` - An alternate display text of the network offering.
34+
* `guest_ip_type` - Guest type of the network offering, can be Shared or Isolated.
35+
* `traffic_type` - The traffic type for the network offering, supported types are Public, Management, Control, Guest, Vlan or Storage.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_service_offering"
4+
sidebar_current: "docs-cloudstack-cloudstack_service_offering"
5+
description: |-
6+
Gets information about cloudstack service offering.
7+
---
8+
9+
# cloudstack_service_offering
10+
11+
Use this datasource to get information about a service offering for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_service_offering" "service-offering-data-source"{
17+
filter{
18+
name = "name"
19+
value = "TestServiceUpdate"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `name` - The name of the service offering.
33+
* `display_text` - An alternate display text of the service offering.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_ssh_keypair"
4+
sidebar_current: "docs-cloudstack-cloudstack_ssh_keypair"
5+
description: |-
6+
Gets information about cloudstack ssh keypair.
7+
---
8+
9+
# cloudstack_ssh_keypair
10+
11+
Use this datasource to get information about a ssh keypair for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_ssh_keypair" "ssh-keypair-data" {
17+
filter {
18+
name = "name"
19+
value = "myKey"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `name` - Name of the keypair.
33+
* `fingerprint` - Fingerprint of the public key.

website/docs/d/template.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: "cloudstack"
33
page_title: "Cloudstack: cloudstack_template"
44
sidebar_current: "docs-cloudstack-datasource-template"
55
description: |-
6-
Get informations on a Cloudstack template.
6+
Gets information about Cloudstack template.
77
---
88

99
# cloudstack_template

website/docs/d/user.html.markdown

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_user"
4+
sidebar_current: "docs-cloudstack-cloudstack_user"
5+
description: |-
6+
Gets information about cloudstack user.
7+
---
8+
9+
# cloudstack_user
10+
11+
Use this datasource to get information about a cloudstack user for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_user" "user-data-source"{
17+
filter{
18+
name = "first_name"
19+
value= "jon"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `account` - The account name of the userg.
33+
* `email` - The user email address.
34+
* `first_name` - The user firstname.
35+
* `last_name` - The user lastname.
36+
* `username` - The user name

website/docs/d/volume.html.markdown

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_volume"
4+
sidebar_current: "docs-cloudstack-cloudstack_volume"
5+
description: |-
6+
Gets information about cloudstack volume.
7+
---
8+
9+
# cloudstack_volume
10+
11+
Use this datasource to get information about a volume for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_volume" "volume-data-source"{
17+
filter{
18+
name = "name"
19+
value="TestVolume"
20+
}
21+
}
22+
```
23+
24+
### Argument Reference
25+
26+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
27+
28+
## Attributes Reference
29+
30+
The following attributes are exported:
31+
32+
* `name` - Name of the disk volume.
33+
* `disk_offering_id` - ID of the disk offering.
34+
* `zone_id` - ID of the availability zone.

website/docs/d/vpc.html.markdown

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_vpc"
4+
sidebar_current: "docs-cloudstack-cloudstack_vpc"
5+
description: |-
6+
Gets information about cloudstack vpc.
7+
---
8+
9+
# cloudstack_vpc
10+
11+
Use this datasource to get information about a vpc for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_vpc" "vpc-data-source"{
17+
filter{
18+
name = "name"
19+
value= "test-vpc"
20+
}
21+
filter{
22+
name = "cidr"
23+
value= "10.0.0.0/16"
24+
}
25+
```
26+
27+
### Argument Reference
28+
29+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
30+
31+
## Attributes Reference
32+
33+
The following attributes are exported:
34+
35+
* `name` - The name of the VPC.
36+
* `display_text` - An alternate display text of the VPC.
37+
* `cidr` - The cidr the VPC.
38+
* `vpc_offering_name` - Vpc offering name the VPC is created from.
39+
* `network_domain` - The network domain of the VPC.
40+
* `project` - The project name of the VPC.
41+
* `zone_name` - The name of the zone the VPC belongs to.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: "cloudstack"
3+
page_title: "Cloudstack: cloudstack_vpn_connection"
4+
sidebar_current: "docs-cloudstack-cloudstack_vpn_connection"
5+
description: |-
6+
Gets information about cloudstack vpn connection.
7+
---
8+
9+
# cloudstack_vpn_connection
10+
11+
Use this datasource to get information about a vpn connection for use in other resources.
12+
13+
### Example Usage
14+
15+
```hcl
16+
data "cloudstack_vpc" "vpc-data-source"{
17+
filter{
18+
name = "name"
19+
value= "test-vpc"
20+
}
21+
filter{
22+
name = "cidr"
23+
value= "10.0.0.0/16"
24+
}
25+
```
26+
27+
### Argument Reference
28+
29+
* `filter` - (Required) One or more name/value pairs to filter off of. You can apply filters on any exported attributes.
30+
31+
## Attributes Reference
32+
33+
The following attributes are exported:
34+
35+
* `s2s_customer_gateway_id` - The customer gateway ID.
36+
* `s2s_vpn_gateway_id` - The vpn gateway ID.

0 commit comments

Comments
 (0)