Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Resource: azurerm_orbital_spacecraft #17860

Merged
merged 9 commits into from
Sep 6, 2022

Conversation

jiaweitao001
Copy link
Contributor

  • All tests passed.
=== RUN   TestAccSpacecraft_basic
=== PAUSE TestAccSpacecraft_basic
=== RUN   TestAccSpacecraft_update
=== PAUSE TestAccSpacecraft_update
=== RUN   TestAccSpacecraft_complete
=== PAUSE TestAccSpacecraft_complete
=== CONT  TestAccSpacecraft_basic
=== CONT  TestAccSpacecraft_complete
=== CONT  TestAccSpacecraft_update
--- PASS: TestAccSpacecraft_basic (224.78s)
--- PASS: TestAccSpacecraft_complete (226.36s)
--- PASS: TestAccSpacecraft_update (314.83s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/orbital       331.335s

Comment on lines 143 to 147
norad_id = "12345"
links {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests should be formatted to be readable:

Suggested change
norad_id = "12345"
links {
norad_id = "12345"
links {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will reformat.

Comment on lines 150 to 158
}
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 = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
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 = {
}
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 = {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will reformat.

Comment on lines 25 to 38
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"
tags = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and same for the docs example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will reformat.

Comment on lines 33 to 36
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just make this a ordered list?

Suggested change
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"
tle[0] = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
tle[1] = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 fields are parameters of a spacecraft's orbit, and there will be only 2 lines, the combination of them can point to a certain spacecraft. Making them a list could confuse the user a little bit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think theres a a reason to not make this a type list? as it would be more versatile and allow users to n pass-around an array vs 2 separate strings? min items x, max items 2

i don't think it would be confusing, espically maybe if we rename it to

Suggested change
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"
two_line_elements[0] = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
two_line_elements[0] = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"


---

* `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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 2 is missing here

how does TLE == name of the field in output events used to specify the primary key which insert or update operations are based on. could we expand on this and make it mroe clear how these are supposed to be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out. This description is not accurate, will change.

Comment on lines 33 to 36
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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think theres a a reason to not make this a type list? as it would be more versatile and allow users to n pass-around an array vs 2 separate strings? min items x, max items 2

i don't think it would be confusing, espically maybe if we rename it to

Suggested change
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"
two_line_elements[0] = "1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"
two_line_elements[0] = "2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"

@jiaweitao001 jiaweitao001 force-pushed the orbital_spacecraft branch 3 times, most recently from 32790ae to 132ee95 Compare August 30, 2022 06:03
@jiaweitao001
Copy link
Contributor Author

Hi @katbyte , changed as suggested. Thanks!

@jiaweitao001 jiaweitao001 force-pushed the orbital_spacecraft branch 2 times, most recently from af5ad8a to 6e5faaa Compare September 1, 2022 02:02
@jiaweitao001 jiaweitao001 changed the title New Resource: azurerm_spacecraft in orbital service New Resource: azurerm_spacecraft Sep 1, 2022
}

func (r SpacecraftResource) ResourceType() string {
return "azurerm_spacecraft"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what other resources will be part of this new service? should we call this resource:

Suggested change
return "azurerm_spacecraft"
return "azurerm_orbital_spacecraft"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jiaweitao001 - LGTM 👾

@katbyte katbyte merged commit a503f9f into hashicorp:main Sep 6, 2022
@github-actions github-actions bot added this to the v3.22.0 milestone Sep 6, 2022
@katbyte katbyte changed the title New Resource: azurerm_spacecraft New Resource: azurerm_orbital_spacecraft Sep 6, 2022
katbyte added a commit that referenced this pull request Sep 6, 2022
@github-actions
Copy link

github-actions bot commented Sep 9, 2022

This functionality has been released in v3.22.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants