Skip to content

Commit

Permalink
Reformatted tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaweitao001 committed Aug 4, 2022
1 parent 2bafc11 commit d0e6d02
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
7 changes: 7 additions & 0 deletions internal/services/orbital/spacecraft_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ resource "azurerm_spacecraft" "test" {
resource_group_name = azurerm_resource_group.test.name
location = "westus"
norad_id = "12345"
links {
bandwidth_mhz = 100
center_frequency_mhz = 101
direction = "Uplink"
polarization = "LHCP"
name = "linkname"
}
tle_line_1 = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
tle_line_2 = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"
title_line = "AQUA"
Expand All @@ -117,13 +119,15 @@ resource "azurerm_spacecraft" "test" {
resource_group_name = azurerm_resource_group.test.name
location = "eastus"
norad_id = "23456"
links {
bandwidth_mhz = 100
center_frequency_mhz = 101
direction = "Uplink"
polarization = "LHCP"
name = "linkname"
}
tle_line_1 = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
tle_line_2 = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"
title_line = "AQUB"
Expand All @@ -141,16 +145,19 @@ resource "azurerm_spacecraft" "test" {
resource_group_name = azurerm_resource_group.test.name
location = "eastus"
norad_id = "12345"
links {
bandwidth_mhz = 100
center_frequency_mhz = 101
direction = "Uplink"
polarization = "LHCP"
name = "linkname"
}
tle_line_1 = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
tle_line_2 = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"
title_line = "AQUA"
tags = {
aks-managed-cluster-name = "9a57225d-a405-4d40-aa46-f13d2342abef"
}
Expand Down
22 changes: 14 additions & 8 deletions website/docs/r/spacecraft.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ resource "azurerm_spacecraft" "example" {
resource_group_name = azurerm_resource_group.test.name
location = "westeurope"
norad_id = "12345"
links {
bandwidth_mhz = 100
center_frequency_mhz = 101
direction = "Uplink"
polarization = "LHCP"
name = "examplename"
}
tle_line_1 = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
tle_line_2 = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"
title_line = "AQUA"
Expand Down Expand Up @@ -67,27 +69,31 @@ The following arguments are supported:

---

* `tle_line_1` - (Optional) The name of the field in output events used to specify the primary key which insert or update operations are based on.
* `tle_line_1` - (Optional) Line 1 of the two line elements(TLE).

* `tle_line_2` - (Optional) Line 2 of the two line elements(TLE).

* `title_line` - (Optional) Title of the two line elements(TLE).

## Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

* `id` - The ID of the Stream Analytics Output for CosmosDB.
* `id` - The ID of the Spacecraft.

## Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:

* `create` - (Defaults to 30 minutes) Used when creating the Stream Analytics Output for CosmosDB.
* `read` - (Defaults to 5 minutes) Used when retrieving the Stream Analytics Output for CosmosDB.
* `update` - (Defaults to 30 minutes) Used when updating the Stream Analytics Output for CosmosDB.
* `delete` - (Defaults to 30 minutes) Used when deleting the Stream Analytics Output for CosmosDB.
* `create` - (Defaults to 30 minutes) Used when creating the Spacecraft.
* `read` - (Defaults to 5 minutes) Used when retrieving the Spacecraft.
* `update` - (Defaults to 30 minutes) Used when updating the Spacecraft.
* `delete` - (Defaults to 30 minutes) Used when deleting the Spacecraft.

## Import

Stream Analytics Outputs for CosmosDB can be imported using the `resource id`, e.g.
Spacecraft can be imported using the `resource id`, e.g.

```shell
terraform import azurerm_stream_analytics_output_cosmosdb.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingjobs/job1/outputs/output1
terraform import azurerm_spacecraft.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Orbital/spacecrafts/spacecraft1
```

0 comments on commit d0e6d02

Please sign in to comment.