Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_redis_cache - support replicas_per_primary, redis_version, tenant_settings #12820

Merged
merged 3 commits into from Aug 4, 2021

Conversation

xuzhang3
Copy link
Contributor

@xuzhang3 xuzhang3 commented Aug 3, 2021

Redis Cache enhancemnent:

  1. Support redisVersion, tenantSettings, replicasPerPrimary
  2. Bump redis cache API from 2020-06-01 to 2020-12-01

AccTest:

TestAccRedisCacheDataSource:

==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./azurerm/internal/services/redis -run=TestAccRedisCacheDataSource -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccRedisCacheDataSource_standard
=== PAUSE TestAccRedisCacheDataSource_standard
=== CONT  TestAccRedisCacheDataSource_standard
--- PASS: TestAccRedisCacheDataSource_standard (2112.87s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/redis       2116.717s



TestAccRedisFirewallRule:

==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./azurerm/internal/services/redis -run=TestAccRedisFirewallRule
-timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/
version.ProviderVersion=acc"
=== RUN   TestAccRedisFirewallRule_basic
=== PAUSE TestAccRedisFirewallRule_basic
=== RUN   TestAccRedisFirewallRule_multi
=== PAUSE TestAccRedisFirewallRule_multi
=== RUN   TestAccRedisFirewallRule_requiresImport
=== PAUSE TestAccRedisFirewallRule_requiresImport
=== RUN   TestAccRedisFirewallRule_update
=== PAUSE TestAccRedisFirewallRule_update
=== CONT  TestAccRedisFirewallRule_basic
=== CONT  TestAccRedisFirewallRule_requiresImport
=== CONT  TestAccRedisFirewallRule_update
=== CONT  TestAccRedisFirewallRule_multi
--- PASS: TestAccRedisFirewallRule_basic (1523.07s)
--- PASS: TestAccRedisFirewallRule_multi (1550.96s)
--- PASS: TestAccRedisFirewallRule_requiresImport (1573.64s)
--- PASS: TestAccRedisFirewallRule_update (1645.75s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/redis       1649.861s


TestAccRedisLinkedServer:

==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -count=1  -v ./azurerm/internal/services/redis -run=TestAccRedisLinkedServer -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.
ProviderVersion=acc"
=== RUN   TestAccRedisLinkedServer_basic
=== PAUSE TestAccRedisLinkedServer_basic
=== RUN   TestAccRedisLinkedServer_requiresImport
=== PAUSE TestAccRedisLinkedServer_requiresImport
=== CONT  TestAccRedisLinkedServer_basic
=== CONT  TestAccRedisLinkedServer_requiresImport
--- PASS: TestAccRedisLinkedServer_basic (2444.06s)
--- PASS: TestAccRedisLinkedServer_requiresImport (2529.45s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/redis  2533.750s

TestAccRedisCache:

==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./azurerm/internal/services/redis -run=TestAccRedisCache -timeout 240m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version
.ProviderVersion=acc"
=== RUN   TestAccRedisCacheDataSource_standard
=== PAUSE TestAccRedisCacheDataSource_standard
=== RUN   TestAccRedisCache_basic
=== PAUSE TestAccRedisCache_basic
=== RUN   TestAccRedisCache_withoutSSL
=== PAUSE TestAccRedisCache_withoutSSL
=== RUN   TestAccRedisCache_requiresImport
=== PAUSE TestAccRedisCache_requiresImport
=== RUN   TestAccRedisCache_standard
=== PAUSE TestAccRedisCache_standard
=== RUN   TestAccRedisCache_premium
=== PAUSE TestAccRedisCache_premium
=== RUN   TestAccRedisCache_premiumSharded
=== PAUSE TestAccRedisCache_premiumSharded
=== RUN   TestAccRedisCache_premiumShardedScaling
=== PAUSE TestAccRedisCache_premiumShardedScaling
=== RUN   TestAccRedisCache_NonStandardCasing
=== PAUSE TestAccRedisCache_NonStandardCasing
=== RUN   TestAccRedisCache_BackupDisabled
=== PAUSE TestAccRedisCache_BackupDisabled
=== RUN   TestAccRedisCache_BackupEnabled
=== PAUSE TestAccRedisCache_BackupEnabled
=== RUN   TestAccRedisCache_BackupEnabledDisabled
=== PAUSE TestAccRedisCache_BackupEnabledDisabled
=== RUN   TestAccRedisCache_AOFBackupEnabled
=== PAUSE TestAccRedisCache_AOFBackupEnabled
=== RUN   TestAccRedisCache_AOFBackupEnabledDisabled
=== PAUSE TestAccRedisCache_AOFBackupEnabledDisabled
=== RUN   TestAccRedisCache_PatchSchedule
=== PAUSE TestAccRedisCache_PatchSchedule
=== RUN   TestAccRedisCache_PatchScheduleUpdated
=== PAUSE TestAccRedisCache_PatchScheduleUpdated
=== RUN   TestAccRedisCache_PublicNetworkAccessDisabledEnabled
=== PAUSE TestAccRedisCache_PublicNetworkAccessDisabledEnabled
=== RUN   TestAccRedisCache_InternalSubnet
=== PAUSE TestAccRedisCache_InternalSubnet
=== RUN   TestAccRedisCache_InternalSubnetStaticIP
=== PAUSE TestAccRedisCache_InternalSubnetStaticIP
=== RUN   TestAccRedisCache_InternalSubnet_withZone
=== PAUSE TestAccRedisCache_InternalSubnet_withZone
=== RUN   TestAccRedisCache_SubscribeAllEvents
=== PAUSE TestAccRedisCache_SubscribeAllEvents
=== RUN   TestAccRedisCache_WithoutAuth
=== PAUSE TestAccRedisCache_WithoutAuth
=== RUN   TestAccRedisCache_ReplicasPerMaster
=== PAUSE TestAccRedisCache_ReplicasPerMaster
=== RUN   TestAccRedisCache_ReplicasPerPrimary
=== PAUSE TestAccRedisCache_ReplicasPerPrimary
=== RUN   TestAccRedisCache_RedisVersion
=== PAUSE TestAccRedisCache_RedisVersion
=== RUN   TestAccRedisCache_TenantSettings
=== PAUSE TestAccRedisCache_TenantSettings
=== CONT  TestAccRedisCacheDataSource_standard
=== CONT  TestAccRedisCache_PatchSchedule
=== CONT  TestAccRedisCache_AOFBackupEnabled
=== CONT  TestAccRedisCache_WithoutAuth
=== CONT  TestAccRedisCache_RedisVersion
=== CONT  TestAccRedisCache_BackupEnabled
=== CONT  TestAccRedisCache_premiumShardedScaling
=== CONT  TestAccRedisCache_AOFBackupEnabledDisabled
=== CONT  TestAccRedisCache_ReplicasPerPrimary
--- PASS: TestAccRedisCache_WithoutAuth (1476.97s)
--- PASS: TestAccRedisCache_RedisVersion (1532.80s)
=== CONT  TestAccRedisCache_BackupDisabled
=== CONT  TestAccRedisCache_BackupEnabledDisabled
--- PASS: TestAccRedisCache_PatchSchedule (1537.95s)
--- PASS: TestAccRedisCache_AOFBackupEnabled (1624.05s)
=== CONT  TestAccRedisCache_standard
--- PASS: TestAccRedisCache_BackupEnabled (1937.85s)
=== CONT  TestAccRedisCache_premiumSharded
--- PASS: TestAccRedisCacheDataSource_standard (2175.88s)
=== CONT  TestAccRedisCache_premium
--- PASS: TestAccRedisCache_premiumShardedScaling (2805.35s)
=== CONT  TestAccRedisCache_ReplicasPerMaster
--- PASS: TestAccRedisCache_AOFBackupEnabledDisabled (2828.37s)
=== CONT  TestAccRedisCache_InternalSubnetStaticIP
--- PASS: TestAccRedisCache_ReplicasPerPrimary (1491.88s)
=== CONT  TestAccRedisCache_SubscribeAllEvents
--- PASS: TestAccRedisCache_BackupDisabled (1519.75s)
=== CONT  TestAccRedisCache_InternalSubnet_withZone
--- PASS: TestAccRedisCache_BackupEnabledDisabled (1537.81s)
=== CONT  TestAccRedisCache_PublicNetworkAccessDisabledEnabled
--- PASS: TestAccRedisCache_premiumSharded (1568.10s)
=== CONT  TestAccRedisCache_InternalSubnet
--- PASS: TestAccRedisCache_standard (2039.38s)
=== CONT  TestAccRedisCache_withoutSSL
--- PASS: TestAccRedisCache_premium (1535.45s)
=== CONT  TestAccRedisCache_requiresImport
--- PASS: TestAccRedisCache_ReplicasPerMaster (1459.14s)
=== CONT  TestAccRedisCache_PatchScheduleUpdated
--- PASS: TestAccRedisCache_SubscribeAllEvents (1436.77s)
=== CONT  TestAccRedisCache_NonStandardCasing
--- PASS: TestAccRedisCache_PublicNetworkAccessDisabledEnabled (2203.87s)
=== CONT  TestAccRedisCache_basic
--- PASS: TestAccRedisCache_withoutSSL (1976.11s)
=== CONT  TestAccRedisCache_TenantSettings
--- PASS: TestAccRedisCache_requiresImport (2083.57s)
--- PASS: TestAccRedisCache_PatchScheduleUpdated (1572.15s)
--- PASS: TestAccRedisCache_InternalSubnetStaticIP (3557.88s)
--- PASS: TestAccRedisCache_NonStandardCasing (1985.46s)
--- PASS: TestAccRedisCache_InternalSubnet_withZone (3359.18s)
--- PASS: TestAccRedisCache_InternalSubnet (2917.59s)
--- PASS: TestAccRedisCache_TenantSettings (1589.67s)
--- PASS: TestAccRedisCache_basic (2065.85s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/redis       7349.246s

@@ -73,6 +73,14 @@ The following arguments are supported:

~> **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards.

* `replicas_per_primary` - (Optional) Amount of replicas to create per primary for this Redis Cache. If both `replicas_per_primary` and `replicas_per_master` are set, they need to be equal.

* `redis_version` - (Optional) Redis version. Only major version needed. Valid values: `4`, `6`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's optional, what is the default value ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its computed so its derived from the API (and can change depending on what azure defaults too)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BzSpi For current API, the default value will be 4.

@katbyte katbyte added this to the v2.71.0 milestone Aug 4, 2021
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xuzhang3 - LGTM ❄️

@@ -73,6 +73,14 @@ The following arguments are supported:

~> **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards.

* `replicas_per_primary` - (Optional) Amount of replicas to create per primary for this Redis Cache. If both `replicas_per_primary` and `replicas_per_master` are set, they need to be equal.

* `redis_version` - (Optional) Redis version. Only major version needed. Valid values: `4`, `6`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its computed so its derived from the API (and can change depending on what azure defaults too)

@katbyte katbyte changed the title Redis Cache enhance azurerm_redis_cache - support replicas_per_primary, redis_version, tenant_settings Aug 4, 2021
@katbyte katbyte merged commit e110150 into hashicorp:master Aug 4, 2021
katbyte added a commit that referenced this pull request Aug 4, 2021
@github-actions
Copy link

github-actions bot commented Aug 6, 2021

This functionality has been released in v2.71.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants