Giter VIP home page Giter VIP logo

Comments (9)

sean1588 avatar sean1588 commented on May 29, 2024 1

Here is a list of resources for aws, gcp, azure, that contain examples affected by this. I updated this to show [resource]: [pageviews].

// pulumi-aws
[
  {
    "aws:ecs/service:Service": 2326
  },
  {
    "aws:ec2/launchTemplate:LaunchTemplate": 2208
  },
  {
    "aws:eks/nodeGroup:NodeGroup": 1550
  },
  {
    "aws:elasticache/cluster:Cluster": 1027
  },
  {
    "aws:secretsmanager/secretVersion:SecretVersion": 700
  },
  {
    "aws:lambda/invocation:Invocation": 484
  },
  {
    "aws:apigateway/domainName:DomainName": 346
  },
  {
    "aws:cloudfront/function:Function": 282
  },
  {
    "aws:ssoadmin/permissionSet:PermissionSet": 204
  },
  {
    "aws:wafv2/webAclLoggingConfiguration:WebAclLoggingConfiguration": 199
  },
  {
    "aws:apigateway/basePathMapping:BasePathMapping": 189
  },
  {
    "aws:ssoadmin/accountAssignment:AccountAssignment": 185
  },
  {
    "aws:identitystore/user:User": 170
  },
  {
    "aws:apigatewayv2/deployment:Deployment": 157
  },
  {
    "aws:autoscaling/tag:Tag": 145
  },
  {
    "aws:ssoadmin/managedPolicyAttachment:ManagedPolicyAttachment": 103
  },
  {
    "aws:identitystore/group:Group": 82
  },
  {
    "aws:imagebuilder/component:Component": 77
  },
  {
    "aws:ssoadmin/customerManagedPolicyAttachment:CustomerManagedPolicyAttachment": 76
  },
  {
    "aws:ssoadmin/permissionSetInlinePolicy:PermissionSetInlinePolicy": 65
  },
  {
    "aws:ec2/vpcIpam:VpcIpam": 60
  },
  {
    "aws:datasync/agent:Agent": 57
  },
  {
    "aws:identitystore/groupMembership:GroupMembership": 55
  },
  {
    "aws:networkmanager/siteToSiteVpnAttachment:SiteToSiteVpnAttachment": 35
  },
  {
    "aws:autoscalingplans/scalingPlan:ScalingPlan": 28
  },
  {
    "aws:ssoadmin/permissionsBoundaryAttachment:PermissionsBoundaryAttachment": 27
  },
  {
    "aws:ssoadmin/instanceAccessControlAttributes:InstanceAccessControlAttributes": 24
  },
  {
    "aws:cognito/identityPoolProviderPrincipalTag:IdentityPoolProviderPrincipalTag": 17
  },
  {
    "aws:transfer/certificate:Certificate": 16
  },
  {
    "aws:controltower/landingZone:LandingZone": 14
  },
  {
    "aws:ssoadmin/application:Application": 14
  },
  {
    "aws:sagemaker/modelPackageGroupPolicy:ModelPackageGroupPolicy": 11
  }
]

// pulumi-gcp
[
  {
    "gcp:compute/managedSslCertificate:ManagedSslCertificate": 162
  },
  {
    "gcp:firebase/webApp:WebApp": 141
  },
  {
    "gcp:compute/mangedSslCertificate:MangedSslCertificate": 15
  }
]

// pulumi-azure
[
  {
    "azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert": 63
  },
  {
    "azure:automation/runBook:RunBook": 60
  },
  {
    "azure:core/resourceGroupTemplateDeployment:ResourceGroupTemplateDeployment": 19
  }
]

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024 1

Debugging it a bit on that example.

t0yv0@Antons-MacBook-Pro> pulumi convert --from terraform --language pcl --out ./pcl --strict                                                                                                ~/tmp/2024/03/pu-15589
Converting from terraform...
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:27,30-99: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:28,30-101: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:29,30-106: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:30,30-101: Function not yet implemented; Function lookup not yet implemented
Converting to pcl...
t0yv0@Antons-MacBook-Pro> pulumi convert --from terraform --language pcl --out ./pcl                                                                                                         ~/tmp/2024/03/pu-15589
Converting from terraform...
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:27,30-99: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:28,30-101: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:29,30-106: Function not yet implemented; Function lookup not yet implemented
warning: /Users/t0yv0/tmp/2024/03/pu-15589/input.tf:30,30-101: Function not yet implemented; Function lookup not yet implemented
Converting to pcl...

--strict does not help here, but we can turn these warnings into errors in a post-processing step in the bridge. Let me try that and see what it produces.

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024 1

Trying this pulumi/pulumi-terraform-bridge#1733 which looks promising on GCP.

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024 1

May consider but landed pulumi/pulumi-terraform-bridge#1732 for now it doesn't seem too bad.

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024

@iwahbe thank you for calling attention to this code-generation phenomenon.

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024

https://github.com/hashicorp/terraform-provider-google-beta/blob/master/website/docs/r/firebase_web_app.html.markdown?plain=1#L30 has some HCL example for "gcp:firebase/webApp:WebApp"

Which results in:
https://github.com/pulumi/pulumi-gcp/blob/master/sdk/python/pulumi_gcp/firebase/web_app.py#L282

from pulumi.

t0yv0 avatar t0yv0 commented on May 29, 2024

Quick recap:

hcl --> pcl --> {py, ts, etc}

Looks like hcl->pcl introduces nyi (not yet implemented) nodes and warns about them.

Curiosity: the second phase of the conversion may generate warnings or errors when translating these nodes to the target language.

https://github.com/pulumi/pulumi/blob/master/pkg/codegen/nodejs/gen_program.go#L1276 Error
https://github.com/pulumi/pulumi/blob/master/pkg/codegen/go/gen_program_expressions.go#L1023 Warning

What I am leaning toward is a fix scoped to only the bridge hcl --> pcl phase, that all it does it
takes those warnings produced by the terraform converter and promotes them to errors. Having an
error drops the example from api docs and schema equally, and generates error messages that can
later be subject to Metabase analytics.

There is one downside I could not quite find a good model or originator of these NYI messages so the
first version is using a regex to decide if a message is a NYI message or not, which can be a little
surprising for future maintainers.

from pulumi.

justinvp avatar justinvp commented on May 29, 2024

@Frassle, @Zaid-Ajaj, should we provide some option for the converter that @t0yv0 could set to make "not yet implemented" warnings be errors rather than warnings? Maybe even an envvar?

from pulumi.

justinvp avatar justinvp commented on May 29, 2024

Fixed in the bridge with pulumi/pulumi-terraform-bridge#1732

from pulumi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.