You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/UPGRADE-3.0.md
+84-6Lines changed: 84 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
88
88
- None
89
89
90
90
-`virtual_cluster` sub-module
91
+
- None
91
92
92
93
6. Added outputs:
93
94
@@ -98,24 +99,101 @@ If you find a bug, please open an issue with supporting configuration to reprodu
98
99
- None
99
100
100
101
-`virtual_cluster` sub-module
102
+
- None
103
+
104
+
## Upgrade Migration
105
+
106
+
### Before v2.x Example
101
107
102
-
## Upgrade Migrations
108
+
```hcl
109
+
module "emr" {
110
+
source = "terraform-aws-modules/emr/aws"
111
+
version = "~> 2.0"
112
+
113
+
# Only the affected attributes are shown
114
+
115
+
bootstrap_action = {
116
+
example = {
117
+
name = "Just an example",
118
+
path = "file:/bin/echo",
119
+
args = ["Hello World!"]
120
+
}
121
+
}
122
+
}
123
+
```
103
124
104
-
Not applicable - there aren't any structural changes other than the security group rule changes noted above. A diff of before vs after would look identical.
125
+
### After v3.x Example
126
+
127
+
```hcl
128
+
module "emr" {
129
+
source = "terraform-aws-modules/emr/aws"
130
+
version = "~> 2.0"
131
+
132
+
# Only the affected attributes are shown
133
+
134
+
# Copy and paste from output to maintain backwards compatibility
135
+
# This was added by the AWS Redshift API and provider in v6.x
136
+
os_release_label = "2023.9.20251014.0"
137
+
138
+
bootstrap_action = [
139
+
{
140
+
name = "Just an example",
141
+
path = "file:/bin/echo",
142
+
args = ["Hello World!"]
143
+
}
144
+
]
145
+
}
146
+
```
105
147
106
148
### State Changes
107
149
108
150
Due to the change from `aws_security_group_rule` to `aws_vpc_security_group_ingress_rule` and `aws_vpc_security_group_egress_rule`, the following reference state changes are required to maintain the current security group rules. (Note: these are different resources so they cannot be moved with `terraform mv ...`)
109
151
152
+
#### Instance Group
153
+
110
154
```sh
155
+
# Master Security Group
156
+
terraform state rm 'module.emr_instance_group.aws_security_group_rule.master["default"]'
157
+
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.master["all-traffic"]''sg-xxx'
158
+
159
+
# Slave Security Group
111
160
terraform state rm 'module.emr_instance_group.aws_security_group_rule.slave["default"]'
112
-
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.this["default"]''sg-xxx'
161
+
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.slave["all-traffic"]''sg-xxx'
113
162
114
-
terraform state rm 'module.emr_instance_group.aws_security_group_rule.master["default"]'
115
-
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.this["default"]''sg-xxx'
163
+
# Service Security Group
164
+
terraform state rm 'module.emr_instance_group.aws_security_group_rule.service["master_9443_ingress"]'
165
+
terraform state import 'module.emr_instance_group.aws_vpc_security_group_ingress_rule.service["master_9443"]''sg-xxx'
166
+
167
+
terraform state rm 'module.emr_instance_group.aws_security_group_rule.service["master_9443_egress"]'
168
+
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.service["master_8443"]''sg-xxx'
169
+
170
+
terraform state rm 'module.emr_instance_group.aws_security_group_rule.service["core_task_8443_egress"]'
171
+
terraform state import 'module.emr_instance_group.aws_vpc_security_group_egress_rule.service["core_task_8443"]''sg-xxx'
172
+
```
173
+
174
+
#### Instance Fleet
175
+
176
+
```sh
177
+
# Master Security Group
178
+
terraform state rm 'module.emr_instance_fleet.aws_security_group_rule.master["default"]'
179
+
terraform state import 'module.emr_instance_fleet.aws_vpc_security_group_egress_rule.master["all-traffic"]''sg-xxx'
180
+
181
+
# Slave Security Group
182
+
terraform state rm 'module.emr_instance_fleet.aws_security_group_rule.slave["default"]'
183
+
terraform state import 'module.emr_instance_fleet.aws_vpc_security_group_egress_rule.slave["all-traffic"]''sg-xxx'
184
+
185
+
# Service Security Group
186
+
terraform state rm 'module.emr_instance_fleet.aws_security_group_rule.service["master_9443_ingress"]'
187
+
terraform state import 'module.emr_instance_fleet.aws_vpc_security_group_ingress_rule.service["master_9443"]''sg-xxx'
188
+
189
+
terraform state rm 'module.emr_instance_fleet.aws_security_group_rule.service["master_9443_egress"]'
190
+
terraform state import 'module.emr_instance_fleet.aws_vpc_security_group_egress_rule.service["master_8443"]''sg-xxx'
191
+
192
+
terraform state rm 'module.emr_instance_fleet.aws_security_group_rule.service["core_task_8443_egress"]'
193
+
terraform state import 'module.emr_instance_fleet.aws_vpc_security_group_egress_rule.service["core_task_8443"]''sg-xxx'
116
194
```
117
195
118
-
Serverless sub-module
196
+
#### Serverless sub-module
119
197
120
198
```sh
121
199
terraform state rm 'module.emr_serverless_spark.aws_security_group_rule.this["egress_all"]'
0 commit comments