Git Product home page Git Product logo

Comments (7)

jlamillan avatar jlamillan commented on July 19, 2024 2

FYI, I was able to reproduce what you are seeing by removing my user from the group that granted me rights to manage resources in my target compartment:

terraform apply
...
terraform creating local resources such as certs, tokens, etc.
....
Error applying plan:

1 error(s) occurred:

* module.vcn.oci_core_virtual_network.CompleteVCN: 1 error(s) occurred:

* oci_core_virtual_network.CompleteVCN: Status: 404; Code: NotAuthorizedOrNotFound; OPC Request ID: /OMITTED
; Message: Authorization failed or requested resource not found.

So, in terms of the prerequisites that are not called out in this project, you'd need to:

  1. Create a compartment e.g. kubernetes
  2. Create a group e.g. kubernetes-installer
  3. Create a Policy for the group e.g. Allow group kubernetes-installer to manage all-resources in compartment kubernetes
  4. Create a user
  5. Upload an API key for the user
  6. Add User to the kubernetes-installer group

from terraform-kubernetes-installer.

jlamillan avatar jlamillan commented on July 19, 2024

Craig,

This is most likely not a defect these scripts or this project. It looks like to me like either a authentication or authorization error with Oracle Cloud Infrastructure (formally BMC / Bare Metal Cloud).

Double check that the user / tenancy / compartment OCIDs. Also check that the user has permission to create artifacts in the tenancy / compartment and that you've uploaded your PEM public key to the user in the Console and you are using the PEM private key for the private_key_path for the provider.

from terraform-kubernetes-installer.

m0un10 avatar m0un10 commented on July 19, 2024

from terraform-kubernetes-installer.

jlamillan avatar jlamillan commented on July 19, 2024

When you say that "apply created other resources", do you mean resources in BMC in your compartment?

The scripts create a number of Terraform resources like certs, tokens, etc. Though, as far as I am aware, the first actual OCI resource that gets created is the CompleteVCN, which is what is failing for you:

* module.vcn.oci_core_virtual_network.CompleteVCN: 1 error(s) occurred:

* oci_core_virtual_network.CompleteVCN: Status: 404; Code: NotAuthorizedOrNotFound; OPC Request ID: /OMITTED; Message: Authorization failed or requested resource not found.

As a debug step to take the scripts out of the equation, you could use the OCI console to see if the scripts created any network or compute resources in the expected compartment. If it did not, you could try manually crating a Virtual Cloud Network resource.

from terraform-kubernetes-installer.

m0un10 avatar m0un10 commented on July 19, 2024

Perfect, thanks for that! I will try it out shortly.

from terraform-kubernetes-installer.

m0un10 avatar m0un10 commented on July 19, 2024

At first, I found that I didn't have permissions to add a new policy for a new kubernetes compartment e.g.
screenshot 2017-10-11 16 27 13
However, I later discovered that the root compartment OCID is that same as the tenancy OCID so when I set them the same, the "terraform apply" worked.

from terraform-kubernetes-installer.

jlamillan avatar jlamillan commented on July 19, 2024

Glad to hear!

from terraform-kubernetes-installer.

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.