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

data "ibm_function_package" "bridgepy" complains about Namespace #972

Closed
powellquiring opened this issue Dec 31, 2019 · 2 comments
Closed
Labels
service/Functions Issues related to Functions

Comments

@powellquiring
Copy link

Trying to use the function package as described here:
https://ibm-cloud.github.io/tf-ibm-docs/v0.21.0/d/function_package.html

I've also tried to create a function package:
https://ibm-cloud.github.io/tf-ibm-docs/v0.21.0/r/function_package.html

Both with similar results. Complaining about Namespace which I can not find a reference to in the docs.

(bridgepy) ~/github.com/powellquiring/bridgepy/functions $ cat main.tf
variable ibmcloud_api_key {}
variable resource_group_name {
  default = "default"
}

variable "ibmcloud_timeout" {
  description = "Timeout for API operations in seconds."
  default     = 900
}

variable region {
  default = "us-south"
}

provider ibm {
  region           = "${var.region}"
  ibmcloud_api_key = "${var.ibmcloud_api_key}"
  ibmcloud_timeout = "${var.ibmcloud_timeout}"
}


data "ibm_function_package" "bridgepy" {
  name = "acme_dev"
}

(bridgepy) ~/github.com/powellquiring/bridgepy/functions $ tfa
data.ibm_function_package.bridgepy: Refreshing state...

Error: Error refreshing state: 1 error occurred:
	* data.ibm_function_package.bridgepy: 1 error occurred:
	* data.ibm_function_package.bridgepy: data.ibm_function_package.bridgepy: Namespace is (), it must be of the form <org>_<space>, provider can't find the auth key if you use _ as well

Terraform Version

(bridgepy) ~/github.com/powellquiring/bridgepy/functions $ tf version
Terraform v0.11.14
+ provider.ibm v0.21.0

Your version of Terraform is out of date! The latest version
is 0.12.18. You can update by downloading from www.terraform.io/downloads.html

Expected Behavior

Docs to describe the Namespace. This also seems to be referencing cloud foundry org/space and functions also support the IAM.
The error message: Namespace is (), it must be of the form <org>_<space>, provider can't find the auth key if you use _ as well does not help me out.

I think the following needs to be done

  • Explain the need for function_namespace in the provider, include a link to the provider section
  • Change the error message to something like: The provider ibm must include a function_namespace argument and it must be in the format _ ...
  • Make the necessary changes to the docs to support IAM in addition to cloud foundry _.

Maybe the above are 3 different issues?

@hkantare
Copy link
Collaborator

hkantare commented Jan 2, 2020

For function provider argument function_namespace is a required parameter.
Presently we have support for org_space namespace..We don't have support yet for IAM support
We have feature request issues

#642

@kavya498 kavya498 added the service/Functions Issues related to Functions label Jul 2, 2021
@hkantare
Copy link
Collaborator

hkantare commented Dec 8, 2021

closing this issue since we support IAM based namespaces also now

@hkantare hkantare closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Functions Issues related to Functions
Projects
None yet
Development

No branches or pull requests

3 participants