Skip to content

Commit

Permalink
Adding Parallelstore Beta Service Provider (#9910) (#17800)
Browse files Browse the repository at this point in the history
[upstream:6a68afaf8470a20f1e06d6bb603cc6bf0abbd34f]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Apr 8, 2024
1 parent 4f7c4fe commit fa747a3
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/9910.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_parallelstore_instance`
```
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_beta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_ga.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

Check failure on line 2 in google/services/parallelstore/resource_parallelstore_instance_test.go

View workflow job for this annotation

GitHub Actions / Build

expected 'package', found 'EOF'

Check failure on line 2 in google/services/parallelstore/resource_parallelstore_instance_test.go

View workflow job for this annotation

GitHub Actions / Build

expected 'package', found 'EOF'

Check failure on line 2 in google/services/parallelstore/resource_parallelstore_instance_test.go

View workflow job for this annotation

GitHub Actions / Build

expected 'package', found 'EOF'
233 changes: 233 additions & 0 deletions website/docs/r/parallelstore_instance.html.markdown
Original file line number Diff line number Diff line change
@@ -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.


<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=parallelstore_instance_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## 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).

0 comments on commit fa747a3

Please sign in to comment.