Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to init, S3 usage and Version Constraints #1

Open
uhlhosting opened this issue Feb 19, 2021 · 6 comments
Open

Unable to init, S3 usage and Version Constraints #1

uhlhosting opened this issue Feb 19, 2021 · 6 comments

Comments

@uhlhosting
Copy link

uhlhosting commented Feb 19, 2021

Hi,

I am wondering if this cannot work without the S3?

What am I missing here, what is it S3 used for?

terraform init

Initializing the backend...

Warning: Version constraints inside provider configuration blocks are deprecated

  on main.tf line 26, in provider "tls":
  26:   version = "~> 2.1"

Terraform 0.13 and earlier allowed provider version constraints inside the
provider configuration block, but that is now deprecated and will be removed
in a future version of Terraform. To silence this warning, move the provider
version constraint into the required_providers block.

(and 2 more similar warnings elsewhere)


Error: error configuring S3 Backend: no valid credential sources for S3 Backend found.

Please see https://www.terraform.io/docs/language/settings/backends/s3.html
for more information about providing credentials.

Error: NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Another thing it seems that this repository was deprecated, so thus will be his terraform?

[DEPRECATED] This provider was temporar fork of Telmate/proxmox, use that instead.

This provider is a fork of Telmate/proxmox, with some needed changes to make it available on Terraform Registry. Temporarily this was put on registry as well.

Please use Telmate/proxmox instead.
https://github.com/ondrejsika/terraform-provider-proxmox
@dy2k
Copy link
Owner

dy2k commented Feb 21, 2021

@uhlhosting sorry for the late reply. S3 is used for storing the terraform state, which is a one of the ways to do remote backends. You may delete the S3 backend in this block or change to your AWS profile if you would like to have the terraform state in S3 instead of local (by default). Kindly note that I didnt use object locking in which you may find it useful too. One thing I wanna mention as well is that the naming of some files and keys (e.g. inventory file name, key name) are accustomed to my environment. Please feel free to change it to your own favorite naming or enhance it to use more general ones.

Terraform 0.13 has brought about big changes in the provider hierarchical structure and Terraform Registry. As far as I remember I was using 0.12 at that moment (my active development in May 2020). You may try to download and use older Terraform CLI version for it to work. Pull request to make it compatible to newer Terraform verison is also welcomed. I may upgrade this repo to use newer Terraform Registry and Terraform CLI some time later when I am free. (Sorry that this is just my experimental project to learn about Proxmox, Kubernetes, Terraform, Ansible back in 2020, and didn't expect people would really see this or use it for production)

@uhlhosting
Copy link
Author

@dy2k there is an increase in automation @ proxmox, and I am sure people would had used your repo if they knew about it. I have already a working deployment automated via Terraform for Proxmox, yet it is based on QEMU Images, will like to build one based on LXC containers. Would be greatly appreciated if you would take some of your time to update the repository. I could even add it into my next blog post about the automation of K8s on Proxmox. So you say I should just try an older terraform for the above errors, will give it a try and give feedback.

@zopz
Copy link

zopz commented Mar 9, 2022

The warnings can be safely ignored, I've gotten it running with the same provider versions just this week. I did upgrade to Telmate/proxmox - will put a PR for that soon. The issue here though appears to be that you simply don't have AWS credentials configured for your local, per the Error: error configuring S3 Backend: no valid credential sources for S3 Backend found. warning

You can either aws configure see here

Or adjust the backend block to use a local state (not recommended) https://www.terraform.io/language/settings/backends/local

@zopz
Copy link

zopz commented Mar 9, 2022

Also, to clarify, I am running Terraform v1.1.5 and I don't believe any adjustments were needed.

@zopz
Copy link

zopz commented Mar 9, 2022

And @dy2k this project is beautiful don't sell yourself short. I have a few notes (as I said, PR coming soon) but this got me so far with exactly what I was trying to do 😗 👌

@shanedf
Copy link

shanedf commented Apr 1, 2022

I can't wait to dive into trying this one out... Also wanted to mention that if you don't want to use S3 for your remote backend there are other options, including Terraform Cloud (which is free to a certain extent) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants