Giter VIP home page Giter VIP logo

Comments (5)

vasilij-icabbi avatar vasilij-icabbi commented on August 15, 2024 1

Hello @remilapeyre , Thank you for your reply, that helped and I confirm that it works as intended, I can write into KV and read from it too.

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

Hi @vasilij-icabbi, if I understand correctly your question, this will depend on the resources and data-sources you want to use and the ACL configuration of your cluster.

I would start with a token with all privileges removed and add them as you need them. If you want to know which ACL is needed for a given resource, you can look at the "ACL Required" in the corresponding Consul HTTP API documentation.

Does this answer your question?

from terraform-provider-consul.

vasilij-icabbi avatar vasilij-icabbi commented on August 15, 2024

@remilapeyre Thank you for your reply. I use Consul provider for configuration only, so it needed only for KV storage.

I created policy with rule:

{
  "Name": "terraform-token",
  "Description": "Terraform Token Policy",
  "Rules": "key_prefix \"\" { policy = \"write\" }"
}

Created token, assigned policy with role above and provided it to terraform consul provider. And here it fails with 403.

Either I do something wrong or either consul provider does some API calls and requires more policy rules to function proper, this is why I ask if there are any minimal rules I have to set?

Worth to mention that my Consul ACL policy is deny by default.

from terraform-provider-consul.

vasilij-icabbi avatar vasilij-icabbi commented on August 15, 2024

Hello,
just checking if anyone can help me here?

from terraform-provider-consul.

remilapeyre avatar remilapeyre commented on August 15, 2024

Hi @vasilij-icabbi, thanks for the ping.

Terraform currently needs to read the configuration of the agent to know which datacenter it is connected to. Can you confirm that it works with this policy?

{
  "Name": "terraform-token",
  "Description": "Terraform Token Policy",
  "Rules": "key_prefix \"\" { policy = \"write\" } agent_prefix \"\" { policy = \"read\" }"
}

If so I will look into removing this restriction.

from terraform-provider-consul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.