-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
resource_arm_dns_txt_record: switch dependency from riviera to azure-sdk-for-go #187
resource_arm_dns_txt_record: switch dependency from riviera to azure-sdk-for-go #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sebastus
Thanks for this PR - I've taken a look and left some comments in-line - but this is off to a good start :)
Thanks!
"etag": { | ||
Type: schema.TypeString, | ||
Computed: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as in the other PR - do we need to expose this field?
props := dns.RecordSetProperties{ | ||
Metadata: metadata, | ||
TTL: &ttl, | ||
TxtRecords: &records, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor could we merge this into the properties
object below?
} | ||
|
||
txtRecords = append(txtRecords, txtRecord) | ||
value := (*record.Value)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can there be more than one value here?
for i, v := range recordStrings { | ||
value := make([]string, 1) | ||
record := v.(map[string]interface{}) | ||
value[0] = record["value"].(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this is a single item, we can make this:
value := []string { record["value"].(string) }
if err != nil { | ||
return fmt.Errorf("Bad: GetTXTRecordSet: %s", err) | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be checking for a 404 above this, and then returning this error, rather than masking it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sebastus
Thanks for this contribution - due to changes within Azure detailed in #192 in order for us to merge this change in I've push a commit which contains fixes for the outstanding comments.
Your contribution is still included (and still credited to you), with the appropriate modifications. Feel free to ask about any of the changes.
Tests pass:
$ TF_ACC=1 envchain azurerm go test ./azurerm -v -timeout 120m -run TestAccAzureRMDnsTxt
=== RUN TestAccAzureRMDnsTxtRecord_importBasic
--- PASS: TestAccAzureRMDnsTxtRecord_importBasic (88.05s)
=== RUN TestAccAzureRMDnsTxtRecord_importWithTags
--- PASS: TestAccAzureRMDnsTxtRecord_importWithTags (85.44s)
=== RUN TestAccAzureRMDnsTxtRecord_basic
--- PASS: TestAccAzureRMDnsTxtRecord_basic (84.79s)
=== RUN TestAccAzureRMDnsTxtRecord_updateRecords
--- PASS: TestAccAzureRMDnsTxtRecord_updateRecords (82.33s)
=== RUN TestAccAzureRMDnsTxtRecord_withTags
--- PASS: TestAccAzureRMDnsTxtRecord_withTags (82.33s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 422.954s
Thanks!
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! |
No description provided.