style(terraform): rename labels
This commit is contained in:
+8
-8
@@ -1,37 +1,37 @@
|
||||
## DATA SOURCES
|
||||
|
||||
data "ovh_cloud_instance_flavors" "catalog" {
|
||||
data "ovh_cloud_instance_flavors" "flavors" {
|
||||
service_name = var.ovh_service_name
|
||||
region = var.ovh_region
|
||||
}
|
||||
|
||||
data "ovh_cloud_instance_images" "catalog" {
|
||||
data "ovh_cloud_instance_images" "images" {
|
||||
service_name = var.ovh_service_name
|
||||
region = var.ovh_region
|
||||
}
|
||||
|
||||
## RESOURCES
|
||||
|
||||
resource "ovh_cloud_ssh_key" "deploy" {
|
||||
resource "ovh_cloud_ssh_key" "ansible" {
|
||||
service_name = var.ovh_service_name
|
||||
name = "ansible-key"
|
||||
public_key = var.ssh_public_key
|
||||
}
|
||||
|
||||
# Provision the d2-2 Public Cloud Instance
|
||||
resource "ovh_cloud_instance" "from_catalog" {
|
||||
resource "ovh_cloud_instance" "coolify" {
|
||||
service_name = var.ovh_service_name
|
||||
region = var.ovh_region
|
||||
name = var.project_name
|
||||
ssh_key_name = ovh_cloud_ssh_key.deploy.name
|
||||
ssh_key_name = ovh_cloud_ssh_key.ansible.name
|
||||
|
||||
flavor_id = one([
|
||||
for flavor in data.ovh_cloud_instance_flavors.catalog.flavors :
|
||||
for flavor in data.ovh_cloud_instance_flavors.flavors.flavors :
|
||||
flavor.id if flavor.name == "d2-2"
|
||||
])
|
||||
|
||||
image_id = one([
|
||||
for image in data.ovh_cloud_instance_images.catalog.images :
|
||||
for image in data.ovh_cloud_instance_images.images.images :
|
||||
image.id if image.name == "Debian 13"
|
||||
])
|
||||
|
||||
@@ -45,7 +45,7 @@ resource "ovh_cloud_instance" "from_catalog" {
|
||||
output "public_ip" {
|
||||
description = "The public IPv4 address of the provisioned OVHcloud VM"
|
||||
value = one(flatten([
|
||||
for net in ovh_cloud_instance.from_catalog.current_state.networks : [
|
||||
for net in ovh_cloud_instance.coolify.current_state.networks : [
|
||||
for addr in net.addresses : addr.ip
|
||||
if addr.type == "FIXED" && addr.version == 4
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user