pulumi/tests/testdata/codegen/aws-static-website-0.4.0.json

205 lines
6.6 KiB
JSON
Raw Normal View History

[program-gen] Fix panic when generating programs for MLC packages using external types (#15605) # Description For an MLC package such as `aws-static-website`, it has some types which are referenced from the `aws` package. Program-gen assumes packages are inferred from resources and invokes, not types which caused panics in Go (#15597), dotnet and python (https://github.com/pulumi/pulumi-converter-constructor-syntax/issues/2) This PR fixes those panics. In Go the panic was due to using package name instead of the package reference from the imported type. In dotnet and python was due to assuming no external type references. Now we generate nice code for all these languages. That said, there is still an issue of resolving imports for the packages of these external types. It works in Go, TypeScript doesn't need it but dotnet and python do. That is why the latter are added in `SkipCompile` in the test program. Fixes #15597 Fixes https://github.com/pulumi/pulumi-converter-constructor-syntax/issues/3 Fixes https://github.com/pulumi/pulumi-converter-constructor-syntax/issues/2 ## Checklist - [ ] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- @Pulumi employees: If yes, you must submit corresponding changes in the service repo. -->
2024-03-10 17:23:15 +00:00
{
"name": "aws-static-website",
"displayName": "AWS Static Website",
"version": "0.4.0",
"description": "A Pulumi component to deploy a static website to AWS",
"keywords": [
"pulumi",
"aws",
"category/cloud",
"kind/component",
"web"
],
"homepage": "https://pulumi.com",
"repository": "https://github.com/pulumi/pulumi-aws-static-website",
"publisher": "Pulumi",
"meta": {
"moduleFormat": "(.*)"
},
"language": {
"csharp": {
"packageReferences": {
"Pulumi": "3.*",
"Pulumi.Aws": "5.*"
}
},
"go": {
"generateResourceContainerTypes": true,
"importBasePath": "github.com/pulumi/pulumi-aws-static-website/sdk/go/aws-static-website"
},
"nodejs": {
"dependencies": {
"@pulumi/aws": "^5.0.0",
"@pulumi/pulumi": "^3.37.0"
},
"devDependencies": {
"typescript": "^3.7.0"
}
},
"python": {
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0",
"pulumi-aws": "\u003e=5.0.0,\u003c6.0.0"
}
}
},
"config": {},
"types": {
"aws-static-website:index:CDNArgs": {
"properties": {
"cloudfrontFunctionAssociations": {
"type": "array",
"items": {
"$ref": "/aws/v5.16.2/schema.json#/types/aws:cloudfront%2FDistributionOrderedCacheBehaviorFunctionAssociation:DistributionOrderedCacheBehaviorFunctionAssociation"
},
"description": "A config block that triggers a cloudfront\nfunction with specific actions.\n",
"language": {
"python": {
"mapCase": false
}
}
},
"forwardedValues": {
"$ref": "/aws/v5.16.2/schema.json#/types/aws:cloudfront%2FDistributionDefaultCacheBehaviorForwardedValues:DistributionDefaultCacheBehaviorForwardedValues",
"description": "The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers."
},
"lambdaFunctionAssociations": {
"type": "array",
"items": {
"$ref": "/aws/v5.16.2/schema.json#/types/aws:cloudfront%2FDistributionOrderedCacheBehaviorLambdaFunctionAssociation:DistributionOrderedCacheBehaviorLambdaFunctionAssociation"
},
"description": "A config block that triggers a lambda\nfunction with specific actions.\n",
"language": {
"python": {
"mapCase": false
}
}
}
},
"type": "object"
}
},
"provider": {
"type": "object"
},
"resources": {
"aws-static-website:index:PublicBucketPolicy": {
"properties": {
"ownershipControls": {
"$ref": "/aws/v5.16.2/schema.json#/resources/aws:s3%2FbucketOwnershipControls:BucketOwnershipControls"
},
"publicAccessBlock": {
"$ref": "/aws/v5.16.2/schema.json#/resources/aws:s3%2FbucketPublicAccessBlock:BucketPublicAccessBlock"
}
},
"type": "object",
"required": [
"ownershipControls",
"publicAccessBlock"
],
"inputProperties": {
"bucket": {
"$ref": "/aws/v5.16.2/schema.json#/resources/aws:s3%2Fbucket:Bucket",
"description": "The bucket to apply the public policy to."
}
},
"requiredInputs": [
"bucket"
],
"isComponent": true
},
"aws-static-website:index:Website": {
"properties": {
"bucketName": {
"type": "string",
"description": "The name of the s3 bucket containing the website contents."
},
"bucketWebsiteURL": {
"type": "string",
"description": "The website URL for the s3 bucket."
},
"cdnDomainName": {
"type": "string",
"description": "The domain name for the CDN."
},
"cdnURL": {
"type": "string",
"description": "The URL for the CDN"
},
"logsBucketName": {
"type": "string",
"description": "The name of the s3 bucket containing the access logs."
},
"websiteURL": {
"type": "string",
"description": "The URL to access the website"
}
},
"type": "object",
"required": [
"bucketName",
"bucketWebsiteURL",
"websiteURL"
],
"inputProperties": {
"addWebsiteVersionHeader": {
"type": "boolean",
"description": "Enable a cache control header to be attached to every request from an Cloudfront Function."
},
"atomicDeployments": {
"type": "boolean",
"description": "Provision a new bucket on each deployment."
},
"cacheTTL": {
"type": "number",
"description": "TTL in seconds for cached objects. "
},
"cdnArgs": {
"$ref": "#/types/aws-static-website:index:CDNArgs",
"description": "Optional arguments used to configure the CDN."
},
"certificateARN": {
"type": "string",
"description": "The ARN of the ACM certificate to use for serving HTTPS. If one is not provided, a certificate will be created during the provisioning process."
},
"error404": {
"type": "string",
"description": "default 404 page"
},
"indexHTML": {
"type": "string",
"description": "The default document for the site. Defaults to index.html"
},
"priceClass": {
"type": "string",
"description": "The price class to use for the CloudFront configuration. Defaults to 100 if not specified. Valid values are `all`, `100`, and `200`"
},
"sitePath": {
"type": "string",
"description": "The root directory containing the website's contents."
},
"subdomain": {
"type": "string",
"description": "An optional subdomain that can be used to serve the content. This can typically be used to provision a www alias or if a deeply nested subdomain is needed (e.g. foo.bar.baz.com)."
},
"targetDomain": {
"type": "string",
"description": "The domain used to serve the content. A Route53 hosted zone must exist for this domain."
},
"withCDN": {
"type": "boolean",
"description": "Provision CloudFront CDN to serve content."
},
"withLogs": {
"type": "boolean",
"description": "Provision a bucket to hold access logs."
}
},
"requiredInputs": [
"sitePath"
],
"isComponent": true
}
}
}