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

Provider configuration Error #456

Closed
1Four1Two opened this issue Jan 13, 2023 · 7 comments · Fixed by #476
Closed

Provider configuration Error #456

1Four1Two opened this issue Jan 13, 2023 · 7 comments · Fixed by #476
Assignees
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed
Milestone

Comments

@1Four1Two
Copy link

What happened?

After upgrading to 3.6.1 I get the following error. There have been no code changes apart from the version upgrade

error: could not validate provider configuration: 1 error occurred:
    * Attribute must be a single value, not a map

Rolling back to 3.6.0 fixes the error

Steps to reproduce

Create a provider and add it to a resource ie an Image

Expected Behavior

to be able to create a provider and attach it to a resaourceresource

Actual Behavior

error: could not validate provider configuration: 1 error occurred:
    * Attribute must be a single value, not a map

Output of pulumi about

No response

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).

@1Four1Two 1Four1Two added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 13, 2023
@guineveresaenger
Copy link
Contributor

hi @1Four1Two - I cannot reproduce this behavior without more context. Can you share a code snippet?

@guineveresaenger guineveresaenger added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Jan 14, 2023
@1Four1Two
Copy link
Author

1Four1Two commented Jan 15, 2023

@guineveresaenger
This is how I am creating the provider

        private static Provider createProvider(string name, Output<string> address, Output<string> username, Output<string> password,
            Output<string>? host, Resource? resource)
        {
            var auths = getRegistryAuthArgsList(address, username, password);
            var providerArgs = getProviderArgs(auths, host);

            if (resource == null) return new Provider(name, providerArgs);

            var resourceList = CustomResourceOption.CreateResourceList();
            resourceList.Add(resource);

            return new Provider(name, providerArgs, new CustomResourceOptions { DependsOn = resourceList });
        }


        private static List<ProviderRegistryAuthArgs> getRegistryAuthArgsList(Output<string> address, Output<string> username, Output<string> password)
        {
            var providerRegistryAuthArgs = getProviderRegistryAuthArgs(address, username, password);

            return new List<ProviderRegistryAuthArgs>
            {
                providerRegistryAuthArgs,
            };
        }


        private static ProviderRegistryAuthArgs getProviderRegistryAuthArgs(Output<string> address, Output<string> username, Output<string> password)
        {
            return new ProviderRegistryAuthArgs
            {
                Address = address,
                Username = username,
                Password = password
            };
        }

        private static ProviderArgs getProviderArgs(List<ProviderRegistryAuthArgs> auths, Output<string>? host)
        {
            return new ProviderArgs
            {
                RegistryAuth = auths,
                Host = host!,
            };
        }

Then I attach it to the Custom resource like this

    public void CreateProviderResourceOptions()
    {
        ProviderCustomResourceOptions = new CustomResourceOptions
        { DependsOn = Provider, Provider = Provider, Parent = Provider };
    }

Then add it to the resource I am creating

var network = Network.Get("default", networkId, options: ProviderCustomResourceOptions);

@iwahbe iwahbe removed the awaiting-feedback Blocked on input from the author label Jan 17, 2023
@iwahbe iwahbe added needs-repro Needs repro steps before it can be triaged or fixed impact/regression Something that used to work, but is now broken labels Jan 17, 2023
@guineveresaenger
Copy link
Contributor

Hi @1Four1Two - can you verify that you are on the latest version of pulumi/pulumi?

@1Four1Two
Copy link
Author

Pulumi 3.50.0
Pulumi Docker 3.6.0

If I go above thee versions I get the problem

@guineveresaenger
Copy link
Contributor

Thank you!
Apologies for keeping up with questions - is it possible that the name of your project is docker?
You may be running into pulumi/pulumi#3546.

If not, it looks like this is a bug in pulumi/pulumi-terraform-bridge.

We have pulumi/pulumi-terraform-bridge#651 open as well to help surface the key names for missing config values as well.

@1Four1Two
Copy link
Author

it has docker in the name of the project. Would that be a problem?

@Megasware128
Copy link

Megasware128 commented Mar 13, 2023

This is still a problem without docker in the name. Using provider 4.0 and Pulumi 3.57.1
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants