From 0d11282f564a9ff4169e7dbf55ea41022b1921a7 Mon Sep 17 00:00:00 2001 From: Viljami Date: Wed, 14 Aug 2024 08:35:44 +0200 Subject: [PATCH] Update goreleaser --- .goreleaser.yml | 25 +++++++++---------- .../generated_resources.tf | 18 +++++++++++++ .../epilot-file_file-import/resource.tf | 16 ++++++------ .../resources/epilot-file_file/resource.tf | 9 ++----- 4 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 examples/resources/epilot-file_file-import/generated_resources.tf diff --git a/.goreleaser.yml b/.goreleaser.yml index 23f50b3..280ae29 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ # Visit https://goreleaser.com for documentation on how to customize this # behavior. +version: 2 before: hooks: # this is just an example and not a requirement for provider building/publishing @@ -10,11 +11,11 @@ builds: # usage by users in CI/CD systems like Terraform Cloud where # they are unable to install libraries. - CGO_ENABLED=0 - mod_timestamp: '{{ .CommitTimestamp }}' + mod_timestamp: "{{ .CommitTimestamp }}" flags: - -trimpath ldflags: - - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' + - "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}" goos: - freebsd - windows @@ -22,21 +23,21 @@ builds: - darwin goarch: - amd64 - - '386' + - "386" - arm - arm64 ignore: - goos: darwin - goarch: '386' - binary: '{{ .ProjectName }}_v{{ .Version }}' + goarch: "386" + binary: "{{ .ProjectName }}_v{{ .Version }}" archives: - format: zip - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" checksum: extra_files: - - glob: 'terraform-registry-manifest.json' - name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json' - name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' + - glob: "terraform-registry-manifest.json" + name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json" + name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS" algorithm: sha256 signs: - artifacts: checksum @@ -52,9 +53,7 @@ signs: - "${artifact}" release: extra_files: - - glob: 'terraform-registry-manifest.json' - name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json' + - glob: "terraform-registry-manifest.json" + name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json" # If you want to manually examine the release before its live, uncomment this line: # draft: true -changelog: - skip: true diff --git a/examples/resources/epilot-file_file-import/generated_resources.tf b/examples/resources/epilot-file_file-import/generated_resources.tf new file mode 100644 index 0000000..9ccae93 --- /dev/null +++ b/examples/resources/epilot-file_file-import/generated_resources.tf @@ -0,0 +1,18 @@ +# __generated__ by Terraform +# Please review these resources and move them into your main configuration files. + +# __generated__ by Terraform from "91b9fd89-05ac-464d-8ac5-1379824471ac" +resource "epilot-file_file" "my_file" { + access_control = "private" + custom_download_url = null + filename = "8z87al.jpg" + mime_type = "image/jpeg" + s3ref = { + bucket = "epilot-dev-user-content" + key = "739224/69f04890-fa8d-4d2e-9347-4ac384da107b/8z87al.jpg" + } + source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg" + tags = null + title = "8z87al.jpg" + type = "image" +} diff --git a/examples/resources/epilot-file_file-import/resource.tf b/examples/resources/epilot-file_file-import/resource.tf index d860ce9..308b194 100644 --- a/examples/resources/epilot-file_file-import/resource.tf +++ b/examples/resources/epilot-file_file-import/resource.tf @@ -7,11 +7,11 @@ # } # epilot-file_file.my_file: -resource "epilot-file_file" "my_file" { - access_control = "private" - filename = "8z87al.jpg" - mime_type = "image/jpeg" - source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg" - title = "8z87al.jpg" - type = "image" -} +# resource "epilot-file_file" "my_file" { +# access_control = "private" +# filename = "8z87al.jpg" +# mime_type = "image/jpeg" +# source_url = "https://file.dev.sls.epilot.io/v1/files/public/links/739224-taqDBUyNjSX7c_n2v6Zvv/8z87al.jpg" +# title = "8z87al.jpg" +# type = "image" +# } diff --git a/examples/resources/epilot-file_file/resource.tf b/examples/resources/epilot-file_file/resource.tf index 671d93a..fcec118 100644 --- a/examples/resources/epilot-file_file/resource.tf +++ b/examples/resources/epilot-file_file/resource.tf @@ -1,10 +1,5 @@ resource "epilot-file_file" "my_file" { - id = "ef7d985c-2385-44f4-9c71-ae06a52264f8" - title = "document.pdf" - access_control = "private" - custom_download_url = "https://some-api-url.com/download?file_id=123" filename = "document.pdf" - mime_type = "application/pdf" + access_control = "private" source_url = "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf" - type = "unknown" -} \ No newline at end of file +}