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

azurerm imported resources have an empty resource_group_name #9072

Closed
carinadigital opened this issue Sep 27, 2016 · 2 comments
Closed

azurerm imported resources have an empty resource_group_name #9072

carinadigital opened this issue Sep 27, 2016 · 2 comments

Comments

@carinadigital
Copy link
Contributor

carinadigital commented Sep 27, 2016

Terraform Version

0.7.4

Affected Resource(s)

Confirmed the following resources but could be more:

  • azurerm_public_ip
  • azurerm_storage_account

Terraform Configuration Files

resource "azurerm_public_ip" "my-ip" {
  name                         = "my-ip"
  location                     = "uksouth"
  resource_group_name          = "dev"
  public_ip_address_allocation = "static"
}

Debug Output

-/+ azurerm_public_ip.my-ip
    fqdn:                         "" => "<computed>"
    ip_address:                   "[My IP Here]" => "<computed>"
    location:                     "uksouth" => "uksouth"
    name:                         "my-ip" => "my-ip"
    public_ip_address_allocation: "static" => "static"
    resource_group_name:          "" => "dev" (forces new resource)

Expected Behavior

The imported resource should have a resource_group_name

Actual Behavior

resource_group_name was empty.

Steps to Reproduce

  1. Create your azurerm resource via the gui.
  2. Use terraform to Import the resource.
  3. See that the terraform plan wants to re-create the resource because of the missing resource_group_name.

Important Factoids

In the two resources I have looked at resource_group_name is not set in the Read() functions.

@stack72
Copy link
Contributor

stack72 commented Oct 7, 2016

Closed via #9073

stack72 added a commit that referenced this issue Oct 7, 2016
provider/azurerm: set resource_group_name on resource import
@stack72 stack72 closed this as completed Oct 7, 2016
@ghost
Copy link

ghost commented Apr 21, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants