Opsworks Not Accepting new Customers. How to ignore these resources

As we know Opsworks has reached EOL or EOS and I launched some resources using terraform for terraform.

And now I am getting this error for this:

│ Error: reading OpsWorks Layer (a59d4b18-5597-46fa-81a8-0fe43f070438): AccessDeniedException: AWS OpsWorks Stacks is no longer accepting new customers
│ status code: 400, request id: d8619a6b-c46b-47e2-92f9-2afbc37e2258

I Tried:

  1. Removed the opsworks-related resource from the source folder.
  2. Tried adding a lifecycle
  3. Tried “Refresh State” in terraform cloud

lifecycle {
ignore_changes = all
}

Both of these changes had no effect and still got the same error.

Any idea what can be done to fix this?

Hi @oliver.paul,

From what you’ve shared it seems like the OpsWorks API has started responding to the request to read an OpsWorks layer with an “access denied” error, which the Terraform AWS provider then returns and that blocks you from planning.

If these objects can no longer even be read from the API then unfortunately the only option I can think of is to tell Terraform to forget that these objects exist, using the terraform state rm command, and then delete them manually in the AWS console if they still exist there.

Hi @apparentlymart

Thanks for the info. I could not delete the resource as AWS removed all the stacks. I tried the “terraform rm” and it worked.

Thanks for the response.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.