|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "duplocloud_ecache_associate_global_secondary_cluster Resource - terraform-provider-duplocloud" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + duplocloud_ecache_associate_global_secondary_cluster used to associate Amazon ElastiCache secondary regional cluster to global datastore'sThis resource currently supports, define and manage only Redis based regional cluster |
| 7 | +--- |
| 8 | + |
| 9 | +# duplocloud_ecache_associate_global_secondary_cluster (Resource) |
| 10 | + |
| 11 | +`duplocloud_ecache_associate_global_secondary_cluster` used to associate Amazon ElastiCache secondary regional cluster to global datastore's<p>This resource currently supports, define and manage only Redis based regional cluster</p> |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "duplocloud_tenant" "myapp" { |
| 17 | + account_name = "myapp" |
| 18 | + plan_id = "default" |
| 19 | +} |
| 20 | +
|
| 21 | +
|
| 22 | +resource "duplocloud_ecache_instance" "re" { |
| 23 | + tenant_id = duplocloud_tenant.myapp.tenant_id |
| 24 | + name = "redp11" |
| 25 | + cache_type = 0 |
| 26 | + replicas = 2 |
| 27 | + size = "cache.r6g.large" |
| 28 | + engine_version = "6.0" |
| 29 | + enable_cluster_mode = true |
| 30 | + number_of_shards = 2 |
| 31 | + automatic_failover_enabled = true |
| 32 | +} |
| 33 | +
|
| 34 | +resource "duplocloud_ecache_global_datastore" "gds" { |
| 35 | + tenant_id = duplocloud_tenant.myapp.tenant_id |
| 36 | + primary_instance_name = duplocloud_ecache_instance.re.identifier |
| 37 | + global_replication_group_name = "ggrp11" |
| 38 | + description = "global datastore" |
| 39 | +} |
| 40 | +
|
| 41 | +
|
| 42 | +
|
| 43 | +resource "duplocloud_ecache_associate_global_secondary_cluster" "rg" { |
| 44 | + tenant_id = duplocloud_tenant.myapp.tenant_id |
| 45 | + secondary_tenant_id = "5e9a6dd5-001e-45a0-af67-777da8a9584b" |
| 46 | + global_datastore_id = duplocloud_ecache_global_datastore.gds.fullname |
| 47 | + description = "secondary cluster" |
| 48 | + secondary_cluster_name = "red11sc" |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +<!-- schema generated by tfplugindocs --> |
| 53 | +## Schema |
| 54 | + |
| 55 | +### Required |
| 56 | + |
| 57 | +- `global_datastore_id` (String) Specify the global datastore name with which the secondary regional cluster should be associated. |
| 58 | +- `secondary_cluster_name` (String) The name of the elasticache instance that need to be created as secondary regional cluster. |
| 59 | +- `secondary_tenant_id` (String) The tenant_id where secondary cluster need to be created. **NOTE** The tenant_id must belong to a region different from that of the primary cluster. |
| 60 | +- `tenant_id` (String) The GUID of the tenant that the elasticache instance datastore has been created in. |
| 61 | + |
| 62 | +### Optional |
| 63 | + |
| 64 | +- `description` (String) The description for secondary cluster |
| 65 | +- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) |
| 66 | + |
| 67 | +### Read-Only |
| 68 | + |
| 69 | +- `id` (String) The ID of this resource. |
| 70 | +- `identifier` (String) Fullname for secondary regional cluster |
| 71 | +- `secondary_region` (String) Region of secondary cluster |
| 72 | + |
| 73 | +<a id="nestedblock--timeouts"></a> |
| 74 | +### Nested Schema for `timeouts` |
| 75 | + |
| 76 | +Optional: |
| 77 | + |
| 78 | +- `create` (String) |
| 79 | +- `delete` (String) |
| 80 | + |
| 81 | +## Import |
| 82 | + |
| 83 | +Import is supported using the following syntax: |
| 84 | + |
| 85 | +```shell |
| 86 | +# Example: Importing an existing AWS ElastiCache Secondary cluster in a global datastore |
| 87 | +# - *TENANT_ID* is the tenant GUID |
| 88 | +# - *SECONDARY_TENANT_ID* tenant id where secondary cluster resides. |
| 89 | +# - *GLOBAL_DATASTORE* global datastore name |
| 90 | +# - *SECONDARY_CLUSTER* secondary cluster name |
| 91 | +terraform import duplocloud_ecache_associate_global_secondary_cluster.sc *TENANT_ID*/ecacheReplicationGroup/*SECONDARY_TENANT_ID*/*GLOBAL_DATASTORE*/*SECONDARY_CLUSTER* |
| 92 | +``` |
0 commit comments