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

CloudRun: Required attribute is not set #573

Closed
mszewczyk-ipwt opened this issue May 5, 2021 · 2 comments
Closed

CloudRun: Required attribute is not set #573

mszewczyk-ipwt opened this issue May 5, 2021 · 2 comments
Assignees
Labels
area/providers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@mszewczyk-ipwt
Copy link

mszewczyk-ipwt commented May 5, 2021

Required attribute is not set appears when ignore_changes is pointing to template.spec.containers[0].image

Expected behavior

Pulumi should perform the preview and show the differences.

Current behavior

When trying to do the preview, an existing resource of type gcp:cloudrun/service:Service throws following errors appear:

  gcp:cloudrun:Service (gcp-cloudrunservice-api):
    error: gcp:cloudrun/service:Service resource 'gcp-cloudrunservice-api' has a problem: Required attribute is not set. Examine values at 'Service.Template.Spec[0].Containers[0].Resources'.

or

  gcp:cloudrun:Service (gcp-cloudrunservice-api):
    error: gcp:cloudrun/service:Service resource 'gcp-cloudrunservice-api' has a problem: Required attribute is not set. Examine values at 'Service.Template.Spec[0].Containers[0].Ports'.

The point of the values is a complete random, sometimes it points to parameters that are set. This happens with Python, I did not try other languages.

Steps to reproduce

  1. Declare a sample CloudRun service with nest up to ServiceTemplateSpecContainerArgs and also:
    • image
    • ports
    • envs
  2. Deploy the resource with pulumi up
  3. Change image value
  4. Add ResourceOptions with ignore_changes set to template.spec.containers[0].image
  5. Deploy the resource again with pulumi up

Context (Environment)

I am using pulumi version 3.1.0 with plugins:

NAME    KIND      VERSION  SIZE    INSTALLED  LAST USED
docker  resource  3.0.0    41 MB   n/a        34 minutes ago
gcp     resource  5.2.0    104 MB  n/a        34 minutes ago
github  resource  4.0.0    40 MB   n/a        34 minutes ago

and python packages:

pulumi            3.1.0
pulumi-docker     3.0.0
pulumi-gcp        5.2.0
pulumi-github     4.0.0

Python version 3.9.2

Affected feature

Pulumi is used in CI/CD and also in setting up infrastructure. While dealing just with infrastructure bits I am not able to preview anything because Pulumi is throwing these kind of errors, when I remove ignore_changes option or point the option to some other resource property that is not being changed then everything is OK.
I need this option, because the tag of the image is acquired from environment variable in CI/CD and when env is not used then changes should affect anything that is being changed except the image part.

@mszewczyk-ipwt mszewczyk-ipwt added the kind/bug Some behavior is incorrect or out of spec label May 5, 2021
@mikhailshilkov mikhailshilkov added area/providers kind/bug Some behavior is incorrect or out of spec and removed kind/bug Some behavior is incorrect or out of spec labels May 6, 2021
@maxmoeschinger
Copy link

I am also having this issue. Has this ever been fixed?

@mjeffryes
Copy link
Member

As noted in #827 this appears to have been fixed.

@mjeffryes mjeffryes added the resolution/fixed This issue was fixed label Sep 25, 2024
@mjeffryes mjeffryes self-assigned this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/providers kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants