Skip to content
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

unable to get org id #29

Closed
lakamsani opened this issue Feb 15, 2018 · 2 comments
Closed

unable to get org id #29

lakamsani opened this issue Feb 15, 2018 · 2 comments

Comments

@lakamsani
Copy link

lakamsani commented Feb 15, 2018

Using code like this:

data "cf_org" "myorg" {
  name = "${var.org_name}"
}

output "org_id" {
  value = "${cf_org.myorg.id}"
}

terraform plan triggers an error on the cf_org.myorg.id line:

Error: output 'org_id': unknown resource 'cf_org.myorg' referenced in variable cf_org.myorg.id

What can be fixed to make this work?

A second question is related to vars that collect passwords like:

variable "password" {
  description = "IBM Cloud Password"
  type = "string"
}

When terraform plan is run, and user is typing the password it shows it in clear text. Is there a type setting that can be used to mask the password with say *****?

@psycofdj
Copy link
Member

psycofdj commented Feb 15, 2018

Try the following:

data "cf_org" "myorg" {
  name = "${var.org_name}"
}

output "org_id" {
  value = "${data.cf_org.myorg.id}"
}

For password input, you can use variable files

@lakamsani
Copy link
Author

That works. Thanks.

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

No branches or pull requests

2 participants