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 list vpcs with ibm_is_vpcs_info #108

Open
kdelee opened this issue Oct 10, 2022 · 0 comments
Open

unable to list vpcs with ibm_is_vpcs_info #108

kdelee opened this issue Oct 10, 2022 · 0 comments

Comments

@kdelee
Copy link

kdelee commented Oct 10, 2022

I normall set IC_REGION and IC_API_KEY in my environment to use the ansible collection. When I try to use https://github.com/IBM-Cloud/ansible-collection-ibm/blob/master/plugins/modules/ibm_is_vpcs_info.py , with no arguments (because I have these two items set in my environmnet), I get an error

fatal: [localhost]: FAILED! => changed=false                                                                                                                  
  invocation:                                                                                                                                                 
    module_args:                                                               
      generation: 2                                                            
      ibmcloud_api_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER                                              
      region: eu-gb                                                                                                                                           
  msg: ''                                                                                                                                                                           
  rc: 1                                                                                   
  resource:                                                                               
    _name: ansible_20221010-120228                  
    _type: ibm_is_vpcs                                                                                                                                                                                            
    target: ibm_is_vpcs.ansible_20221010-120228                                                                                                                                                                   
  stderr: |2-                                                                                            
                                                                                                         
    Error: Unsupported argument                     
                                                                                                                                                                                                                  
      on ibm_is_vpcs_ansible_20221010-120228.tf line 2, in data "ibm_is_vpcs" "ansible_20221010-120228":                                                                                                          
       2:   region = "eu-gb"                        
                                                                                                                                                                                                                  
    An argument named "region" is not expected here.                                                     
                                                    
                                                                                                                                                                                                                  
    Error: Unsupported argument                                                                                                                                                                                   
                                                    
      on ibm_is_vpcs_ansible_20221010-120228.tf line 3, in data "ibm_is_vpcs" "ansible_20221010-120228":                                                                                                          
       3:   ibmcloud_api_key = "********"                                                                                                                                                                         
                                                                                                                                                                                                                  
    An argument named "ibmcloud_api_key" is not expected here.                                           
                                                                                                         
                                                                                                                                                                                                                  
    Error: Unsupported argument                                                                          
                                                                                                                                                                                                                  
      on ibm_is_vpcs_ansible_20221010-120228.tf line 4, in data "ibm_is_vpcs" "ansible_20221010-120228":                                                                                                          
       4:   generation = 2                                                                                                                                                                                        
                                                    
    An argument named "generation" is not expected here.                                                 
  stderr_lines: <omitted>                                                                                                                                                                                         
  stdout: |2-                                                                                                                                                                                                     
                                                                                                                                                                                                                  
    Warning: Argument is deprecated                                                                                                                                                                               
                                                                                                         
    The generation field is deprecated and will be removed after couple of                                                                                                                                        
    releases                                        
  stdout_lines: <omitted>

Looking at https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/service/vpc/data_source_ibm_is_vpcs.go it doesn't appear to be expecting any arguments

It seems like this ansible module is out of sync with what the terraform module expects.

I tried passing an empty dictionary to

instead of module.params and this worked, getting my list of vpcs as expected.

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

1 participant