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

fix(netbox_prefix): attributes are not properly read #60

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

jeansebastienh
Copy link
Contributor

Hi,

After importing the resources, terraform plan want to update prefix, status and tags altough there are already set on netbox.

$ terraform import netbox_prefix.ip_10_47_3_0 2                                                                                                                               
netbox_prefix.ip_10_47_3_0: Importing from ID "2"...                                                                                                                                                                                          
netbox_prefix.ip_10_47_3_0: Import prepared!                                                                                                                                                                                                  
  Prepared netbox_prefix for import                                                                                                                                                                                                           
netbox_prefix.ip_10_47_3_0: Refreshing state... [id=2]                                                                                                                                                                                        
                                                                                                                                                                                                                                              
Import successful!                                                                                                                                                                                                                            
                                                                                                                                                                                                                                              
The resources that were imported are shown above. These resources are now in your Terraform state and will henceforth be managed by Terraform.
$ terraform plan
...
netbox_prefix.ip_10_47_3_0: Refreshing state... [id=2]
...

Terraform will perform the following actions:

  # netbox_prefix.ip_10_47_3_0 will be updated in-place
  ~ resource "netbox_prefix" "ip_10_47_3_0" {
      + description = "srr1dc2-is-gw-adm-vip"
        id          = "2"
      + prefix      = "10.47.3.0/24"
      + status      = "active"
      + tags        = [
          + "prefix_mobility_fabric",
        ]
        # (1 unchanged attribute hidden)

Expected plan should be empty.

@fbreckle
Copy link
Collaborator

I wasnt even aware that the prefix resource was missing tests. Thank you very much!

@fbreckle fbreckle merged commit 2e87a72 into e-breuninger:master Jul 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants