Linode object storage like terraform backend

Hi

I'm using Linode object storage like a s3 backend for my Terraform project, until a few days ago I didn't have any problem. Now when I try to init the backend i get the follow error:

Terraform has detected that the configuration specified for the backend has changed. Terraform will now check for existing state in the backends. Initializing modules... ╷ │ Warning: Deprecated Parameter │ │ The parameter "endpoint" is deprecated. Use parameter "endpoints.s3" instead. ╵ ╷ │ Warning: Complete URL Expected │ │ The value should be a valid URL containing at least a scheme and hostname. Had "eu-central-1.linodeobjects.com". │ │ Using an incomplete URL, such as a hostname only, may work, but may have unexpected behavior. ╵ ╷ │ Warning: Deprecated Parameter │ │ on main.tf line 8, in terraform: │ 8: backend "s3" { │ │ The parameter "endpoint" is deprecated. Use parameter "endpoints.s3" instead. ╵ ╷ │ Warning: Complete URL Expected │ │ on main.tf line 8, in terraform: │ 8: backend "s3" { │ │ The value should be a valid URL containing at least a scheme and hostname. Had "eu-central-1.linodeobjects.com". │ │ Using an incomplete URL, such as a hostname only, may work, but may have unexpected behavior. ╵ ╷ │ Error: Retrieving AWS account details: AWS account ID not previously found and failed retrieving via all available methods. │ │ See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for workaround and implications. │ Errors: 2 errors occurred: │ * retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 3c788667-ef40-47b6-865c-a0d0455d9f65, api error InvalidClientTokenId: The security token included in the request is invalid. │ * retrieving account information via iam:ListRoles: operation error IAM: ListRoles, https response error StatusCode: 403, RequestID: 2fb26aa6-0581-4df2-8c24-653672c582e6, api error InvalidClientTokenId: The security token included in the request is invalid.

Is there anyone with some problem?

1 Reply

I tried to recreate this issue and wasn't able to. I want to start by saying that this could be related to a version of one of the tools you're using, so I'd start by figuring that out. Here is what mine looked like:

terraform -v
Terraform v1.6.4
on linux_amd64
+ provider registry.terraform.io/linode/linode v2.10.0

Next, I want to try to break down the different notifications you shared starting with the ones labeled as "Warnings". Firstly, these are likely not the reason that Terraform failed to init, and that's more likely the errors toward the bottom, which I'll come back to. That said, I did find others were having the same issues discussed on Github.

While I can see others had these issues, I compared some of these to my terraform.tfstate file, and it doesn't seem like the versions of Terraform or the Linode Terraform Provider I'm using are having this issue. For example, you saw a warning saying The parameter "endpoint" is deprecated. Use parameter "endpoints.s3" instead. but my configuration seems to use "endpoint" without any issues. This leads me to believe that the version of one of these tools that you're using may need to be updated, though I can't say for sure.


The actual errors you're seeing are likely the real issue, but it sounds like they related to the same configuration parameter.

Error: Retrieving AWS account details: AWS account ID not previously found and failed retrieving via all available methods. │ │ See https://www.terraform.io/docs/providers/aws/index.html#skip_requesting_account_id for workaround and implications. │

If you visit the provided link, you'll find a workaround, which is to set the parameter skip_requesting_account_id to true in your configuration.

Errors: 2 errors occurred: │ * retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 3c788667-ef40-47b6-865c-a0d0455d9f65, api error InvalidClientTokenId: The security token included in the request is invalid. │ * retrieving account information via iam:ListRoles: operation error IAM: ListRoles, https response error StatusCode: 403, RequestID: 2fb26aa6-0581-4df2-8c24-653672c582e6, api error InvalidClientTokenId: The security token included in the request is invalid.

While setting skip_requesting_account_id to true should resolve these as well, I wanted to note that I found an instance in github in which that function wasn't working as intended and these errors were still being seen. You can read through the comments there, but someone mentions that:

[Moving] from tf 1.6.0 to 1.6.4 and […] adding skip_requesting_account_id = true fix the issue for me.

skip_requesting_account_id = true was not recognized by tf 1.6.0

You can also see others chose to revert to older Terraform versions, so you can look into that option as well.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct