|
| 1 | +# Upgrade from v4.x to v5.x |
| 2 | + |
| 3 | +Please consult the `examples` directory for reference example configurations. If you find a bug, please open an issue with supporting configuration to reproduce. |
| 4 | + |
| 5 | +## List of backwards incompatible changes |
| 6 | + |
| 7 | +- Minimum supported version of Terraform AWS provider updated to `v6.19` to support the latest resources utilized |
| 8 | +- Minimum supported version of Terraform updated to `v1.10` (min supported version for ACM module used within this module) |
| 9 | +- The underlying `aws_security_group_rule` have been replaced with `aws_vpc_security_group_ingress_rule` and `aws_vpc_security_group_egress_rule` to allow for more flexibility in defining security group rules. |
| 10 | +- The attributes used to construct the container definition(s) have been changed from HCL's norm of `snake_case` to `camelCase` to match the AWS API. There currently isn't a [resource nor data source for the container definition](https://github.com/hashicorp/terraform-provider-aws/issues/17988), so one is constructed entirely from HCL in the `container-definition` sub-module. This definition is then rendered as JSON when presented to the task definition (or task set) APIs. Previously, the variable names used were `snake_case` and then internally converted to `camelCase`. However, this does not allow for [using the `container-definition` sub-module on its own](https://github.com/terraform-aws-modules/terraform-aws-ecs/issues/147) due to the mismatch between casing. Its probably going to trip a few folks up, but hopefully we'll remove this for a data source in the future. |
| 11 | +- `service.task_exec_ssm_param_arns` default of `["arn:aws:ssm:*:*:parameter/*"]` has been removed to prevent unintended permission grants. If you were relying on this default, you will need to explicitly set this variable in your configuration. |
| 12 | +- `service.task_exec_secret_arns` default of `["arn:aws:secretsmanager:*:*:secret:*"]` has been removed to prevent unintended permission grants. If you were relying on this default, you will need to explicitly set this variable in your configuration. |
| 13 | + |
| 14 | +## Additional changes |
| 15 | + |
| 16 | +### Added |
| 17 | + |
| 18 | +- Support for `region` argument to specify the AWS region for the resources created if different from the provider region. |
| 19 | + |
| 20 | +### Modified |
| 21 | + |
| 22 | +- The ALB module used within this module has been updated to `v10.2.0` |
| 23 | +- The ECS cluster and service modules used within this module have been updated to `v6.7.0` |
| 24 | +- The ACM module used within this module has been updated to `v6.1.1` |
| 25 | +- The EFS module used within this module has been updated to `v2.0.0` |
| 26 | +- Variable definitions now contain detailed object types in place of the previously used `any` type |
| 27 | + |
| 28 | +### Removed |
| 29 | + |
| 30 | +- None |
| 31 | + |
| 32 | +### Variable and output changes |
| 33 | + |
| 34 | +1. Removed variables: |
| 35 | + |
| 36 | + - `atlantis_gid` -> is now `atlantis.group_id` within the `atlantis` object variable |
| 37 | + - `atlantis_uid` -> is now `atlantis.user_id` within the `atlantis` object variable |
| 38 | + - `alb_https_default_action` -> replaced by `alb.https_default_action` within the `alb` object variable |
| 39 | + - `alb_subnets` -> replaced by `alb.subnet_ids` within the `alb` object variable |
| 40 | + - `service_subnets` -> replaced by `service.subnet_ids` within the `service` object variable |
| 41 | + - From the `alb` object variable: |
| 42 | + - `customer_owned_ipv4_pool` |
| 43 | + - `desync_mitigation_mode` |
| 44 | + - `dns_record_client_routing_policy` |
| 45 | + - `enable_tls_version_and_cipher_suite_headers` |
| 46 | + - `enable_xff_client_port` |
| 47 | + - `load_balancer_type` |
| 48 | + - `xff_header_processing_mode` |
| 49 | + - From the `service` object variable: |
| 50 | + - `ignore_task_definition_changes` |
| 51 | + - `alarms` |
| 52 | + - `deployment_controller` |
| 53 | + - `deployment_maximum_percent` - Atlantis only supports 1 running instance |
| 54 | + - `deployment_minimum_healthy_percent` - Atlantis only supports 1 running instance |
| 55 | + - `desired_count` - Atlantis only supports 1 running instance |
| 56 | + - `enable_execute_command` |
| 57 | + - `ordered_placement_strategy` |
| 58 | + - `placement_constraints` |
| 59 | + - `scheduling_strategy` |
| 60 | + - `service_connect_configuration` |
| 61 | + - `service_registries` |
| 62 | + - `container_definition_defaults` |
| 63 | + - `inference_accelerator` |
| 64 | + - `ipc_mode` |
| 65 | + - `pid_mode` |
| 66 | + - `task_definition_placement_constraints` |
| 67 | + - `proxy_configuration` |
| 68 | + - `skip_destroy` |
| 69 | + - `external_id` |
| 70 | + - `scale` |
| 71 | + - `force_delete` |
| 72 | + - `wait_until_stable` |
| 73 | + - `wait_until_stable_timeout` |
| 74 | + - `enable_autoscaling` |
| 75 | + - `autoscaling_min_capacity` |
| 76 | + - `autoscaling_max_capacity` |
| 77 | + - `autoscaling_policies` |
| 78 | + - `autoscaling_scheduled_actions` |
| 79 | + - From the `atlantis` object variable: |
| 80 | + - `essential` - now always true |
| 81 | + - `extra_hosts` |
| 82 | + - `interactive` |
| 83 | + - `links` |
| 84 | + - `pseudo_terminal` |
| 85 | + - `system_controls` |
| 86 | + - From the `efs` object variable: |
| 87 | + - `create_backup_policy` |
| 88 | + - `enable_backup_policy` |
| 89 | + - `create_replication_configuration` |
| 90 | + - `replication_configuration_destination` |
| 91 | + |
| 92 | +2. Renamed variables: |
| 93 | + |
| 94 | + - `cluster.settings` -> `cluster.setting` (singular) |
| 95 | + - `cluster.fargate_capacity_providers` -> replaced by `cluster.default_capacity_provider_strategy` |
| 96 | + |
| 97 | +3. Added variables: |
| 98 | + |
| 99 | + - `region` |
| 100 | + |
| 101 | +4. Removed outputs: |
| 102 | + |
| 103 | + - None |
| 104 | + |
| 105 | +5. Renamed outputs: |
| 106 | + |
| 107 | + - None |
| 108 | + |
| 109 | +6. Added outputs: |
| 110 | + |
| 111 | + - None |
| 112 | + |
| 113 | +## Upgrade Migrations |
| 114 | + |
| 115 | +### Diff of Before vs After |
| 116 | + |
| 117 | +```diff |
| 118 | + module "atlantis" { |
| 119 | + source = "terraform-aws-modules/atlantis/aws" |
| 120 | +- version = "4.4.1" |
| 121 | ++ version = "5.0.0" |
| 122 | + |
| 123 | +# Truncated for brevity, only the relevant changes shown |
| 124 | + |
| 125 | +- alb_subnets = module.vpc.public_subnets |
| 126 | +alb = { |
| 127 | ++ subnet_ids = module.vpc.public_subnets |
| 128 | + ... |
| 129 | +} |
| 130 | + |
| 131 | +- service_subnets = module.vpc.private_subnets |
| 132 | +service = { |
| 133 | ++ subnet_ids = module.vpc.private_subnets |
| 134 | + ... |
| 135 | +} |
| 136 | +``` |
| 137 | + |
| 138 | +### State Move Commands |
| 139 | + |
| 140 | +None - the security group rules will be replaced on apply due to the change from `aws_security_group_rule` to `aws_vpc_security_group_ingress_rule` and `aws_vpc_security_group_egress_rule` |
0 commit comments