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

Filestore module should allow specification of project_id #125

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/file-system/filestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ No modules.
| <a name="input_local_mount"></a> [local\_mount](#input\_local\_mount) | Mountpoint for this filestore instance. | `string` | `"/shared"` | no |
| <a name="input_name"></a> [name](#input\_name) | The resource name of the instance. | `string` | `null` | no |
| <a name="input_network_name"></a> [network\_name](#input\_network\_name) | The name of the GCE VPC network to which the instance is connected. | `string` | n/a | yes |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | ID of project in which Filestore instance will be created. | `string` | n/a | yes |
| <a name="input_size_gb"></a> [size\_gb](#input\_size\_gb) | Storage size of the filestore instance in GB. | `number` | `2660` | no |
| <a name="input_zone"></a> [zone](#input\_zone) | The name of the Filestore zone of the instance. | `string` | n/a | yes |

Expand Down
2 changes: 2 additions & 0 deletions resources/file-system/filestore/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

resource "random_id" "resource_name_suffix" {
byte_length = 4
}
Expand All @@ -22,6 +23,7 @@ locals {
}

resource "google_filestore_instance" "filestore_instance" {
project = var.project_id
provider = google-beta
depends_on = [var.network_name]

Expand Down
7 changes: 7 additions & 0 deletions resources/file-system/filestore/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@
"default": null,
"required": true
},
{
"name": "project_id",
"type": "string",
"description": "ID of project in which Filestore instance will be created.",
"default": null,
"required": true
},
{
"name": "size_gb",
"type": "number",
Expand Down
5 changes: 5 additions & 0 deletions resources/file-system/filestore/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
* limitations under the License.
*/

variable "project_id" {
description = "ID of project in which Filestore instance will be created."
type = string
}

variable "deployment_name" {
description = "Name of the HPC deployment, used as name of the filestore instace if no name is specified."
type = string
Expand Down