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

No way of interconnecting two ibm cloud functions #1526

Closed
itraveribon opened this issue Jun 4, 2020 · 3 comments
Closed

No way of interconnecting two ibm cloud functions #1526

itraveribon opened this issue Jun 4, 2020 · 3 comments
Assignees

Comments

@itraveribon
Copy link

Hi there,

I am trying to make an IBM cloud function A to call another function B. For that, I have to give the URL of B as input parameter to the function A. However, I was not able to find a way to get this URL. In the UI of IBM Cloud this URL can be found under Cloud Functions / Actions / <name_of_function> / Endpoints. In this page we can see a box called REST API. Is there anyway to get this data (the URL and the API-Key) in terraform?

Terraform Version

v0.12.25

Affected Resource(s)

Please list the resources as a list, for example:

  • ibm_function_action

Terraform Configuration Files

Here I leave an example of I would like to do but I do not find the way:

resource "ibm_function_action" "B" {
  name = "${ibm_function_package.package.name}/${var.actionName}"

  exec {
    kind = "itraveribon/ibmcloud"
    image = file("function_b.py")
  }
}

resource "ibm_function_action" "A" {
  name = "${ibm_function_package.package.name}/${var.actionName}"

  exec {
    kind = "itraveribon/ibmcloud"
    image = file("function_a.py")
  }
user_defined_parameters = <<EOF
  [
    {
        "key": "function_b_url",
        "value":"${ibm_function_action.B.??URL??}"
    },
 ]
  EOF
}
@movinglightspeed
Copy link

@hkantare Will there be a way to get an output of cloud functions endpoint url in terraform?

@anilkumarnagaraj anilkumarnagaraj self-assigned this Aug 6, 2020
@anilkumarnagaraj
Copy link
Collaborator

anilkumarnagaraj commented Aug 6, 2020

Currently, Terraform doesn't provide an endpoint URL for the actions. In our next release, we will provide support for generating an action endpoint URL.

@hkantare
Copy link
Collaborator

hkantare commented Oct 7, 2020

Now we exposed the target_endpoint_url attribute
https://cloud.ibm.com/docs/terraform?topic=terraform-function-resources#fn-action-output

Avaialble in latest releases v1.12.0 , 1.13.0

@hkantare hkantare closed this as completed Oct 7, 2020
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

4 participants