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/cloudflare_record: handle import
for data
#1942
Conversation
Fixes the read method to pull from the remote API instead of the local configuration since on `Import`, the local configuration will be empty. Fixes #1714
acceptance tests all passing
|
@@ -198,15 +198,14 @@ func resourceCloudflareRecordRead(ctx context.Context, d *schema.ResourceData, m | |||
return diag.FromErr(err) | |||
} | |||
|
|||
data, dataOk := d.GetOk("data") |
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.
this is the crux of the bug; it would look in d.Get
for the value which on Import would never exist. this should have always pulled from the API anyway to ensure the remote was the source of truth, not the local files.
changelog detected ✅ |
This functionality has been released in v3.25.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Fixes the read method to pull from the remote API instead of the local configuration since on
Import
, the local configuration will be empty.Fixes #1714