Skip to content

Commit

Permalink
Upgrade terraform-provider-harbor to v3.10.0 (#128)
Browse files Browse the repository at this point in the history
* make tfgen

* make build_sdks
  • Loading branch information
dirien committed Aug 1, 2023
1 parent 7894d4e commit 6a02d3d
Show file tree
Hide file tree
Showing 19 changed files with 775 additions and 21 deletions.
119 changes: 103 additions & 16 deletions provider/cmd/pulumi-resource-harbor/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,47 +18,45 @@
},
"language": {
"csharp": {
"compatibility": "tfbridge20",
"namespaces": null,
"packageReferences": {
"Pulumi": "3.*"
},
"compatibility": "tfbridge20",
"rootNamespace": "Pulumiverse"
},
"go": {
"generateExtraInputTypes": true,
"importBasePath": "github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor",
"generateResourceContainerTypes": true,
"importBasePath": "github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
"generateExtraInputTypes": true
},
"java": {
"basePackage": "com.pulumiverse",
"buildFiles": "",
"gradleNexusPublishPluginVersion": ""
"gradleNexusPublishPluginVersion": "",
"gradleTest": ""
},
"nodejs": {
"compatibility": "tfbridge20",
"packageName": "@pulumiverse/harbor",
"packageDescription": "A Pulumi package for creating and managing Harbor resources.",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/goharbor/terraform-provider-harbor)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-harbor` repo](https://github.com/pulumiverse/pulumi-harbor/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-harbor` repo](https://github.com/goharbor/terraform-provider-harbor/issues).",
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"devDependencies": {
"@types/mime": "^2.0.0",
"@types/node": "^10.0.0"
},
"disableUnionOutputTypes": true,
"packageDescription": "A Pulumi package for creating and managing Harbor resources.",
"packageName": "@pulumiverse/harbor",
"pluginName": "",
"pluginVersion": "",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/goharbor/terraform-provider-harbor)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-harbor` repo](https://github.com/pulumiverse/pulumi-harbor/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-harbor` repo](https://github.com/goharbor/terraform-provider-harbor/issues).",
"typescriptVersion": ""
"compatibility": "tfbridge20",
"disableUnionOutputTypes": true
},
"python": {
"compatibility": "tfbridge20",
"packageName": "pulumiverse_harbor",
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/goharbor/terraform-provider-harbor)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-harbor` repo](https://github.com/pulumiverse/pulumi-harbor/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-harbor` repo](https://github.com/goharbor/terraform-provider-harbor/issues).",
"requires": {
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
}
},
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/goharbor/terraform-provider-harbor)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-harbor` repo](https://github.com/pulumiverse/pulumi-harbor/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-harbor` repo](https://github.com/goharbor/terraform-provider-harbor/issues).",
"compatibility": "tfbridge20",
"pyproject": {}
}
},
"config": {
Expand Down Expand Up @@ -195,6 +193,38 @@
"action",
"resource"
]
},
"harbor:index/getProjectsProject:getProjectsProject": {
"properties": {
"name": {
"type": "string"
},
"projectId": {
"type": "integer"
},
"public": {
"type": "boolean"
},
"type": {
"type": "string"
},
"vulnerabilityScanning": {
"type": "boolean"
}
},
"type": "object",
"required": [
"name",
"projectId",
"public",
"type",
"vulnerabilityScanning"
],
"language": {
"nodejs": {
"requiredInputs": []
}
}
}
},
"provider": {
Expand Down Expand Up @@ -2085,6 +2115,9 @@
"public": {
"type": "boolean"
},
"type": {
"type": "string"
},
"vulnerabilityScanning": {
"type": "boolean"
}
Expand All @@ -2094,11 +2127,65 @@
"name",
"projectId",
"public",
"type",
"vulnerabilityScanning",
"id"
]
}
},
"harbor:index/getProjects:getProjects": {
"description": "## Example Usage\n\n```hcl\ndata \"harbor_projects\" \"proxycache\" {\n type = \"ProxyCache\"\n}\n\noutput \"proxy_cache_projects\" {\n value = data.harbor_projects.proxycache\n}\n```\n",
"inputs": {
"description": "A collection of arguments for invoking getProjects.\n",
"properties": {
"name": {
"type": "string"
},
"public": {
"type": "boolean"
},
"type": {
"type": "string"
},
"vulnerabilityScanning": {
"type": "boolean"
}
},
"type": "object"
},
"outputs": {
"description": "A collection of values returned by getProjects.\n",
"properties": {
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
},
"name": {
"type": "string"
},
"projects": {
"type": "array",
"items": {
"$ref": "#/types/harbor:index/getProjectsProject:getProjectsProject"
}
},
"public": {
"type": "boolean"
},
"type": {
"type": "string"
},
"vulnerabilityScanning": {
"type": "boolean"
}
},
"type": "object",
"required": [
"projects",
"id"
]
}
},
"harbor:index/getRegistry:getRegistry": {
"description": "## Example Usage\n\n```hcl\ndata \"harbor_registry\" \"main\" {\n name = \"test_docker_harbor\"\n}\n\noutput \"harbor_registry_id\" {\n value = data.harbor_registry.main.id\n}\n```\n",
"inputs": {
Expand Down
4 changes: 2 additions & 2 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20230710100801-03a71d0fca3d

require (
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230713153442-10a7b0dd31c5
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230728074826-7453ba31f217
github.com/pulumi/pulumi-terraform-bridge/v3 v3.55.0
github.com/pulumi/pulumi/sdk/v3 v3.76.1
)
Expand Down Expand Up @@ -130,7 +130,7 @@ require (
github.com/hashicorp/terraform-plugin-go v0.16.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-sdk v1.8.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/vault/api v1.8.2 // indirect
github.com/hashicorp/vault/sdk v0.6.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1336,8 +1336,8 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230713153442-10a7b0dd31c5 h1:Ih0ete1L0oZJFWG3TT49tiCbPCX9ElzIpKd4/vpRScU=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230713153442-10a7b0dd31c5/go.mod h1:DqmsTdERXNJ3yOe7+6SXeQfQ+PX6R0wvj9VxQIn3D98=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230728074826-7453ba31f217 h1:/wLr2/TliKeI3rROXd/blQ0IF5Djvgr3plJmDawVSXw=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20230728074826-7453ba31f217/go.mod h1:plTUtywc6TaFYOQqf1GB4R8M/t7fZS69jq8VS6lsPSQ=
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
Expand Down
1 change: 1 addition & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func Provider() tfbridge.ProviderInfo {
// "aws_ami": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getAmi")},
"harbor_project": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getProject")},
"harbor_registry": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getRegistry")},
"harbor_projects": {Tok: tfbridge.MakeDataSource(mainPkg, mainMod, "getProjects")},
},
JavaScript: &tfbridge.JavaScriptInfo{
PackageName: "@pulumiverse/harbor",
Expand Down
4 changes: 4 additions & 0 deletions sdk/dotnet/GetProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public sealed class GetProjectResult
public readonly string Name;
public readonly int ProjectId;
public readonly bool Public;
public readonly string Type;
public readonly bool VulnerabilityScanning;

[OutputConstructor]
Expand All @@ -91,12 +92,15 @@ public sealed class GetProjectResult

bool @public,

string type,

bool vulnerabilityScanning)
{
Id = id;
Name = name;
ProjectId = projectId;
Public = @public;
Type = type;
VulnerabilityScanning = vulnerabilityScanning;
}
}
Expand Down
125 changes: 125 additions & 0 deletions sdk/dotnet/GetProjects.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Pulumiverse.Harbor
{
public static class GetProjects
{
/// <summary>
/// ## Example Usage
///
/// ```hcl
/// data "harbor_projects" "proxycache" {
/// type = "ProxyCache"
/// }
///
/// output "proxy_cache_projects" {
/// value = data.harbor_projects.proxycache
/// }
/// ```
/// </summary>
public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs? args = null, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetProjectsResult>("harbor:index/getProjects:getProjects", args ?? new GetProjectsArgs(), options.WithDefaults());

/// <summary>
/// ## Example Usage
///
/// ```hcl
/// data "harbor_projects" "proxycache" {
/// type = "ProxyCache"
/// }
///
/// output "proxy_cache_projects" {
/// value = data.harbor_projects.proxycache
/// }
/// ```
/// </summary>
public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs? args = null, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke<GetProjectsResult>("harbor:index/getProjects:getProjects", args ?? new GetProjectsInvokeArgs(), options.WithDefaults());
}


public sealed class GetProjectsArgs : global::Pulumi.InvokeArgs
{
[Input("name")]
public string? Name { get; set; }

[Input("public")]
public bool? Public { get; set; }

[Input("type")]
public string? Type { get; set; }

[Input("vulnerabilityScanning")]
public bool? VulnerabilityScanning { get; set; }

public GetProjectsArgs()
{
}
public static new GetProjectsArgs Empty => new GetProjectsArgs();
}

public sealed class GetProjectsInvokeArgs : global::Pulumi.InvokeArgs
{
[Input("name")]
public Input<string>? Name { get; set; }

[Input("public")]
public Input<bool>? Public { get; set; }

[Input("type")]
public Input<string>? Type { get; set; }

[Input("vulnerabilityScanning")]
public Input<bool>? VulnerabilityScanning { get; set; }

public GetProjectsInvokeArgs()
{
}
public static new GetProjectsInvokeArgs Empty => new GetProjectsInvokeArgs();
}


[OutputType]
public sealed class GetProjectsResult
{
/// <summary>
/// The provider-assigned unique ID for this managed resource.
/// </summary>
public readonly string Id;
public readonly string? Name;
public readonly ImmutableArray<Outputs.GetProjectsProjectResult> Projects;
public readonly bool? Public;
public readonly string? Type;
public readonly bool? VulnerabilityScanning;

[OutputConstructor]
private GetProjectsResult(
string id,

string? name,

ImmutableArray<Outputs.GetProjectsProjectResult> projects,

bool? @public,

string? type,

bool? vulnerabilityScanning)
{
Id = id;
Name = name;
Projects = projects;
Public = @public;
Type = type;
VulnerabilityScanning = vulnerabilityScanning;
}
}
}

0 comments on commit 6a02d3d

Please sign in to comment.