Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
11002: Reimplement #10984 r=AaronFriel a=AaronFriel

This is a rebase and squash of #10984 with an additional commit added to satisfy `make lint` and revert a few changes to methods to use value receivers, where the original PR altered marshaling/unmarshaling behavior.

11031: prepare for next release (v3.43.1) r=AaronFriel a=pulumi-bot



11059: (pulumi-bot) Synced file(s) with pulumi/pulumi-yaml r=aq17 a=pulumi-bot

Synced local file(s) with [pulumi/pulumi-yaml](https://github.com/pulumi/pulumi-yaml).

This PR syncs changes to the codegen'd PCL files from the latest `pulumi/yaml` release

<details>
<summary>Changed files</summary>
<ul>
<li>Created local directory <code>pkg/codegen/testing/test/testdata/transpiled_examples</code> and copied all sub files/folders from remote directory <code>pkg/tests/transpiled_examples</code></li>
</ul>
</details>

---

This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#3269786749](https://github.com/pulumi/pulumi-yaml/actions/runs/3269786749)

Co-authored-by: 杨成锴 <homeboyc@foxmail.com>
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
Co-authored-by: pulumi-bot <null>
Co-authored-by: Alex Qiu <aqiu@pulumi.com>
  • Loading branch information
4 people committed Oct 18, 2022
4 parents 4572282 + ab1ec4f + 91b6129 + 3747b80 commit 90be15c
Show file tree
Hide file tree
Showing 66 changed files with 961 additions and 173 deletions.
68 changes: 68 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,74 @@
- [sdkgen/{go,python}] Revert 10738, fixing python class generation
[#11033](https://github.com/pulumi/pulumi/pull/11033)

## 3.43.0 (2022-10-14)


### Features

- [auto/nodejs] Adds support for parallel programs in NodeJS Automation API
[#10568](https://github.com/pulumi/pulumi/pull/10568)

- [backend/service] Implements diff-based snapshot saving protocol that reduces bandwidth on large stacks. To opt into this feature, set the environment variable and value `PULUMI_OPTIMIZED_CHECKPOINT_PATCH=true`.
[#10788](https://github.com/pulumi/pulumi/pull/10788)

- [engine] Adds structured alias support to the engine
[#10819](https://github.com/pulumi/pulumi/pull/10819)

- [cli/display] Displays time elapsed when modifying a resource.
[#10953](https://github.com/pulumi/pulumi/pull/10953)

- [sdk/go] Modifies built-in As-ArrayOutput methods to attempt to convert []interface{} to []T.
[#10991](https://github.com/pulumi/pulumi/pull/10991)

- [sdkgen/go] Add `modulePath` to go, allowing accurate `go.mod` files for prerelease packages
[#10944](https://github.com/pulumi/pulumi/pull/10944)

- [cli/new] Add --remove flag to`pulumi destroy`
[#10943](https://github.com/pulumi/pulumi/pull/10943)


### Bug Fixes

- [cli] Project path is included in error messages when a project can't be loaded.
[#10973](https://github.com/pulumi/pulumi/pull/10973)

- [cli/display] Fix gocloud unconditonally writing to stderr.
[#11007](https://github.com/pulumi/pulumi/pull/11007)

- [cli/{display,engine}] Use of unsupported ResourceOptions on components will no longer raise resource warnings, instead they are just logged to the diagnostic error stream.
[#11010](https://github.com/pulumi/pulumi/pull/11010)

- [cli/import] Handle importing resource properties that are typed as a union
[#10995](https://github.com/pulumi/pulumi/pull/10995)

- [cli/package] Require a path separator for path based binaries. This allows us to distinguish between ./myProvider (execute the binary at path) and myProvider (execute the installed plugin).
[#11015](https://github.com/pulumi/pulumi/pull/11015)

- [programgen/dotnet] Annotate deeply nested objects with their schema types and apply property name overrides
[#10976](https://github.com/pulumi/pulumi/pull/10976)

- [programgen/go] Fixes int constant range expressions for go
[#10979](https://github.com/pulumi/pulumi/pull/10979)

- [programgen/go] Missing default case handling when generating local variables
[#10978](https://github.com/pulumi/pulumi/pull/10978)

- [sdk/go] Avoid backfilling property deps for Go
[#11021](https://github.com/pulumi/pulumi/pull/11021)

- [sdkgen] Re-enables caching the schemas of versioned provider plugins.
[#10971](https://github.com/pulumi/pulumi/pull/10971)

- [programgen/python] Recursively annotate expressions under invoke calls with their associated schema types
[#10958](https://github.com/pulumi/pulumi/pull/10958)


### Miscellaneous

- [yaml] "[Updates Pulumi YAML to v0.5.10](https://github.com/pulumi/pulumi-yaml/releases/tag/v0.5.10) containing bug fixes and improvements primarily for `pulumi convert` from YAML."
[#11018](https://github.com/pulumi/pulumi/pull/11018)

## 3.42.0 (2022-10-07)


Expand Down
@@ -0,0 +1,4 @@
changes:
- type: chore
scope: sdk/go
description: Update notes, update the deprecated functions, make some lint.
@@ -0,0 +1,21 @@
vpcId = invoke("aws:ec2/getVpc:getVpc", {
default = true
}).id
subnetIds = invoke("aws:ec2/getSubnetIds:getSubnetIds", {
vpcId = vpcId
}).ids

resource cluster "eks:index:Cluster" {
__logicalName = "cluster"
vpcId = vpcId
subnetIds = subnetIds
instanceType = "t2.medium"
desiredCapacity = 2
minSize = 1
maxSize = 2
}

output kubeconfig {
__logicalName = "kubeconfig"
value = cluster.kubeconfig
}
@@ -0,0 +1,38 @@
resource siteBucket "aws-native:s3:Bucket" {
__logicalName = "site-bucket"
websiteConfiguration = {
indexDocument = "index.html"
}
}

resource indexHtml "aws:s3/bucketObject:BucketObject" {
__logicalName = "index.html"
bucket = siteBucket.id
source = fileAsset("./www/index.html")
acl = "public-read"
contentType = "text/html"
}

resource faviconPng "aws:s3/bucketObject:BucketObject" {
__logicalName = "favicon.png"
bucket = siteBucket.id
source = fileAsset("./www/favicon.png")
acl = "public-read"
contentType = "image/png"
}

resource bucketPolicy "aws:s3/bucketPolicy:BucketPolicy" {
__logicalName = "bucketPolicy"
bucket = siteBucket.id
policy = "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Principal\": \"*\",\n \"Action\": [\"s3:GetObject\"],\n \"Resource\": [\"${siteBucket.arn}/*\"]\n }\n ]\n}\n"
}

output bucketName {
__logicalName = "bucketName"
value = siteBucket.bucketName
}

output websiteUrl {
__logicalName = "websiteUrl"
value = siteBucket.websiteURL
}
@@ -0,0 +1,28 @@
resource cluster "aws:ecs/cluster:Cluster" {
__logicalName = "cluster"
}

resource lb "awsx:lb:ApplicationLoadBalancer" {
__logicalName = "lb"
}

resource nginx "awsx:ecs:FargateService" {
__logicalName = "nginx"
cluster = cluster.arn
taskDefinitionArgs = {
container = {
image = "nginx:latest",
cpu = 512,
memory = 128,
portMappings = [{
containerPort = 80,
targetGroup = lb.defaultTargetGroup
}]
}
}
}

output url {
__logicalName = "url"
value = lb.loadBalancer.dnsName
}
@@ -0,0 +1,123 @@
config sqlAdmin string {
default = "pulumi"
}

blobAccessToken = secret(invoke("azure-native:storage:listStorageAccountServiceSAS", {
accountName = sa.name,
protocols = "https",
sharedAccessStartTime = "2022-01-01",
sharedAccessExpiryTime = "2030-01-01",
resource = "c",
resourceGroupName = appservicegroup.name,
permissions = "r",
canonicalizedResource = "/blob/${sa.name}/${container.name}",
contentType = "application/json",
cacheControl = "max-age=5",
contentDisposition = "inline",
contentEncoding = "deflate"
}).serviceSasToken)

resource appservicegroup "azure-native:resources:ResourceGroup" {
__logicalName = "appservicegroup"
}

resource sa "azure-native:storage:StorageAccount" {
__logicalName = "sa"
resourceGroupName = appservicegroup.name
kind = "StorageV2"
sku = {
name = "Standard_LRS"
}
}

resource appserviceplan "azure-native:web:AppServicePlan" {
__logicalName = "appserviceplan"
resourceGroupName = appservicegroup.name
kind = "App"
sku = {
name = "B1",
tier = "Basic"
}
}

resource container "azure-native:storage:BlobContainer" {
__logicalName = "container"
resourceGroupName = appservicegroup.name
accountName = sa.name
publicAccess = "None"
}

resource blob "azure-native:storage:Blob" {
__logicalName = "blob"
resourceGroupName = appservicegroup.name
accountName = sa.name
containerName = container.name
type = "Block"
source = fileArchive("./www")
}

resource appInsights "azure-native:insights:Component" {
__logicalName = "appInsights"
resourceGroupName = appservicegroup.name
applicationType = "web"
kind = "web"
}

resource sqlPassword "random:index/randomPassword:RandomPassword" {
__logicalName = "sqlPassword"
length = 16
special = true
}

resource sqlServer "azure-native:sql:Server" {
__logicalName = "sqlServer"
resourceGroupName = appservicegroup.name
administratorLogin = sqlAdmin
administratorLoginPassword = sqlPassword.result
version = "12.0"
}

resource db "azure-native:sql:Database" {
__logicalName = "db"
resourceGroupName = appservicegroup.name
serverName = sqlServer.name
sku = {
name = "S0"
}
}

resource app "azure-native:web:WebApp" {
__logicalName = "app"
resourceGroupName = appservicegroup.name
serverFarmId = appserviceplan.id
siteConfig = {
appSettings = [
{
name = "WEBSITE_RUN_FROM_PACKAGE",
value = "https://${sa.name}.blob.core.windows.net/${container.name}/${blob.name}?${blobAccessToken}"
},
{
name = "APPINSIGHTS_INSTRUMENTATIONKEY",
value = appInsights.instrumentationKey
},
{
name = "APPLICATIONINSIGHTS_CONNECTION_STRING",
value = "InstrumentationKey=${appInsights.instrumentationKey}"
},
{
name = "ApplicationInsightsAgent_EXTENSION_VERSION",
value = "~2"
}
],
connectionStrings = [{
name = "db",
type = "SQLAzure",
connectionString = "Server= tcp:${sqlServer.name}.database.windows.net;initial catalog=${db.name};userID=${sqlAdmin};password=${sqlPassword.result};Min Pool Size=0;Max Pool Size=30;Persist Security Info=true;"
}]
}
}

output endpoint {
__logicalName = "endpoint"
value = app.defaultHostName
}

0 comments on commit 90be15c

Please sign in to comment.