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

Cannot enable private environment for Composer v2 after v7.14.0 #2387

Open
sstiglitz opened this issue Sep 17, 2024 · 1 comment
Open

Cannot enable private environment for Composer v2 after v7.14.0 #2387

sstiglitz opened this issue Sep 17, 2024 · 1 comment
Labels
awaiting-feedback Blocked on input from the author impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec

Comments

@sstiglitz
Copy link

Describe what happened

When setting enable_private_environment=True on a Composer v2 environment, it throws an error stating it can only be used on a Composer v3 environment.

When using pulumi-gcp>=7.7.0,<=7.11.2, this setting can be used on a Composer v2 environment. And it works as intended, I have created multiple Composer v2 environments with this setting enabled.

Only after I upgrade to pulumi-gcp>=7.14.0,<=8.1.0 does this throw an error. I checked the most recent version 8.1.0 and still throws this error.

Sample program

import pulumi_gcp as gcp
from iac.infra.gcp.providers import my_gcp_provider
from pulumi import ResourceOptions



gcp.composer.Environment(
    "test-composer",
    config=gcp.composer.EnvironmentConfigArgs(
        enable_private_environment=True,
        private_environment_config=gcp.composer.EnvironmentConfigPrivateEnvironmentConfigArgs(
            enable_private_endpoint=True,
        ),
        environment_size="ENVIRONMENT_SIZE_SMALL",
        software_config=gcp.composer.EnvironmentConfigSoftwareConfigArgs(
            image_version="composer-2.8.1-airflow-2.7.3",

        ),
    ),
    opts=ResourceOptions(provider=my_gcp_provider),
)

Log output

$ pulumi up
Previewing update (removed)

     Type                         Name                    Plan       Info
     pulumi:pulumi:Stack          my-project-my-stack             1 error; 3 warnings
 +   └─ gcp:composer:Environment  test-composer           create     1 error

Diagnostics:
  gcp:composer:Environment (test-composer):
    error: Preview failed: diffing urn:pulumi:my-stack::my-project::gcp:composer/environment:Environment::test-composer: error in configuration, config.0.enable_private_environment should only be used in Composer 3

Affected Resource(s)

No response

Output of pulumi about

$ pulumi about

CLI          
Version      3.132.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.52.0
resource  aws-native  0.123.0
resource  gcp         7.14.0
language  python      unknown

Host     
OS       arch
Version  "rolling"
Arch     x86_64

This project is written in python: executable='~/dev/iac/.venv/bin/python' version='3.12.5'

Current Stack: removed

TYPE                                                          URN
removed


Found no pending operations associated with removed

Backend        
Name           pulumi.com
URL            removed
User           removed
Organizations  removed
Token type     personal

Dependencies:
NAME               VERSION
ansible            10.4.0
boto3              1.35.20
botocore-stubs     1.35.20
mypy               1.11.2
pip                24.2
pre-commit         3.8.0
pulumi_aws         6.52.0
pulumi_aws_native  0.123.0
pulumi_gcp         7.14.0
pytest-mock        3.14.0
responses          0.25.3
setuptools         75.1.0

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

@sstiglitz sstiglitz added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 17, 2024
@iwahbe
Copy link
Member

iwahbe commented Sep 18, 2024

Hi @sstiglitz. I'm sorry to hear that.

I think that this change was introduced in GoogleCloudPlatform/magic-modules#9917 and is by design. My understanding is that enable_private_environment=True wasn't ever valid for Composer v2, but I'm not super familiar with composer so I could be wrong here.

@iwahbe iwahbe added awaiting-feedback Blocked on input from the author impact/regression Something that used to work, but is now broken and removed needs-triage Needs attention from the triage team labels Sep 18, 2024
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 impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants