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

Docs clarification for compute_instance settings #10133

Closed
scarolan opened this issue Sep 22, 2021 · 2 comments
Closed

Docs clarification for compute_instance settings #10133

scarolan opened this issue Sep 22, 2021 · 2 comments
Assignees

Comments

@scarolan
Copy link

scarolan commented Sep 22, 2021

This suggested replacement is for this page:
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance

This section:

The network_interface block supports:
network - (Optional) The name or self_link of the network to attach this interface to. Either network or subnetwork must be provided.
subnetwork - (Optional) The name or self_link of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. If network isn’t provided it will be inferred from the subnetwork. Either network or subnetwork must be provided.

Should be updated to be more clear on how the provider behaves:

The network_interface block supports network and subnetwork options. Only one of these should be specified.
network - The name or self_link of the network to attach this interface to. If you use network there must be a matching subnet with the same name in your target region. Google creates a subnet called default in every region, so this is a good option if you’re using the default network.
subnetwork - The name or self_link of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. With this option the provider will automatically determine the network from the subnetwork name. If you are using anything other than the default network in your project, you should choose this option.

@melinath
Copy link
Collaborator

melinath commented Oct 1, 2021

It's not clear to me that this proposed change is an improvement - for now I'm closing this ticket[1], but please feel free to post here with the following information:

  • What about the current documentation is confusing or incomplete?
  • What about the new documentation is better?
  • (if it's not answered by one of those) Why should you use subnetwork if you're not using the default network?

If you have specific changes you want to suggest, you can also make a PR that alters this file: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/third_party/terraform/website/docs/r/compute_instance.html.markdown

[1] I will also open a PR referencing this ticket that updates the field docs to more closely match the API docs.

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants