62 lines
No EOL
1.8 KiB
HCL
62 lines
No EOL
1.8 KiB
HCL
# 1. Busca as Availability Domains disponíveis na região do deploy
|
|
data "oci_identity_availability_domains" "ads" {
|
|
compartment_id = var.tenancy_ocid
|
|
}
|
|
|
|
# Buscamos os dados da VCN existente para usar em referências
|
|
data "oci_core_vcn" "oke_vcn" {
|
|
vcn_id = var.vcn_id
|
|
}
|
|
|
|
# Consulta as opções oficiais do serviço OKE
|
|
data "oci_containerengine_node_pool_option" "oke_options" {
|
|
node_pool_option_id = "all"
|
|
compartment_id = var.tenancy_ocid
|
|
}
|
|
|
|
# Consulta as opções gerais do serviço OKE na região
|
|
data "oci_containerengine_cluster_option" "oke_options" {
|
|
cluster_option_id = "all"
|
|
compartment_id = var.tenancy_ocid # Pode ser o OCID do Tenancy
|
|
}
|
|
|
|
# Cria o arquivo kube.config para conexao ao cluster
|
|
data "oci_containerengine_cluster_kube_config" "cluster_kube_config" {
|
|
cluster_id = oci_containerengine_cluster.containerengine_cluster.id
|
|
}
|
|
|
|
# Busca o Internet Gateway (IGW) na VCN
|
|
data "oci_core_internet_gateways" "igws" {
|
|
compartment_id = data.oci_core_vcn.oke_vcn.compartment_id
|
|
vcn_id = data.oci_core_vcn.oke_vcn.id
|
|
}
|
|
|
|
# Busca o NAT Gateway (NGW) na VCN
|
|
data "oci_core_nat_gateways" "ngws" {
|
|
compartment_id = data.oci_core_vcn.oke_vcn.compartment_id
|
|
vcn_id = data.oci_core_vcn.oke_vcn.id
|
|
}
|
|
|
|
# Busca o Service Gateway (SGW) na VCN
|
|
data "oci_core_service_gateways" "sgws" {
|
|
compartment_id = data.oci_core_vcn.oke_vcn.compartment_id
|
|
vcn_id = data.oci_core_vcn.oke_vcn.id
|
|
}
|
|
|
|
# Busca a lista de serviços disponíveis na região atual
|
|
data "oci_core_services" "all_services" {
|
|
filter {
|
|
name = "name"
|
|
values = ["All .* Services In Oracle Services Network"]
|
|
regex = true
|
|
}
|
|
}
|
|
|
|
# Busca apenas o Object Storage (usado na rota PUBLIC conforme seu arquivo)
|
|
data "oci_core_services" "object_storage" {
|
|
filter {
|
|
name = "name"
|
|
values = [".*Object Storage"]
|
|
regex = true
|
|
}
|
|
} |