From fa747a334095e9f102f34ad98d079037cfdccfde Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 8 Apr 2024 15:15:30 -0700 Subject: [PATCH] Adding Parallelstore Beta Service Provider (#9910) (#17800) [upstream:6a68afaf8470a20f1e06d6bb603cc6bf0abbd34f] Signed-off-by: Modular Magician --- .changelog/9910.txt | 3 + .teamcity/components/inputs/services_beta.kt | 5 + .teamcity/components/inputs/services_ga.kt | 5 + .../resource_parallelstore_instance_test.go | 2 + .../r/parallelstore_instance.html.markdown | 233 ++++++++++++++++++ 5 files changed, 248 insertions(+) create mode 100644 .changelog/9910.txt create mode 100644 google/services/parallelstore/resource_parallelstore_instance_test.go create mode 100644 website/docs/r/parallelstore_instance.html.markdown diff --git a/.changelog/9910.txt b/.changelog/9910.txt new file mode 100644 index 00000000000..ea55f917be9 --- /dev/null +++ b/.changelog/9910.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +`google_parallelstore_instance` +``` \ No newline at end of file diff --git a/.teamcity/components/inputs/services_beta.kt b/.teamcity/components/inputs/services_beta.kt index 613e795bf68..e75b67fab05 100644 --- a/.teamcity/components/inputs/services_beta.kt +++ b/.teamcity/components/inputs/services_beta.kt @@ -551,6 +551,11 @@ var ServicesListBeta = mapOf( "displayName" to "Oslogin", "path" to "./google-beta/services/oslogin" ), + "parallelstore" to mapOf( + "name" to "parallelstore", + "displayName" to "Parallelstore", + "path" to "./google/services/parallelstore" + ), "privateca" to mapOf( "name" to "privateca", "displayName" to "Privateca", diff --git a/.teamcity/components/inputs/services_ga.kt b/.teamcity/components/inputs/services_ga.kt index f3a3fe57388..f7cc140075d 100644 --- a/.teamcity/components/inputs/services_ga.kt +++ b/.teamcity/components/inputs/services_ga.kt @@ -546,6 +546,11 @@ var ServicesListGa = mapOf( "displayName" to "Oslogin", "path" to "./google/services/oslogin" ), + "parallelstore" to mapOf( + "name" to "parallelstore", + "displayName" to "Parallelstore", + "path" to "./google/services/parallelstore" + ), "privateca" to mapOf( "name" to "privateca", "displayName" to "Privateca", diff --git a/google/services/parallelstore/resource_parallelstore_instance_test.go b/google/services/parallelstore/resource_parallelstore_instance_test.go new file mode 100644 index 00000000000..2b759dbb675 --- /dev/null +++ b/google/services/parallelstore/resource_parallelstore_instance_test.go @@ -0,0 +1,2 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 diff --git a/website/docs/r/parallelstore_instance.html.markdown b/website/docs/r/parallelstore_instance.html.markdown new file mode 100644 index 00000000000..c48e39df7ae --- /dev/null +++ b/website/docs/r/parallelstore_instance.html.markdown @@ -0,0 +1,233 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in +# .github/CONTRIBUTING.md. +# +# ---------------------------------------------------------------------------- +subcategory: "Parallelstore" +description: |- + A Parallelstore Instance. +--- + +# google\_parallelstore\_instance + +A Parallelstore Instance. + +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. + + + +## Example Usage - Parallelstore Instance Basic + + +```hcl +resource "google_parallelstore_instance" "instance" { + instance_id = "instance" + location = "us-central1-a" + description = "test instance" + capacity_gib = 12000 + network = google_compute_network.network.name + + labels = { + test = "value" + } + provider = google-beta + depends_on = [google_service_networking_connection.default] +} + +resource "google_compute_network" "network" { + name = "network" + auto_create_subnetworks = true + mtu = 8896 + provider = google-beta +} + + + +# Create an IP address +resource "google_compute_global_address" "private_ip_alloc" { + name = "address" + purpose = "VPC_PEERING" + address_type = "INTERNAL" + prefix_length = 24 + network = google_compute_network.network.id + provider = google-beta +} + +# Create a private connection +resource "google_service_networking_connection" "default" { + network = google_compute_network.network.id + service = "servicenetworking.googleapis.com" + reserved_peering_ranges = [google_compute_global_address.private_ip_alloc.name] + provider = google-beta +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `capacity_gib` - + (Required) + Immutable. Storage capacity of Parallelstore instance in Gibibytes (GiB). + +* `location` - + (Required) + Part of `parent`. See documentation of `projectsId`. + +* `instance_id` - + (Required) + The logical name of the Parallelstore instance in the user project with the following restrictions: + * Must contain only lowercase letters, numbers, and hyphens. + * Must start with a letter. + * Must be between 1-63 characters. + * Must end with a number or a letter. + * Must be unique within the customer project/ location + + +- - - + + +* `description` - + (Optional) + The description of the instance. 2048 characters or less. + +* `labels` - + (Optional) + Cloud Labels are a flexible and lightweight mechanism for organizing cloud + resources into groups that reflect a customer's organizational needs and + deployment strategies. Cloud Labels can be used to filter collections of + resources. They can be used to control how resource metrics are aggregated. + And they can be used as arguments to policy management rules (e.g. route, + firewall, load balancing, etc.). + * Label keys must be between 1 and 63 characters long and must conform to + the following regular expression: `a-z{0,62}`. + * Label values must be between 0 and 63 characters long and must conform + to the regular expression `[a-z0-9_-]{0,63}`. + * No more than 64 labels can be associated with a given resource. + See https://goo.gl/xmQnxf for more information on and examples of labels. + If you plan to use labels in your own code, please note that additional + characters may be allowed in the future. Therefore, you are advised to use + an internal label representation, such as JSON, which doesn't rely upon + specific characters being disallowed. For example, representing labels + as the string: name + "_" + value would prove problematic if we were to + allow "_" in a future release. + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `network` - + (Optional) + Immutable. The name of the Google Compute Engine + [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + instance is connected. + +* `reserved_ip_range` - + (Optional) + Immutable. Contains the id of the allocated IP address range associated with the + private service access connection for example, "test-default" associated + with IP range 10.0.0.0/29. If no range id is provided all ranges will be + considered. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/instances/{{instance_id}}` + +* `name` - + The resource name of the instance, in the format + `projects/{project}/locations/{location}/instances/{instance_id}` + +* `state` - + The instance state. + Possible values: + STATE_UNSPECIFIED + CREATING + ACTIVE + DELETING + FAILED + +* `create_time` - + The time when the instance was created. + +* `update_time` - + The time when the instance was updated. + +* `daos_version` - + The version of DAOS software running in the instance + +* `access_points` - + List of access_points. + Contains a list of IPv4 addresses used for client side configuration. + +* `effective_reserved_ip_range` - + Immutable. Contains the id of the allocated IP address range associated with the + private service access connection for example, "test-default" associated + with IP range 10.0.0.0/29. This field is populated by the service and + and contains the value currently used by the service. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +Instance can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/instances/{{instance_id}}` +* `{{project}}/{{location}}/{{instance_id}}` +* `{{location}}/{{instance_id}}` + + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Instance using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/instances/{{instance_id}}" + to = google_parallelstore_instance.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Instance can be imported using one of the formats above. For example: + +``` +$ terraform import google_parallelstore_instance.default projects/{{project}}/locations/{{location}}/instances/{{instance_id}} +$ terraform import google_parallelstore_instance.default {{project}}/{{location}}/{{instance_id}} +$ terraform import google_parallelstore_instance.default {{location}}/{{instance_id}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).