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

EMR Cluster configurationsJSON not rendering language chooser #11470

Closed
t0yv0 opened this issue Apr 3, 2024 · 1 comment
Closed

EMR Cluster configurationsJSON not rendering language chooser #11470

t0yv0 opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue

Comments

@t0yv0
Copy link
Member

t0yv0 commented Apr 3, 2024

What happened?

https://www.pulumi.com/registry/packages/aws/api-docs/emr/cluster/ contains examples in the Arguments section, specifically under configurationsJson property. These do render on the page, however unfortunately they do not respect the language chooser.

The schema for the property has the following description which seems to correctly have the PulumiCodeChooser annotation. So I expect that the data is clean but there is some issue with the website rendering. Please let me know if the data needs to look differently.

> $schema Resources aws:emr/cluster:Cluster inputProperties configurationsJson description
JSON string for supplying list of configurations for the EMR cluster.

> **NOTE on `configurations_json`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.

<!--Start PulumiCodeChooser -->
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[
{
"Classification": "hadoop-env",
"Configurations": [
{
"Classification": "export",
"Properties": {
"JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
}
}
],
"Properties": {}
}
]
`});
import pulumi
import pulumi_aws as aws

cluster = aws.emr.Cluster("cluster", configurations_json="""[
{
"Classification": "hadoop-env",
"Configurations": [
{
"Classification": "export",
"Properties": {
"JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
}
}
],
"Properties": {}
}
]
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var cluster = new Aws.Emr.Cluster("cluster", new()
    {
        ConfigurationsJson = @"[
{
""Classification"": ""hadoop-env"",
""Configurations"": [
{
""Classification"": ""export"",
""Properties"": {
""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
}
}
],
""Properties"": {}
}
]
",
    });

});
package main

import (
        "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
        "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
        pulumi.Run(func(ctx *pulumi.Context) error {
                _, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
                        ConfigurationsJson: pulumi.String(`[
{
"Classification": "hadoop-env",
"Configurations": [
{
"Classification": "export",
"Properties": {
"JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
}
}
],
"Properties": {}
}
]
`),
                })
                if err != nil {
                        return err
                }
                return nil
        })
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.emr.Cluster;
import com.pulumi.aws.emr.ClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cluster = new Cluster("cluster", ClusterArgs.builder()        
            .configurationsJson("""
[
{
"Classification": "hadoop-env",
"Configurations": [
{
"Classification": "export",
"Properties": {
"JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
}
}
],
"Properties": {}
}
]
            """)
            .build());

    }
}
resources:
  cluster:
    type: aws:emr:Cluster
    properties:
      configurationsJson: |
        [
        {
        "Classification": "hadoop-env",
        "Configurations": [
        {
        "Classification": "export",
        "Properties": {
        "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
        }
        }
        ],
        "Properties": {}
        }
        ]

### Example

See above.

### Output of `pulumi about`

N/A

### Additional context

N/A


### 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). 
@t0yv0 t0yv0 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 3, 2024
@guineveresaenger
Copy link
Contributor

I think this is a dup of pulumi/registry#3935. cc @sean1588

@t0yv0 t0yv0 added resolution/duplicate This issue is a duplicate of another issue and removed needs-triage Needs attention from the triage team labels Apr 3, 2024
@t0yv0 t0yv0 closed this as completed Apr 3, 2024
t0yv0 referenced this issue in pulumi/pulumi-terraform-bridge Apr 4, 2024
Analyzing 64 instances of this warning in pulumi-aws finding that these
actually render appropriate in the Registry and
no action needs to be taken.

One example where we might need to take action is making the language
chooser work, such as for the EMR Cluster resource.
https://github.com/pulumi/pulumi-hugo/issues/4133

Spot-checking the other resources, they seem to render fine. The
sections are not always called Examples, but sometimes
are called Usage etc.

```


   1 warning: Unexpected code snippets in section 'Argument Reference' for data source 'aws_dx_router_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for data source 'aws_ebs_volumes'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for data source 'aws_licensemanager_grants'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for data source 'aws_licensemanager_received_licenses'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for data source 'aws_subnets'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   2 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_appautoscaling_policy'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_appflow_flow'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_autoscaling_policy'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_cloudfront_distribution'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_cognito_user_pool'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_db_instance'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_ec2_fleet'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_emr_cluster'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_emr_instance_group'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_internet_gateway'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_kinesis_firehose_delivery_stream'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_neptune_cluster'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_networkmanager_core_network'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   4 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_rds_cluster'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_s3_bucket_legacy'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   7 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_s3_bucket_replication_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_servicecatalog_constraint'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Argument Reference' for resource 'aws_transfer_user'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Basic Usage with an AWS Customer Managed Key' for resource 'aws_ssmincidents_replication_set'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'CloudWatch Logging and Permissions' for resource 'aws_lambda_function'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Dead-letter queue' for resource 'aws_sqs_queue'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   2 warning: Unexpected code snippets in section 'Default Behavior and `IAMAllowedPrincipals`' for resource 'aws_lakeformation_permissions'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Encrypting the automated backup with KMS' for resource 'aws_db_instance_automated_backups_replication'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example IPv6 Usage' for resource 'aws_route'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example Update add-on usage with resolve_conflicts_on_update and PRESERVE' for resource 'aws_eks_addon'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   2 warning: Unexpected code snippets in section 'Example add-on usage with custom configuration_values' for resource 'aws_eks_addon'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example all optional arguments' for resource 'aws_cloudwatch_event_archive'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example in Conjunction with Scaling Policies' for resource 'aws_cloudwatch_metric_alarm'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example including a RDS DB instance' for resource 'aws_db_instance_automated_backups_replication'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example of monitoring Healthy Hosts on NLB using Target Group and NLB' for resource 'aws_cloudwatch_metric_alarm'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example with Delivery Policy' for resource 'aws_sns_topic'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example with First-In-First-Out (FIFO)' for resource 'aws_sns_topic'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example with Server-side encryption (SSE)' for resource 'aws_sns_topic'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Example with an Expression' for resource 'aws_cloudwatch_metric_alarm'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'FIFO queue' for resource 'aws_sqs_queue'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'High-throughput FIFO queue' for resource 'aws_sqs_queue'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Lambda integration' for resource 'aws_api_gateway_integration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Lustre Example' for resource 'aws_fsx_backup'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Multiple Region Usage' for resource 'aws_ecr_replication_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'ONTAP Example' for resource 'aws_fsx_backup'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'OpenZFS Example' for resource 'aws_fsx_backup'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Option Settings' for resource 'aws_elastic_beanstalk_environment'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Policy with a Custom Action for Stateless Inspection' for resource 'aws_networkfirewall_firewall_policy'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Policy with a HOME_NET Override' for resource 'aws_networkfirewall_firewall_policy'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Repository Filter Usage' for resource 'aws_ecr_replication_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Required Services Example' for resource 'aws_storagegateway_file_system_association'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Search by filters' for data source 'aws_ram_resource_share'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Server-side encryption (SSE)' for resource 'aws_sqs_queue'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Usage with Cognito User Pool Authorizer' for resource 'aws_api_gateway_method'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Usage with Logging Configuration to S3 Bucket' for resource 'aws_ivschat_room'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   2 warning: Unexpected code snippets in section 'Using With CloudFront' for resource 'aws_cloudfront_origin_access_identity'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Using with AutoScaling Groups' for resource 'aws_launch_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Using with Spot Instances' for resource 'aws_launch_configuration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'VPC Link' for resource 'aws_api_gateway_integration'. The HCL code will be converted if possible, but may not display correctly in the generated docs.
   1 warning: Unexpected code snippets in section 'Windows Example' for resource 'aws_fsx_backup'. The HCL code will be converted if possible, but may not display correctly in the generated docs.

```
@sean1588 sean1588 transferred this issue from pulumi/pulumi-hugo May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/duplicate This issue is a duplicate of another issue
Projects
Archived in project
Development

No branches or pull requests

2 participants