Rapha-Borges / oke-free

Uma maneira fácil de garantir seu próprio cluster Kubernetes gratuitamente e para sempre
GNU General Public License v3.0
891 stars 381 forks source link

Erro autenticação durante terraform destroy #3

Closed ennioferreirab closed 10 months ago

ennioferreirab commented 10 months ago

Eu iniciei o cluster com a config antiga , e precisei destruir. Durante o processo acabou o tempo de autenticação dando Not Allowed durante o processo.

Error: Error returned by Identity Service. Http Status Code: 401. Error Code: NotAuthenticated. Opc request id: ade6de0fe06933bfb1942c1a20029167/22DC4E628A4E11601C4E1852908D173B/27F6D47C931AEE08DE3F62034C3F1844. Message: The required information to complete authentication was not provided or was incorrect. │ Operation Name: GetCompartment │ Timestamp: 2024-01-13 15:30:42 +0000 GMT │ Client Version: Oracle-GoSDK/65.55.1 │ Request Endpoint: GET https://identity.us-ashburn-1.oci.oraclecloud.com/20160918/compartments/ocid1.compartment.oc1..aaaaaaaakhplsucdounyq5wabc2zh5bjxj6zxrleywb5qcixp5sgleqtydaa │ Troubleshooting Tips: See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_401__401_notauthenticated for more information about resolving this error. │ Also see https://docs.oracle.com/iaas/api/#/en/identity/20160918/Compartment/GetCompartment for details on this operation's requirements. │ To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details. │ If you are unable to resolve this Identity issue, please contact Oracle support and provide them this full error message. │

Mesmo renovando a autenticação não funcionou o terraform destroy.

Error: 403-NotAllowed, Deleting non active compartment or Listing active resources is not allowed. Compartment Id: ocid1.compartment.oc1..aaaaaaaakhplsucdounyq5wabc2zh5bjxj6zxrleywb5qcixp5sgleqtydaa │ Suggestion: Please retry or contact support for help with service: Identity Compartment │ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/identity_compartment │ API Reference: https://docs.oracle.com/iaas/api/#/en/identity/20160918/Compartment/DeleteCompartment │ Request Target: DELETE https://identity.us-ashburn-1.oci.oraclecloud.com/20160918/compartments/ocid1.compartment.oc1..aaaaaaaakhplsucdounyq5wabc2zh5bjxj6zxrleywb5qcixp5sgleqtydaa │ Provider version: 5.24.0, released on 2024-01-10. │ Service: Identity Compartment │ Operation Name: DeleteCompartment │ OPC request ID: 1cbcd0cf5cdff694ed6a1909c39963b7/C2BB3C70A037C3E9A562A03BB535A748/00D7E162378D111C1960E46541CBF7E8 │

tentando iniciar em outra pasta, clonando novamente o repo também não funcionou

Error: Error returned by Identity Service. Http Status Code: 409. Error Code: CompartmentAlreadyExists. Opc request id: 20a48953c88cfd117953a442d27ba187/F03D49332DA8C5C1BC1158D2F0DBB04B/B4CD4D3FAA16E6870187776A47C1FD5A. Message: Compartment 'k8s' already exists │ Operation Name: CreateCompartment │ Timestamp: 2024-01-13 15:37:04 +0000 GMT │ Client Version: Oracle-GoSDK/65.55.1 │ Request Endpoint: POST https://identity.us-ashburn-1.oci.oraclecloud.com/20160918/compartments │ Troubleshooting Tips: See https://docs.oracle.com/iaas/Content/API/References/apierrors.htm#apierrors_409__409_compartmentalreadyexists for more information about resolving this error. │ Also see https://docs.oracle.com/iaas/api/#/en/identity/20160918/Compartment/CreateCompartment for details on this operation's requirements. │ To get more info on the failing request, you can set OCI_GO_SDK_DEBUG env var to info or higher level to log the request/response details. │ If you are unable to resolve this Identity issue, please contact Oracle support and provide them this full error message. │ │ If you define a compartment resource in your configurations with │ the same name as an existing compartment with 'enable_delete' set to 'true', │ the compartment will no longer be automatically imported. │ If you intended to manage an existing compartment, use terraform import instead. │ │ with module.compartment.oci_identity_compartment._, │ on compartment/compartment.tf line 1, in resource "oci_identity_compartment" "_": │ 1: resource "oci_identity_compartment" "_" { │

se puderem dar uma luz

Rapha-Borges commented 10 months ago

Fala mano!! Você não está conseguindo criar os recursos novamente pq os mesmos já estão criados Error Code: CompartmentAlreadyExists.. Caso o terraform destroy não funcione, você pode tentar remover manualmente. Vou deixar na ordem que precisa seguir para deletar com sucesso. Lembrando de esperar deletar completamente um recurso, antes de seguir para o próximo.

Kubernetes Cluster Virtual Cloud Networks Compartments

Obs: Caso não apareça o Cluster ou a VPN para deletar, certifique que selecionou o Compartment certo k8s

image

ennioferreirab commented 10 months ago

problemas solucionados deletando os recursos e eguindo as alterações da https://github.com/Rapha-Borges/oke-free/issues/2 . Cluster Funcionando.