copyright | lastupdated | ||
---|---|---|---|
|
2024-05-16 |
Customer-facing documentation: https://cloud.ibm.com/docs/terraform
Documentation repository for ibm-cloud-provider-for-terraform
copyright | lastupdated | ||
---|---|---|---|
|
2024-05-16 |
Customer-facing documentation: https://cloud.ibm.com/docs/terraform
I noticed the error below when I ran "terraform plan". I had no issue on "terraform init"
Can anyone guide me what should I modify?
Error: Error occured while fetching account user details: "token contains an invalid number of segments"
│
│ with data.ibm_is_image.centos,
│ on vpc.tf line 37, in data "ibm_is_image" "centos":
│ 37: data ibm_is_image "centos" {
│
╵
╷
│ Error: Error occured while fetching account user details: "token contains an invalid number of segments"
│
│ with data.ibm_is_ssh_key.ssh_key_id,
│ on vpc.tf line 41, in data "ibm_is_ssh_key" "ssh_key_id":
│ 41: data ibm_is_ssh_key "ssh_key_id" {
│
Hello,
I am not a developer but have modified terraform code in the past. Therefore I wanted to execute the procedure from scratch.
Step2- point1 It would be nice to suggest a file name e.g. kubernetes.tf
Not clear if we create either Kubernetes or ROKS or both
Point 2: terraform init worked
Point 3: terraform plan throws errors
Gets the following errors: Can you provide a sample config where you only define the API-Key by an env variable and then have a configuration that works.
Warning: Value for undeclared variable
│
│ The root module does not declare a variable named "ibmcloud_api_key" but a
│ value was found in file "terraform.tfvars". If you meant to use this value,
│ add a "variable" block to the configuration.
│
│ To silence these warnings, use TF_VAR_... environment variables to provide
│ certain "global" settings to all configurations in your organization. To
│ reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Error: ibmcloud_api_key or bluemix_api_key or iam_token and iam_refresh_token must be provided. Please see the documentation on how to configure it
│
│ with data.ibm_resource_group.resource_group,
│ on kub.tf line 1, in data "ibm_resource_group" "resource_group":
│ 1: data ibm_resource_group "resource_group" {
I will talk to a developer, propably this can be fixed but maybe we can support a newby by more detailed steps.
Happy to volunteer for trying it out.
The first volume example fails :
https://cloud.ibm.com/docs/terraform?topic=terraform-vpc-gen2-resources#volume-sample
resource "ibm_is_volume" "testacc_volume" {
name = "test_volume"
profile = "10iops-tier"
zone = "us-south-1"
iops = 10000
capacity = 100
}
The output result when trying to use this configuration is :
"Result": {
"errors": [
{
"code": "volume_profile_iops_invalid",
"message": "The volume profile specified in the request cannot accept custom IOPS.",
"more_info": "http://www.bluemix.com/help#volume_profile_iops_invalid",
"target": {
"name": "",
"type": ""
}
}
],
"trace": "d24e832407bb66c67ef776551c5bae6b"
},
Removing the iops
options from the definition allows the example to pass.
extra parameters in the docs for ibm_ob_monitoring are included in the documentation and should not be in there:
Customers are sometimes confused by the multiple support avenues provided in this page. If the issue is with an API call outside of Terraform, that would be an IBM Cloud support issue for which a support case can be opened. If the issue is with a Schematics job fails while running a Terraform apply, that too would be an IBM Cloud support issue for which a support case can be opened.
However, if the issue occurs when customer uses Terraform outside of Schematics, and the API calls in that Terraform apply work when run outside of Terraform, then the issue should be taken to the github space for the Terraform IBM Provider.
At the section ibm_is_floating_ip in VPC infrastructure resources, there is this typo:
For more information, see About floatig IP.
^
It is linked from the TOC
Currently we have the input parameter disable_public_service_endpoint
for resource ibm_container_vpc_cluster
documented as:
disable_public_service_endpoint - (Optional,Bool) Disable the public service endpoint to prevent public access to the master. Default Value 'true'.
The code, on the master branch, reveals the default is false:
"disable_public_service_endpoint": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Boolean value true if Public service endpoint to be disabled",
Docs must be aligned with the code.
Hi,
It appears vpc-subnet-input requires "identifier" though the document states its an optional. I'm getting below error.
Error: Missing required argument
on create-testnet-v2.tf line 16, in data "ibm_is_subnet" "subnet1":
16: data "ibm_is_subnet" "subnet1" { name = "${var.resource_group}-${var.zone}-sn" }
The argument "identifier" is required, but no definition was found.
Also, it would be really helpful to get the subnet information by name only. is that possible any other way for now?
https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-power-data-sources#power-instance lists addresses.externalip as an output parameter. With this terraform plan fails. I change to addresses.external_ip and terraform plan works.
I have noticed that "depend_on" needs to be added to avoid conflicting update error if a resource has different types of attachments.
For example, terraform code I used
resource "ibm_is_instance_volume_attachment" "iac_attach_app_volume" {
#depends_on = [ ibm_is_floating_ip.iac_test_floating_ip ]
count = var.home_fs_size > 0 ? 1 : 0
instance = ibm_is_instance.iac_test_instance.id
name = "${var.project_name}-${var.environment}-volume-01-att"
volume = ibm_is_volume.iac_app_volume[0].id
If the "depends_on" is not applied, the following error occurs when I tried to destroy it.
ibm_is_instance_volume_attachment.iac_attach_app_volume[0]: Destroying... [id=0717_1a3fbc00-807b-4d01-9590-814ccfb61a05/0717-abdd070e-f2bd-4a7f-8690-8a1702b9563c]
ibm_is_security_group_rule.iac_test_security_group_rule_tcp_ssh: Destroying... [id=r006-a7d3d85e-066b-45b5-931f-440d2bee64fb.r006-e444f91b-2a3f-4a94-bda8-38a8a783539f]
ibm_is_security_group_rule.iac_test_security_group_rule_all_outbound: Destruction complete after 2s
ibm_is_security_group_rule.iac_test_security_group_rule_tcp_ssh: Destruction complete after 3s
ibm_is_floating_ip.iac_test_floating_ip: Still destroying... [id=r006-a2fc0299-b709-4aad-baf2-36cdd051e015, 10s elapsed]
ibm_is_floating_ip.iac_test_floating_ip: Destruction complete after 12s
╷
│ Error: Error while deleting volume attachment (0717-abdd070e-f2bd-4a7f-8690-8a1702b9563c) from instance (0717_1a3fbc00-807b-4d01-9590-814ccfb61a05) : "Conflicting update of instance, please retry request"
│
I also discussed it to get an advise at "terraform-ibmcloud-users" slack channel.
Issue
Document states ibm_is_vpn_gateway_connection
resource variables local_cidrs
and peer_cidrs
are optional, but if you try to apply a GW connection without those variables, it fails to create resource.
Document: https://cloud.ibm.com/docs/terraform?topic=terraform-vpc-gen2-resources#vpn-gateway-connection
Error Message
Error: [DEBUG] Create VPN Gateway Connection err At least one local CIDR block is required when creating a VPN connection.
Steps to Recreate
resource "ibm_is_vpn_gateway_connection" "this" {
name = "vpn-gw-test"
admin_state_up = true
vpn_gateway = ibm_is_vpn_gateway.this.id
peer_address = var.peer_address
preshared_key = var.preshared_key
}
Expect
If its optional then it should create without error
this is an odd way to initialize a provider and does not specify a region.
Setting TF_LOG=debug is not recommended for normal use.
The example source code should not include the steps above. Instead add the following to the top fo the vpc.tf file:
variable ibmcloud_api_key {}
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = "us-south" # this could come from a variable as well, it will need to match the ZONE variable used
}
Then instruct the user to:
export TF_VAR_ibmcloud_api_key="VoeEd1231231234134123413"
There is an error in the page https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-sample_vpc_config where the environment variable IC_API_KEY
is incorrectly capitalized as IC_API_Key
everywhere it appears.
for version 0.13 you need not download any plugin
You can directly run your template
having this in versions.tf file
terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "1.11.2"
}
}
}
Place versions.tf and your template file under same directory
This tutorial now needs updating to take into account that Red Hat Openshift is now at version 4.X (i.e. 4.6). Also that Red Hat OpenShift on IBM Cloud is now a native service, and does not need to be provisioned within classic infrastrucure.
Hello, the instructions on this page (https://cloud.ibm.com/docs/terraform?topic=terraform-getting-started) will not work for the latest version of terraform. Instead, the entire zip file must be placed in a specific directory - not the unzipped version.
My personal installation is working, but I would suggest you revise the document to reflect the new process. Alternatively, it would be far simpler for users if you simply published the provider to the Terraform registry. Just a thought.
I'm not sure what this is supposed to mean or I'd submit a PR rather than an issue: In the IBM Cloud global network of location to host your highly available resources and service instances workload.
Sample script provided to create a VM does not work as item is no longer available:
Error: [ERROR] Error ordering virtual guest: SoftLayer_Exception_Order_Item_Unavailable: Debian GNU/Linux 8.x jessie/Stable - Minimal Install (64 bit) is not available as of 09/12/2020 (Item #(6195). (HTTP 500)
Does documentation need to be updated from Terraform v0.12.x to Terraform v0.13.x?
https://cloud.ibm.com/docs/terraform?topic=terraform-getting-started
Side note I had trouble installing and running the version from https://releases.hashicorp.com/terraform/
I ended up using brew install terraform
Hi have a big IBM customer requesting that sysdig be added to https://cloud.ibm.com/docs/terraform?topic=terraform-index-of-terraform-resources-and-data-sources
Would this be possible ?
The list of example add-ons for the ibm_container_addons
:
seems to include options that are applicable to IKS , and does not indicate that some, like knative
are not a supported add-on for ROKS:
https://cloud.ibm.com/docs/openshift?topic=openshift-managed-addons#adding-managed-add-ons
This was noted by a business partner trying to configure Knative for their ROKS cluster created with the terraform provider. They've switched to the OpenShift Serverless Operator.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.