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

Update to v5.x of terraform-provider-aws #28

Closed
wants to merge 4 commits into from
Closed

Update to v5.x of terraform-provider-aws #28

wants to merge 4 commits into from

Conversation

emilford
Copy link

@emilford emilford commented Aug 6, 2024

Switch this and dependent modules to the v5.x of the Terraform AWS provider to support the latest AWS features, like RDS' io2.

  • Use updated description attribute name

Per the documentation for resource/aws_elasticache_replication_group

Remove availability_zones, number_cache_clusters,
replication_group_description arguments from configurations as they no
longer exist. Use preferred_cache_cluster_azs, num_cache_clusters, and
description, respectively, instead.
  • Use db_name instead of name

Change name to db_name in configurations as name no longer exists.

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-5-upgrade#use-db_name-instead-of-name

  • Fix setting instance_size
│ Error: reading EC2 Instance Type: operation error EC2: DescribeInstanceTypes, https response error StatusCode: 400, RequestID: c975f413-b3d8-46e7-aad2-36dc1f38e063, api error InvalidInstanceType: The following supplied instance types do not exist: [2xlarge]
│
│   with module.production.module.redis_sidekiq[0].data.aws_ec2_instance_type.instance_attributes,
│   on .terraform/modules/production.redis_sidekiq/elasticache-redis/replication-group/main.tf line 226, in data "aws_ec2_instance_type" "instance_attributes":
│  226: data "aws_ec2_instance_type" "instance_attributes" {

Switch this and dependent modules to the v5.x of the Terraform AWS
provider to support the latest AWS features, like RDS' io2.

- Use updated `description` attribute name

Per the [documentation] for resource/aws_elasticache_replication_group

```
Remove availability_zones, number_cache_clusters,
replication_group_description arguments from configurations as they no
longer exist. Use preferred_cache_cluster_azs, num_cache_clusters, and
description, respectively, instead.
```

[documentation]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-5-upgrade#resourceaws_elasticache_replication_group

- Use `db_name` instead of `name`

Change name to db_name in configurations as name no longer exists.

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-5-upgrade#use-db_name-instead-of-name

- Fix setting `instance_size`

```
│ Error: reading EC2 Instance Type: operation error EC2: DescribeInstanceTypes, https response error StatusCode: 400, RequestID: c975f413-b3d8-46e7-aad2-36dc1f38e063, api error InvalidInstanceType: The following supplied instance types do not exist: [2xlarge]
│
│   with module.production.module.redis_sidekiq[0].data.aws_ec2_instance_type.instance_attributes,
│   on .terraform/modules/production.redis_sidekiq/elasticache-redis/replication-group/main.tf line 226, in data "aws_ec2_instance_type" "instance_attributes":
│  226: data "aws_ec2_instance_type" "instance_attributes" {
```
@emilford emilford requested a review from clarissalimab August 6, 2024 16:21
@emilford emilford requested a review from OlamideOl1 as a code owner August 6, 2024 16:21
@clarissalimab
Copy link
Contributor

I renamed this branch to avoid confusion with the tag v0.5.0 and reopened this PR: #34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants