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

Upgrade terraform-provider-harbor to v3.10.10 #321

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pulumi-java-gen.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0
22 changes: 13 additions & 9 deletions provider/cmd/pulumi-resource-harbor/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@
}
},
"harbor:index/replication:Replication": {
"description": "## Example Usage\n\n```terraform\nresource \"harbor_registry\" \"main\" {\n provider_name = \"docker-hub\"\n name = \"test_docker_harbor\"\n endpoint_url = \"https://hub.docker.com\"\n\n}\n\nresource \"harbor_replication\" \"push\" {\n name = \"test_push\"\n action = \"push\"\n registry_id = harbor_registry.main.registry_id\n}\n\nresource \"harbor_replication\" \"alpine\" {\n name = \"alpine\"\n action = \"pull\"\n registry_id = harbor_registry.main.registry_id\n schedule = \"0 0/15 * * * *\"\n filters {\n name = \"library/alpine\"\n }\n filters {\n tag = \"3.*.*\"\n }\n filters {\n resource = \"artifact\"\n }\n filters {\n labels = [\"qa\"]\n }\n}\n\nresource \"harbor_replication\" \"alpine\" {\n name = \"alpine\"\n action = \"pull\"\n registry_id = harbor_registry.main.registry_id\n schedule = \"event_based\"\n filters {\n name = \"library/alpine\"\n }\n filters {\n tag = \"3.*.*\"\n }\n}\n```\n\n## Import\n\n```sh\n$ pulumi import harbor:index/replication:Replication main /replication/policies/1\n```\n\n",
"description": "## Example Usage\n\n```terraform\nresource \"harbor_registry\" \"main\" {\n provider_name = \"docker-hub\"\n name = \"test_docker_harbor\"\n endpoint_url = \"https://hub.docker.com\"\n\n}\n\nresource \"harbor_replication\" \"push\" {\n name = \"test_push\"\n action = \"push\"\n registry_id = harbor_registry.main.registry_id\n}\n\nresource \"harbor_replication\" \"alpine\" {\n name = \"alpine\"\n action = \"pull\"\n registry_id = harbor_registry.main.registry_id\n schedule = \"0 0/15 * * * *\"\n filters {\n name = \"library/alpine\"\n }\n filters {\n tag = \"3.*.*\"\n }\n filters {\n resource = \"artifact\"\n }\n filters {\n labels = [\"qa\"]\n }\n}\n\nresource \"harbor_replication\" \"alpine\" {\n name = \"alpine\"\n action = \"push\"\n registry_id = harbor_registry.main.registry_id\n schedule = \"event_based\"\n filters {\n name = \"library/alpine\"\n }\n filters {\n tag = \"3.*.*\"\n }\n}\n```\n\n## Import\n\n```sh\n$ pulumi import harbor:index/replication:Replication main /replication/policies/1\n```\n\n",
"properties": {
"action": {
"type": "string"
Expand Down Expand Up @@ -1901,7 +1901,7 @@
},
"name": {
"type": "string",
"description": "Filter on the name of the resource.\n"
"description": "The name of the replication.\n"
},
"override": {
"type": "boolean",
Expand Down Expand Up @@ -1966,7 +1966,7 @@
},
"name": {
"type": "string",
"description": "Filter on the name of the resource.\n"
"description": "The name of the replication.\n"
},
"override": {
"type": "boolean",
Expand Down Expand Up @@ -2028,7 +2028,7 @@
},
"name": {
"type": "string",
"description": "Filter on the name of the resource.\n"
"description": "The name of the replication.\n"
},
"override": {
"type": "boolean",
Expand Down Expand Up @@ -2119,7 +2119,7 @@
}
},
"harbor:index/robotAccount:RobotAccount": {
"description": "## Example Usage\n\n### System Level\nIntroduced in harbor 2.2.0, system level robot accounts can have basically [all available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) in harbor and are not dependent on a single project.\n\n### Global\n\n```terraform\nresource \"random_password\" \"password\" {\n length = 12\n special = false\n}\n\nresource \"harbor_project\" \"main\" {\n name = \"main\"\n}\n\nresource \"harbor_robot_account\" \"system\" {\n name = \"example-system\"\n description = \"system level robot account\"\n level = \"system\"\n secret = resource.random_password.password.result\n permissions {\n access {\n action = \"create\"\n resource = \"labels\"\n }\n kind = \"system\"\n namespace = \"/\"\n }\n permissions {\n access {\n action = \"push\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = harbor_project.main.name\n }\n permissions {\n access {\n action = \"pull\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = \"*\"\n }\n}\n```\n\nThe above example, creates a system level robot account with permissions to\n- permission to create labels on system level\n- pull repository across all projects\n- push repository to project \"my-project-name\"\n\n### Project\n\nOther than system level robot accounts, project level robot accounts can interact on project level only.\nThe [available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) are mostly the same as for system level robots.\n\n```terraform\nresource \"harbor_project\" \"main\" {\n name = \"main\"\n}\n\nresource \"harbor_robot_account\" \"project\" {\n name = \"example-project\"\n description = \"project level robot account\"\n level = \"project\"\n permissions {\n access {\n action = \"pull\"\n resource = \"repository\"\n }\n access {\n action = \"push\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = harbor_project.main.name\n }\n}\n```\n\nThe above example creates a project level robot account with permissions to\n- pull repository on project \"main\"\n- push repository on project \"main\"\n\n## Import\n\n```sh\n$ pulumi import harbor:index/robotAccount:RobotAccount system /robots/123\n```\n\n",
"description": "## Example Usage\n\n### System Level\nIntroduced in harbor 2.2.0, system level robot accounts can have basically [all available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) in harbor and are not dependent on a single project.\n\n### Global\n\n```terraform\nresource \"random_password\" \"password\" {\n length = 12\n special = false\n}\n\nresource \"harbor_project\" \"main\" {\n name = \"main\"\n}\n\nresource \"harbor_robot_account\" \"system\" {\n name = \"example-system\"\n description = \"system level robot account\"\n level = \"system\"\n secret = resource.random_password.password.result\n permissions {\n access {\n action = \"create\"\n resource = \"label\"\n }\n kind = \"system\"\n namespace = \"/\"\n }\n permissions {\n access {\n action = \"push\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = harbor_project.main.name\n }\n permissions {\n access {\n action = \"pull\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = \"*\"\n }\n}\n```\n\nThe above example, creates a system level robot account with permissions to\n- permission to create labels on system level\n- pull repository across all projects\n- push repository to project \"my-project-name\"\n\n### Project\n\nOther than system level robot accounts, project level robot accounts can interact on project level only.\nThe [available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) are mostly the same as for system level robots.\n\n```terraform\nresource \"harbor_project\" \"main\" {\n name = \"main\"\n}\n\nresource \"harbor_robot_account\" \"project\" {\n name = \"example-project\"\n description = \"project level robot account\"\n level = \"project\"\n permissions {\n access {\n action = \"pull\"\n resource = \"repository\"\n }\n access {\n action = \"push\"\n resource = \"repository\"\n }\n kind = \"project\"\n namespace = harbor_project.main.name\n }\n}\n```\n\nThe above example creates a project level robot account with permissions to\n- pull repository on project \"main\"\n- push repository on project \"main\"\n\n## Import\n\n```sh\n$ pulumi import harbor:index/robotAccount:RobotAccount system /robots/123\n```\n\n",
"properties": {
"description": {
"type": "string",
Expand Down Expand Up @@ -2492,16 +2492,20 @@
"description": "A collection of arguments for invoking getProjects.\n",
"properties": {
"name": {
"type": "string"
"type": "string",
"description": "The name of the project.\n"
},
"public": {
"type": "boolean"
"type": "boolean",
"description": "If the project has public accessibility.\n"
},
"type": {
"type": "string"
"type": "string",
"description": "The type of the project : Project or ProxyCache.\n"
},
"vulnerabilityScanning": {
"type": "boolean"
"type": "boolean",
"description": "If the images will be scanned for vulnerabilities when push to harbor.\n"
}
},
"type": "object"
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.0
replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240229143312-4f60ee4e2975

require (
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20240326125823-ac02d18e93f8
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20240513151338-bcd459a1af8d
github.com/pulumi/pulumi-terraform-bridge/v3 v3.82.0
github.com/pulumi/pulumi/sdk/v3 v3.114.0
)
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1927,8 +1927,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.20240326125823-ac02d18e93f8 h1:BpVIYzU25nAJXY+it/YeIiPfyNNauAGhsuosEgrJiJY=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20240326125823-ac02d18e93f8/go.mod h1:a4+xwr2XaukXakZlYZTupEVX+7lGEDVnZPgUdg80T/s=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20240513151338-bcd459a1af8d h1:u03He1ksj6oh0XI9v/LY+camjS2R2uQQxhevebHVf9I=
github.com/goharbor/terraform-provider-harbor v1.4.1-0.20240513151338-bcd459a1af8d/go.mod h1:ybXcpyl6RXCXBPlKyAHo4hhnSpadhD7gF2xgucpSOWQ=
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=
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
Expand Down
24 changes: 24 additions & 0 deletions sdk/dotnet/GetProjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,27 @@ public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs? args = nul

public sealed class GetProjectsArgs : global::Pulumi.InvokeArgs
{
/// <summary>
/// The name of the project.
/// </summary>
[Input("name")]
public string? Name { get; set; }

/// <summary>
/// If the project has public accessibility.
/// </summary>
[Input("public")]
public bool? Public { get; set; }

/// <summary>
/// The type of the project : Project or ProxyCache.
/// </summary>
[Input("type")]
public string? Type { get; set; }

/// <summary>
/// If the images will be scanned for vulnerabilities when push to harbor.
/// </summary>
[Input("vulnerabilityScanning")]
public bool? VulnerabilityScanning { get; set; }

Expand All @@ -68,15 +80,27 @@ public GetProjectsArgs()

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

/// <summary>
/// If the project has public accessibility.
/// </summary>
[Input("public")]
public Input<bool>? Public { get; set; }

/// <summary>
/// The type of the project : Project or ProxyCache.
/// </summary>
[Input("type")]
public Input<string>? Type { get; set; }

/// <summary>
/// If the images will be scanned for vulnerabilities when push to harbor.
/// </summary>
[Input("vulnerabilityScanning")]
public Input<bool>? VulnerabilityScanning { get; set; }

Expand Down
6 changes: 3 additions & 3 deletions sdk/dotnet/Replication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public partial class Replication : global::Pulumi.CustomResource
public Output<ImmutableArray<Outputs.ReplicationFilter>> Filters { get; private set; } = null!;

/// <summary>
/// Filter on the name of the resource.
/// The name of the replication.
/// </summary>
[Output("name")]
public Output<string> Name { get; private set; } = null!;
Expand Down Expand Up @@ -192,7 +192,7 @@ public InputList<Inputs.ReplicationFilterArgs> Filters
}

/// <summary>
/// Filter on the name of the resource.
/// The name of the replication.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
Expand Down Expand Up @@ -277,7 +277,7 @@ public InputList<Inputs.ReplicationFilterGetArgs> Filters
}

/// <summary>
/// Filter on the name of the resource.
/// The name of the replication.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }
Expand Down
24 changes: 16 additions & 8 deletions sdk/go/harbor/getProjects.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions sdk/go/harbor/replication.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions sdk/nodejs/getProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,21 @@ export function getProjects(args?: GetProjectsArgs, opts?: pulumi.InvokeOptions)
* A collection of arguments for invoking getProjects.
*/
export interface GetProjectsArgs {
/**
* The name of the project.
*/
name?: string;
/**
* If the project has public accessibility.
*/
public?: boolean;
/**
* The type of the project : Project or ProxyCache.
*/
type?: string;
/**
* If the images will be scanned for vulnerabilities when push to harbor.
*/
vulnerabilityScanning?: boolean;
}

Expand Down Expand Up @@ -68,8 +80,20 @@ export function getProjectsOutput(args?: GetProjectsOutputArgs, opts?: pulumi.In
* A collection of arguments for invoking getProjects.
*/
export interface GetProjectsOutputArgs {
/**
* The name of the project.
*/
name?: pulumi.Input<string>;
/**
* If the project has public accessibility.
*/
public?: pulumi.Input<boolean>;
/**
* The type of the project : Project or ProxyCache.
*/
type?: pulumi.Input<string>;
/**
* If the images will be scanned for vulnerabilities when push to harbor.
*/
vulnerabilityScanning?: pulumi.Input<boolean>;
}
Loading