I’ve been upgrading my terraform config from 0.11 to 0.13 as well as removing a module from the state file (using terraform state rm module.mymodulename).
After removing the resource above I am now running into a whole host of errors when running a plan command. Now I’m not too sure if it’s related to me removing the module or if it’s linked to the upgrade. I can see that the placement_strategy attribute has been deprecated for aws_ecs_service and I’m a bit stumped on how to safely remove it from the state file.
Placement_strategy isn’t something that I’ve defined in the resource and is just a default from the earlier version.
Anyone any advice on how to tackle the issues below? I need to get this back up and running as it’s for our development environment. I’m leaning towards removing the resource “aws_ecs_service” “myappadmin-service” and importing it again.
terraform plan
Error: Invalid resource instance data in state
on ecs-instance-role.tf line 23:
23: resource "aws_iam_instance_profile" "ecs-instance-profile" {
Instance aws_iam_instance_profile.ecs-instance-profile data could not be
decoded from the state: unsupported attribute "roles".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".
Error: Invalid resource instance data in state
on modules\myappadmin\service.tf line 1:
1: resource "aws_ecs_service" "myappadmin-service" {
Instance module.myappadmin.aws_ecs_service.myappadmin-service data could not be
decoded from the state: unsupported attribute "placement_strategy".