Skip to content

Commit 394eaf3

Browse files
modular-magiciandanawillow
authored andcommitted
Redis resource (hashicorp#1485)
<!-- This change is generated by MagicModules. --> /cc @danawillow
1 parent 9ebeb05 commit 394eaf3

File tree

2 files changed

+168
-7
lines changed

2 files changed

+168
-7
lines changed

docs/r/redis_instance.html.markdown

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This file is automatically generated by Magic Modules and manual
9+
# changes will be clobbered when the file is regenerated.
10+
#
11+
# Please read more about how to change this file in
12+
# .github/CONTRIBUTING.md.
13+
#
14+
# ----------------------------------------------------------------------------
15+
layout: "google"
16+
page_title: "Google: google_redis_instance"
17+
sidebar_current: "docs-google-redis-instance"
18+
description: |-
19+
A Google Cloud Redis instance.
20+
---
21+
22+
# google\_redis\_instance
23+
24+
A Google Cloud Redis instance.
25+
26+
To get more information about Instance, see:
27+
28+
* [API documentation](https://cloud.google.com/memorystore/docs/redis/reference/rest/)
29+
* How-to Guides
30+
* [Official Documentation](https://cloud.google.com/memorystore/docs/redis/)
31+
32+
## Example Usage
33+
34+
### Basic Usage
35+
```hcl
36+
resource "google_redis_instance" "test" {
37+
name = "%s"
38+
memory_size_gb = 1
39+
}
40+
```
41+
42+
### Full Usage
43+
```hcl
44+
resource "google_compute_network" "test" {
45+
name = "%s"
46+
}
47+
48+
resource "google_redis_instance" "test" {
49+
name = "%s"
50+
tier = "STANDARD_HA"
51+
memory_size_gb = 1
52+
53+
region = "us-central1"
54+
location_id = "us-central1-a"
55+
alternative_location_id = "us-central1-f"
56+
57+
redis_version = "REDIS_3_2"
58+
display_name = "Terraform Test Instance"
59+
reserved_ip_range = "192.168.0.0/29"
60+
61+
labels {
62+
my_key = "my_val"
63+
other_key = "other_val"
64+
}
65+
}
66+
```
67+
68+
## Argument Reference
69+
70+
The following arguments are supported:
71+
72+
* `name` -
73+
(Required)
74+
The ID of the instance or a fully qualified identifier for the instance.
75+
* `memory_size_gb` -
76+
(Required)
77+
Redis memory size in GiB.
78+
79+
80+
- - -
81+
82+
* `alternative_location_id` -
83+
(Optional)
84+
Only applicable to STANDARD_HA tier which protects the instance
85+
against zonal failures by provisioning it across two zones.
86+
If provided, it must be a different zone from the one provided in
87+
[locationId].
88+
* `authorized_network` -
89+
(Optional)
90+
The full name of the Google Compute Engine network to which the
91+
instance is connected. If left unspecified, the default network
92+
will be used.
93+
* `display_name` -
94+
(Optional)
95+
An arbitrary and optional user-provided name for the instance.
96+
* `labels` -
97+
(Optional)
98+
Resource labels to represent user provided metadata.
99+
* `location_id` -
100+
(Optional)
101+
The zone where the instance will be provisioned. If not provided,
102+
the service will choose a zone for the instance. For STANDARD_HA tier,
103+
instances will be created across two zones for protection against
104+
zonal failures. If [alternativeLocationId] is also provided, it must
105+
be different from [locationId].
106+
* `redis_version` -
107+
(Optional)
108+
The version of Redis software. If not provided, latest supported
109+
version will be used. Updating the version will perform an
110+
upgrade/downgrade to the new version. Currently, the supported values
111+
are REDIS_3_2 for Redis 3.2.
112+
* `reserved_ip_range` -
113+
(Optional)
114+
The CIDR range of internal addresses that are reserved for this
115+
instance. If not provided, the service will choose an unused /29
116+
block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be
117+
unique and non-overlapping with existing subnets in an authorized
118+
network.
119+
* `tier` -
120+
(Optional)
121+
The service tier of the instance. Must be one of these values:
122+
123+
- BASIC: standalone instance
124+
- STANDARD_HA: highly available primary/replica instances
125+
* `region` -
126+
(Optional)
127+
The name of the Redis region of the instance.
128+
* `project` (Optional) The ID of the project in which the resource belongs.
129+
If it is not provided, the provider project is used.
130+
131+
132+
## Attributes Reference
133+
134+
In addition to the arguments listed above, the following computed attributes are exported:
135+
136+
* `create_time` -
137+
The time the instance was created in RFC3339 UTC "Zulu" format,
138+
accurate to nanoseconds.
139+
* `current_location_id` -
140+
The current zone where the Redis endpoint is placed.
141+
For Basic Tier instances, this will always be the same as the
142+
[locationId] provided by the user at creation time. For Standard Tier
143+
instances, this can be either [locationId] or [alternativeLocationId]
144+
and can change after a failover event.
145+
* `host` -
146+
Hostname or IP address of the exposed Redis endpoint used by clients
147+
to connect to the service.
148+
* `port` -
149+
The port number of the exposed Redis endpoint.
150+
151+
152+
## Timeouts
153+
154+
This resource provides the following
155+
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
156+
157+
- `create` - Default is 6 minutes.
158+
- `delete` - Default is 4 minutes.
159+
160+
## Import
161+
162+
Instance can be imported using any of these accepted formats:
163+
164+
```
165+
$ terraform import google_redis_instance.default projects/{{project}}/locations/{{region}}/instances/{{name}}
166+
$ terraform import google_redis_instance.default {{project}}/{{region}}/{{name}}
167+
$ terraform import google_redis_instance.default {{name}}
168+
```

docs/r/resourcemanager_lien.html.markdown

-7
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@ In addition to the arguments listed above, the following computed attributes are
8686
Time of creation
8787

8888

89-
## Timeouts
90-
91-
This resource provides the following
92-
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
93-
94-
- `create` - Default is 4 minutes.
95-
- `delete` - Default is 4 minutes.
9689

9790
## Import
9891

0 commit comments

Comments
 (0)