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 import of stream analytics jobs that have been created via Azure Portal #5522

Merged

Conversation

r0bnet
Copy link
Contributor

@r0bnet r0bnet commented Jan 25, 2020

Hey,

i found out that importing an existing Stream Analytics job that was created via the Portal didn't work. The reason was that a transformation object has a name property. It's used to read & update the transformation. Unfortunately it was called Transformation in this provider but Azure calls it main when you create the job in the portal.

In this PR i changed the name to be also main. In order to keep backward compatibility i'm reading the name of the transformation before updating it.

I tested the following:

  • Create a Job via Portal
    • Import it via TF (with PR changes)
    • Update it via TF (with PR changes)
  • Create a Job via the current 1.41.0 version of the provider
    • Import it via TF (with PR changes)
    • Update it via TF (with PR changes)

All tests completed without any error.

I also ran all acc tests for this resource successfully.

If you want me to add any further tests pls let me know.

…the portal does); enable import of not jobs which were not created in TF; keep backwards compatibility
@ghost ghost added the size/S label Jan 25, 2020
@katbyte katbyte added this to the v1.42.0 milestone Jan 25, 2020
@katbyte katbyte modified the milestones: v1.42.0, v1.43.0 Jan 27, 2020
@tombuildsstuff tombuildsstuff modified the milestones: v1.43.0, v1.44.0 Feb 4, 2020
@tombuildsstuff tombuildsstuff self-assigned this Feb 4, 2020
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@tombuildsstuff tombuildsstuff dismissed katbyte’s stale review February 10, 2020 08:07

dismissing since changes have been pushed

@tombuildsstuff
Copy link
Contributor

Tests pass:

Screenshot 2020-02-11 at 10 05 27

@tombuildsstuff tombuildsstuff merged commit 12d38a9 into hashicorp:master Feb 11, 2020
tombuildsstuff added a commit that referenced this pull request Feb 11, 2020
@ghost
Copy link

ghost commented Feb 12, 2020

This has been released in version 1.44.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.44.0"
}
# ... other configuration ...

@r0bnet r0bnet deleted the fix-stream-analytics-job-import branch March 1, 2020 14:04
@ghost
Copy link

ghost commented Mar 28, 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 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants