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

Storage: Import Support #1816

Merged
merged 9 commits into from
Aug 30, 2018
Merged

Storage: Import Support #1816

merged 9 commits into from
Aug 30, 2018

Conversation

tombuildsstuff
Copy link
Contributor

@tombuildsstuff tombuildsstuff commented Aug 23, 2018

This PR is a dependency for #1746 - and adds support for Import to the Storage Resources. In order to do this the ID's need changing to contain all of the necessary information - which requires a state migration, and will require appropriate changelog comments.

  • Import support for azurerm_storage_blob
  • Import support for azurerm_storage_container
  • Import support for azurerm_storage_queue
  • Import support for azurerm_storage_table

Fixes #1302
Fixes #1554
Fixes #1830

@ghost ghost added size/XL and removed size/L labels Aug 23, 2018
```
$ acctests azurerm TestAccAzureRMStorageTable_basic
=== RUN   TestAccAzureRMStorageTable_basic
--- PASS: TestAccAzureRMStorageTable_basic (89.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	89.596s
```
@ghost ghost added size/XXL and removed size/XL labels Aug 24, 2018
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus the nit

segments := strings.Split(uri.Host, ".")
if len(segments) > 0 {
storageAccountName := segments[0]
// remove the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an unfinished comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - good spot, ta

segments := strings.Split(uri.Host, ".")
if len(segments) > 0 {
storageAccountName := segments[0]
// remove the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - good spot, ta

@tombuildsstuff tombuildsstuff changed the title [WIP] Storage: Import Support Storage: Import Support Aug 24, 2018
- Ensuring all the fields are set for the Blob and Container resources
- Removing the separate Exists functions
@tombuildsstuff
Copy link
Contributor Author

Ignoring a couple of expected test failures (to do with a change within Azure where encrypted storage accounts are now mandatory) - the tests pass:

screenshot 2018-08-30 at 13 36 29

@tombuildsstuff tombuildsstuff merged commit 7b94864 into master Aug 30, 2018
@tombuildsstuff tombuildsstuff deleted the storage-import branch August 30, 2018 12:38
tombuildsstuff added a commit that referenced this pull request Aug 30, 2018
torresdal pushed a commit to torresdal/terraform-provider-azurerm that referenced this pull request Aug 31, 2018
* Storage Blob: updating the ID to allow importing

* Storage Blob: Import support

* Storage Container: updating the ID

* Storage Container: support for import

* Including `blob` in the uri

* Storage Queue: fixing the id / supporting import

* Storage Table: fixing the ID / import support

```
$ acctests azurerm TestAccAzureRMStorageTable_basic
=== RUN   TestAccAzureRMStorageTable_basic
--- PASS: TestAccAzureRMStorageTable_basic (89.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	89.596s
```

* Removing an unused comment

* Setting the fields for the Blob/Container resources

- Ensuring all the fields are set for the Blob and Container resources
- Removing the separate Exists functions
torresdal pushed a commit to torresdal/terraform-provider-azurerm that referenced this pull request Aug 31, 2018
jbcom pushed a commit to platonic-io/terraform-provider-azurerm that referenced this pull request Sep 27, 2018
* timcurless/timcurless:
  Fixing issues with aadProfile server_app_secret always causing a new cluster
  Adding documentation updates
  Updating to include hashicorp#1845
  Authentication: registering all clients consistently (hashicorp#1845)
  Updating to include hashicorp#1843
  r/Logic App: ensuring parameters are strings prior to setting (hashicorp#1843)
  Updating to include hashicorp#1821
  linux_profile should be optional to align with API spec (hashicorp#1821)
  Updating to include hashicorp#1816
  Storage: Import Support (hashicorp#1816)
  Updating to include hashicorp#1835
  Allow azurerm_function_app to use upper case names in consumption plan (hashicorp#1835)
  formatting
@ghost
Copy link

ghost commented Mar 30, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

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