Skip to content

Conversation

ianc769
Copy link

@ianc769 ianc769 commented Jul 10, 2025

Adding cloudstack_domain as a data source:

data "cloudstack_domain" "foo" {
  filter {
    value = "name"
    name = "ROOT"
  }
}

output "domain_id" {
  value = data.cloudstack_domain.foo.id
}
output "domain_name" {
  value = data.cloudstack_domain.foo.name
}
output "network_domain" {
  value = data.cloudstack_domain.foo.network_domain
}
output "parent_domain_id" {
  value = data.cloudstack_domain.foo.parent_domain_id
}
data.cloudstack_domain.foo: Reading...
data.cloudstack_domain.foo: Read complete after 0s [id=65c9befb-1a1c-11f0-85c0-460f7764ea25]

Changes to Outputs:
  + domain_id        = "65c9befb-1a1c-11f0-85c0-460f7764ea25"
  + domain_name      = "ROOT"
  + network_domain   = ""
  + parent_domain_id = ""

You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.
{7DB24F15-D08F-4039-91E1-08A4CE85F3A1}

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm. Didn't test.

@vishesh92 vishesh92 closed this Aug 26, 2025
@vishesh92 vishesh92 reopened this Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants