Skip to content
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
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ clean:
rm -rf $(BIN)

testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m -parallel=$(TEST_PARALLELISM)
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 360m -parallel=$(TEST_PARALLELISM)

install_local: build
@echo "Installing local provider binary to plugins mirror path $(PLUGINS_PATH)/$(PLUGINS_PROVIDER_PATH)"
Expand Down
105 changes: 105 additions & 0 deletions docs/resources/rediscloud_active_active_regions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
layout: "rediscloud"
page_title: "Redis Cloud: rediscloud_active_active_regions"
description: |-
Regions resource in the Terraform provider Redis Cloud.
---

# Resource: rediscloud_active_active_regions

Creates an Active Active Regions within your Redis Enterprise Cloud Account.
This resource is responsible for creating regions within
that subscription. This allows Redis Enterprise Cloud to provision
your regions defined in separate resources in the most efficient way.

~> **Note:** Todo?

## Example Usage

```hcl
data "rediscloud_payment_method" "card" {
card_type = "Visa"
}

resource "rediscloud_active_active_subscription_regions" "example" {
subscription_id = 151945
delete_regions = false
region {
region = "us-east-1"
networking_deployment_cidr = "10.0.0.0/24"
recreate_region = false
database {
id = "7839"
database_name = "test-db-1"
local_write_operations_per_second = 1000
local_read_operations_per_second = 1000
}
}
region {
region = "eu-west-1"
networking_deployment_cidr = "10.1.0.0/24"
recreate_region = false
database {
id = "7839"
database_name = "test-db-1"
local_write_operations_per_second = 1000
local_read_operations_per_second = 1000
}
}
region {
region = "eu-west-2"
networking_deployment_cidr = "10.2.0.0/24"
recreate_region = false
database {
id = "7839"
database_name = "test-db-1"
local_write_operations_per_second = 1500
local_read_operations_per_second = 1500
}
}
}
```

## Argument Reference

The following arguments are supported:

* `subscription_id` - (Required) ID of the subscription that the regions belong to
* `delete_regions` - (Optional) Flag required to be set when one or more regions is to be deleted, if the flag is not set an error will be thrown
* `region` - (Required) Cloud networking details, per region, documented below

The `region` block supports:

* `region_id` - (Optional) Region ID
* `region` - (Required) Region name
* `vpc_id` - (Required) Identifier of the VPC to be peered
* `networking_deployment_cidr` - (Required) Deployment CIDR mask
* `recreate_region` - (Optional) Flag, needs to be set if a region has to be re-created. A region will need to be re-created in the case of a change on
the `networking_deployment_cidr` field. During re-create the region will be deleted (so the `delete_regions` flag also needs to be set) and then created again.
* `database` - (Required) The database resource, documented below

The `database` block supports:

* `id` - (Required) Database id beloging to the subscription
* `database_name` - (Required) Database name belonging to the subscription
* `local_write_operations_per_second` - (Required) Local throughput measurement for an active-active region
* `local_read_operations_per_second` - (Required) Local throughput measurement for an active-active region


### Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:

* `create` - (Defaults to 30 mins) Used when creating the subscription
* `update` - (Defaults to 30 mins) Used when updating the subscription
* `delete` - (Defaults to 10 mins) Used when destroying the subscription

## Import

`rediscloud_active_active_regions` can be imported using the ID of the subscription, e.g.

```
$ terraform import rediscloud_active_active_regions.example 12345678
```

~> **Note:** the creation_plan block will be ignored during imports.
57 changes: 28 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,61 @@ go 1.17
require (
github.com/RedisLabs/rediscloud-go-api v0.1.11
github.com/bflad/tfproviderlint v0.28.1
github.com/google/go-cmp v0.5.9
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-sdk/v2 v2.20.0
github.com/stretchr/testify v1.8.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
github.com/stretchr/testify v1.8.1
)

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/avast/retry-go v3.0.0+incompatible // indirect
github.com/bflad/gopaniccheck v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-hclog v1.4.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-plugin v1.4.8 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.4.0 // indirect
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
github.com/hashicorp/hcl/v2 v2.15.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.17.2 // indirect
github.com/hashicorp/terraform-exec v0.17.3 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.12.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.2 // indirect
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.8 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
github.com/vmihailenco/tagparser v0.1.2 // indirect
github.com/zclconf/go-cty v1.12.1 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/tools v0.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading