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
update some names for registry #11506
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ import ( | |
"github.com/pulumi/pulumi/pkg/v3/codegen/nodejs" | ||
"github.com/pulumi/pulumi/pkg/v3/codegen/python" | ||
"github.com/pulumi/pulumi/pkg/v3/codegen/schema" | ||
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" | ||
) | ||
|
||
//go:embed templates/*.tmpl | ||
|
@@ -61,6 +62,7 @@ func titleLookup(shortName string) (string, bool) { | |
"alicloud": "Alibaba Cloud", | ||
"auth0": "Auth0", | ||
"aws": "AWS Classic", | ||
"awsx": "AWSx (Pulumi Crosswalk for AWS)", | ||
"aws-apigateway": "AWS API Gateway", | ||
"aws-miniflux": "Miniflux", | ||
"aws-native": "AWS Native", | ||
|
@@ -71,20 +73,21 @@ func titleLookup(shortName string) (string, bool) { | |
"aws-quickstart-vpc": "AWS QuickStart VPC", | ||
"aws-s3-replicated-bucket": "AWS S3 Replicated Bucket", | ||
"azure": "Azure Classic", | ||
"azure-justrun": "Azure Justrun", | ||
"azure-native": "Azure Native", | ||
"azure-quickstart-acr-geo-replication": "Azure QuickStart ACR Geo Replication", | ||
"azure-quickstart-aks": "Azure QuickStart AKS", | ||
"azure-quickstart-compute": "Azure QuickStart Compute", | ||
"azure-quickstart-sql": "Azure QuickStart SQL", | ||
"azuread": "Azure Active Directory", | ||
"azuread": "Azure Active Directory (Azure AD)", | ||
"azuredevops": "Azure DevOps", | ||
"azuresel": "Azure", | ||
"civo": "Civo", | ||
"cloudamqp": "CloudAMQP", | ||
"cloudflare": "Cloudflare", | ||
"cloudinit": "cloud-init", | ||
"confluent": "Confluent Cloud", | ||
"consul": "Consul", | ||
"consul": "HashiCorp Consul", | ||
"coredns-helm": "CoreDNS (Helm)", | ||
"datadog": "Datadog", | ||
"digitalocean": "DigitalOcean", | ||
|
@@ -95,7 +98,7 @@ func titleLookup(shortName string) (string, bool) { | |
"equinix-metal": "Equinix Metal", | ||
"f5bigip": "f5 BIG-IP", | ||
"fastly": "Fastly", | ||
"gcp": "Google Cloud Classic", | ||
"gcp": "Google Cloud (GCP) Classic", | ||
"gcp-global-cloudrun": "Google Global Cloud Run", | ||
"gcp-project-scaffold": "Google Project Scaffolding", | ||
"google-native": "Google Cloud Native", | ||
|
@@ -119,7 +122,7 @@ func titleLookup(shortName string) (string, bool) { | |
"kubernetes-ingress-nginx": "NGINX Ingress Controller (Helm)", | ||
"kubernetes-coredns": "CoreDNS (Helm)", | ||
"kubernetes-cert-manager": "Jetstack Cert Manager (Helm)", | ||
"nomad": "Nomad", | ||
"nomad": "HashiCorp Nomad", | ||
"ns1": "NS1", | ||
"okta": "Okta", | ||
"openstack": "OpenStack", | ||
|
@@ -1558,14 +1561,12 @@ func (mod *modContext) genResource(r *schema.Resource) resourceDocArgs { | |
filteredOutputProps = filterOutputProperties(r.InputProperties, r.Properties) | ||
} | ||
|
||
// All custom resources have an implicit `id` output property, that we must inject into the docs. | ||
if !r.IsComponent { | ||
filteredOutputProps = append(filteredOutputProps, &schema.Property{ | ||
Name: "id", | ||
Comment: "The provider-assigned unique ID for this managed resource.", | ||
Type: schema.StringType, | ||
}) | ||
} | ||
// All resources have an implicit `id` output property, that we must inject into the docs. | ||
filteredOutputProps = append(filteredOutputProps, &schema.Property{ | ||
Name: "id", | ||
Comment: "The provider-assigned unique ID for this managed resource.", | ||
Type: schema.StringType, | ||
}) | ||
|
||
for _, lang := range dctx.supportedLanguages { | ||
inputProps[lang] = mod.getProperties(r.InputProperties, lang, true, false, r.IsProvider) | ||
|
@@ -1691,6 +1692,14 @@ func (mod *modContext) getTypes(member interface{}, types nestedTypeUsageInfo) { | |
} | ||
} | ||
|
||
type fs map[string][]byte | ||
|
||
func (fs fs) add(path string, contents []byte) { | ||
_, has := fs[path] | ||
contract.Assertf(!has, "duplicate file: %s", path) | ||
fs[path] = contents | ||
} | ||
|
||
Comment on lines
+1695
to
+1702
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, all the rest of the changes related to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justinvp I could use your help on Monday. all of these came from what I thought was the right gen command to run, which was obviously wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well nevermind, i started over and its clean, going to close this in favor of #11525 |
||
// getModuleFileName returns the file name to use for a module. | ||
func (mod *modContext) getModuleFileName() string { | ||
dctx := mod.docGenContext | ||
|
@@ -1706,13 +1715,13 @@ func (mod *modContext) getModuleFileName() string { | |
return mod.mod | ||
} | ||
|
||
func (mod *modContext) gen(fs codegen.Fs) error { | ||
func (mod *modContext) gen(fs fs) error { | ||
dctx := mod.docGenContext | ||
modName := mod.getModuleFileName() | ||
|
||
addFile := func(name, contents string) { | ||
p := path.Join(modName, name, "_index.md") | ||
fs.Add(p, []byte(contents)) | ||
fs.add(p, []byte(contents)) | ||
} | ||
|
||
// Resources | ||
|
@@ -1751,7 +1760,7 @@ func (mod *modContext) gen(fs codegen.Fs) error { | |
return err | ||
} | ||
|
||
fs.Add(path.Join(modName, "_index.md"), buffer.Bytes()) | ||
fs.add(path.Join(modName, "_index.md"), buffer.Bytes()) | ||
return nil | ||
} | ||
|
||
|
@@ -2083,7 +2092,7 @@ func (dctx *docGenContext) generatePackage(tool string, pkg *schema.Package) (ma | |
defer glog.Flush() | ||
|
||
glog.V(3).Infoln("generating package docs now...") | ||
files := codegen.Fs{} | ||
files := fs{} | ||
modules := []string{} | ||
modMap := dctx.modules() | ||
for k := range modMap { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change needs to be removed from this PR. We should not be including the
id
property for components. I just recently fixed this in #11469