Skip to content

Add cloudstack_domain as a data source #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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}

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.

2 participants