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

Unable to import DNS records using file #1040

Open
LaurensBosscher opened this issue Jan 15, 2025 · 1 comment
Open

Unable to import DNS records using file #1040

LaurensBosscher opened this issue Jan 15, 2025 · 1 comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec

Comments

@LaurensBosscher
Copy link

LaurensBosscher commented Jan 15, 2025

Describe what happened

  • Run: uv run pulumi import --file resources/helper/dns_records_output.json
  • Output:
cloudflare:index:Record (subdomain.domain.com):
    warning: One or more imported inputs failed to validate. This is almost certainly a bug in the `cloudflare` provider. The import will still proceed, but you will need to edit the generated code after copying it into your program.
    warning: cloudflare:index/record:Record resource 'subdomain.domain.com' has a problem: Invalid combination of arguments. "value": one of `content,data,value` must be specified. Examine values at 'subdomain.domain.com.value'.
    warning: cloudflare:index/record:Record resource 'subdomain.domain.com' has a problem: Invalid combination of arguments. "data": one of `content,data,value` must be specified. Examine values at 'subdomain.domain.com.data'.
    warning: cloudflare:index/record:Record resource 'subdomain.domain.com' has a problem: Invalid combination of arguments. "content": one of `content,data,value` must be specified. Examine values at 'subdomain.domain.com.content'.
  • Record is not imported and cannot be managed using Pulumi

Manually importing using:

uv run pulumi import cloudflare:index:Record subdomain.domain.com cfc952dsgfds3c74cad8479adfsgdf957/92dcsdfgdfga4sdgfdsg7c1ec56d331319

Works

Sample program

{
    "resources": [
        {
            "type": "cloudflare:index/record:Record",
            "name": "subdomain.domain.com",
            "id": "cfc952dsgfds3c74cad8479adfsgdf957/92dcsdfgdfga4sdgfdsg7c1ec56d331319"
        },
}

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

~/develop/savex/infrastructure/pulumi_savex (main)$uv run pulumi about
CLI          
Version      3.117.0
Go Version   go1.22.3
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.66.3
resource  cloudflare  5.47.0
language  python      unknown

Host     
OS       ubuntu
Version  22.04
Arch     x86_64

This project is written in python: executable='/home/laurens/develop/savex/infrastructure/pulumi_savex/.venv/bin/python3' version='3.12.8'

Current Stack: organization/investment_decision_support_system/SavexCapital

TYPE                            URN
pulumi:pulumi:Stack             urn:pulumi:SavexCapital::investment_decision_support_system::pulumi:pulumi:Stack::investment_decision_support_system-SavexCapital
pulumi:providers:cloudflare     urn:pulumi:SavexCapital::investment_decision_support_system::pulumi:providers:cloudflare::default_5_47_0


Found no pending operations associated with SavexCapital

Backend        
Name           SC-NB002
URL            s3://sandbox-pulumi-stack
User           laurens
Organizations  
Token type     personal

Dependencies:
NAME               VERSION
pulumi_aws         6.66.3
pulumi_cloudflare  5.47.0
requests           2.32.3

Pulumi locates its logs in /tmp by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@LaurensBosscher LaurensBosscher added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 15, 2025
@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Jan 16, 2025

Hey @LaurensBosscher, thanks for reporting the issue and sorry you've hit trouble here.

I have reproduced the conflict you reported. However, I was unable to reproduce the conflict-free pulumi import - I get an error with that command: Preview failed: Resource type 'cloudflare:index:Record' not found.. Correcting the type to cloudflare:index/record:Record gives me the same warning as with the json import.

The warning here seems to be a bit of a false positive though - I was able to continue with after it and the next pulumi up worked fine. Can you try that and see if it works?

@VenelinMartinov VenelinMartinov added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants