diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..990e56eec --- /dev/null +++ b/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Translations +*.mo +*.pot + + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Pyre type checker +.pyre/ +.idea/* +.env +/backup_worker.iml \ No newline at end of file diff --git a/CI.MD b/CI.MD new file mode 100644 index 000000000..259ed40f2 --- /dev/null +++ b/CI.MD @@ -0,0 +1,59 @@ +## Continuous Integration (CI) Best Practices + + +### **Fine-tuned Triggers** +- Limiting the CI to run only when changes occur in specific folders or files, rather than on every single commit or push. This conserves resources. + ```yaml + on: + push: + paths: + - 'app_python/**' + ``` + +### **Explicit Environment Setup** +- Specifying the environment (like the OS) and the exact version of the tools (like Python) ensures consistency across CI runs. + ```yaml + runs-on: ubuntu-latest + ``` + +### **Dependency Caching** +- Caching dependencies speeds up CI runs, as they don't have to be fetched from the internet every time. + ```yaml + - name: Cache pip + uses: actions/cache@v2 + ``` + +### **Linter Integration** +- Linters like `flake8` ensure code quality and adherence to coding standards. + ```yaml + - name: Lint with flake8 + ``` + +### **Comprehensive Tests** +- Run unit tests to catch regressions and ensure that the software behaves as expected. + ```yaml + - name: Run Tests + ``` + +### Docker Integration +- Building and pushing Docker images as part of CI ensures the latest code changes are always available as Docker images. +```yaml + - name: Login to Docker Hub + - name: Build and Push Docker Image +``` + +### Secrets Management +- Sensitive information, like login credentials, should be stored securely using platform features like [GitHub Secrets](https://docs.github.com/en/actions/reference/encrypted-secrets). + +### **Visibility with Status Badges** +- A status badge in README provides a quick overview of the health of project. + ```markdown + ![Python CI Workflow](![Python CI Workflow](https://github.com/eukuz/devops-course-labs/workflows/Python%20CI%20Workflow/badge.svg) + ``` + +### **Fail-fast Strategy** +- If any step in the CI process fails, the entire job should stop immediately. This saves resources and provides faster feedback. + +### **Matrix Builds** +- Running tests on multiple versions of a tool (e.g., Python) ensures compatibility across versions. + diff --git a/ansible/.DS_Store b/ansible/.DS_Store new file mode 100644 index 000000000..ba09f1721 Binary files /dev/null and b/ansible/.DS_Store differ diff --git a/ansible/ANSIBLE.md b/ansible/ANSIBLE.md new file mode 100644 index 000000000..4ea7da8be --- /dev/null +++ b/ansible/ANSIBLE.md @@ -0,0 +1,55 @@ +### **Result of ansible-playbook playbooks/dev/main.yml --diff** + +``` +TASK [web_app : Ensure /etc/docker/ directory exists.] ********************************************************************************************************************* +skipping: [vm] + +TASK [web_app : Configure Docker daemon options.] ************************************************************************************************************************** +skipping: [vm] + +TASK [web_app : Ensure Docker is started and enabled at boot.] ************************************************************************************************************* +ok: [vm] + +TASK [web_app : Ensure handlers are notified now to avoid firewall conflicts.] ********************************************************************************************* + +TASK [web_app : include_tasks] ********************************************************************************************************************************************* +included: /Users/nurbakzh/Downloads/labs/DevOps-Nurba/ansible/roles/nurba/tasks/docker-compose.yml for retakeVM + +TASK [web_app : Check current docker-compose version.] ********************************************************************************************************************* +ok: [vm] + +TASK [web_app : set_fact] ************************************************************************************************************************************************** +ok: [vm] + +TASK [web_app : Delete existing docker-compose version if it's different.] ************************************************************************************************* +skipping: [vm] + +TASK [web_app : Install Docker Compose (if configured).] ******************************************************************************************************************* +skipping: [vm] + +TASK [web_app : Get docker group info using getent.] *********************************************************************************************************************** +skipping: [vm] + +TASK [web_app : Check if there are any users to add to the docker group.] ************************************************************************************************** + +TASK [web_app : include_tasks] ********************************************************************************************************************************************* +skipping: [vm] + +TASK [web_app : Stop services] ********************************************************************************************************************************************* +skipping: [vm] + +TASK [web_app : Remove directory] ****************************************************************************************************************************************** +skipping: [vm] + +TASK [web_app : Create directory] ****************************************************************************************************************************************** +ok: [vm] + +TASK [web_app : Crete docker-compose.yml] ********************************************************************************************************************************** +ok: [vm] + +TASK [web_app : Run docker-compose] **************************************************************************************************************************************** +ok: [vm] + +PLAY RECAP ***************************************************************************************************************************************************************** +vm : ok=19 changed=0 unreachable=0 failed=0 skipped=16 rescued=0 ignored=0``` +``` \ No newline at end of file diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 000000000..fcda49d56 --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] +roles_path = ../ansible/roles +inventory = inventory \ No newline at end of file diff --git a/ansible/inventory/inventory.yml b/ansible/inventory/inventory.yml new file mode 100644 index 000000000..35d2c892e --- /dev/null +++ b/ansible/inventory/inventory.yml @@ -0,0 +1,5 @@ +virtual_machines: + hosts: + vm: + ansible_host: 84.201.141.246 + ansible_user: ubuntu \ No newline at end of file diff --git a/ansible/playbooks/dev/main.yml b/ansible/playbooks/dev/main.yml new file mode 100644 index 000000000..b6e90be69 --- /dev/null +++ b/ansible/playbooks/dev/main.yml @@ -0,0 +1,4 @@ +- name: Install docker + hosts: vm + roles: + - web_app \ No newline at end of file diff --git a/ansible/roles/.DS_Store b/ansible/roles/.DS_Store new file mode 100644 index 000000000..d359cbf60 Binary files /dev/null and b/ansible/roles/.DS_Store differ diff --git a/ansible/roles/docker/README.md b/ansible/roles/docker/README.md new file mode 100644 index 000000000..c19305f98 --- /dev/null +++ b/ansible/roles/docker/README.md @@ -0,0 +1,22 @@ +Docker Role +========= + +The docker role installs Docker using apt and Docker Compose using pip on the Virtual Machine. + +Requirements +------------ + +There are no additional roles or prerequisites for running + +Role Variables +-------------- + +There are no additional variables for role + +Example Playbook +---------------- + + - hosts: vms + roles: + - { role: username.rolename } + diff --git a/ansible/roles/docker/defaults/main.yml b/ansible/roles/docker/defaults/main.yml new file mode 100644 index 000000000..e69de29bb diff --git a/ansible/roles/docker/handlers/main.yml b/ansible/roles/docker/handlers/main.yml new file mode 100644 index 000000000..e69de29bb diff --git a/ansible/roles/docker/tasks/docker-compose.yml b/ansible/roles/docker/tasks/docker-compose.yml new file mode 100644 index 000000000..1e3f5ed1b --- /dev/null +++ b/ansible/roles/docker/tasks/docker-compose.yml @@ -0,0 +1,5 @@ +--- +- name: Install docker-compose + pip: + name: docker-compose + state: present \ No newline at end of file diff --git a/ansible/roles/docker/tasks/docker.yml b/ansible/roles/docker/tasks/docker.yml new file mode 100644 index 000000000..5d6f54700 --- /dev/null +++ b/ansible/roles/docker/tasks/docker.yml @@ -0,0 +1,5 @@ +--- +- name: Install docker + pip: + name: docker + state: present diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml new file mode 100644 index 000000000..7278ca1e1 --- /dev/null +++ b/ansible/roles/docker/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: Update apt + apt: + update_cache: true + +- name: Install python and pip + apt: + name: + - python3 + - python3-pip \ No newline at end of file diff --git a/ansible/roles/web_app/.DS_Store b/ansible/roles/web_app/.DS_Store new file mode 100644 index 000000000..acae0ccc4 Binary files /dev/null and b/ansible/roles/web_app/.DS_Store differ diff --git a/ansible/roles/web_app/README.md b/ansible/roles/web_app/README.md new file mode 100644 index 000000000..b0c75bdd4 --- /dev/null +++ b/ansible/roles/web_app/README.md @@ -0,0 +1,24 @@ +Docker Role +========= + +The web_app role is used to deploy the app_python on VM, +using Docker image. + +Requirements +------------ + +In case, if the Docker is not installed on the target machine, +it will use previously created "docker" role + +Role Variables +-------------- + +Additional "docker" role + +Example Playbook +---------------- + + - hosts: vms + roles: + - { role: username.rolename } + diff --git a/ansible/roles/web_app/defaults/main.yml b/ansible/roles/web_app/defaults/main.yml new file mode 100644 index 000000000..428a55461 --- /dev/null +++ b/ansible/roles/web_app/defaults/main.yml @@ -0,0 +1,7 @@ +docker_app_base_dir: 'opt/web_app' +docker_image: "maksktl/devops_course_python_app:latest" +docker_container_name: "python_app" +ports: + external: 80 + internal: 5000 +web_app_full_wipe: false \ No newline at end of file diff --git a/ansible/roles/web_app/handlers/main.yml b/ansible/roles/web_app/handlers/main.yml new file mode 100644 index 000000000..54d6ffbf8 --- /dev/null +++ b/ansible/roles/web_app/handlers/main.yml @@ -0,0 +1,7 @@ +--- +- name: restart docker + service: + name: docker + state: "{{ docker_restart_handler_state }}" + ignore_errors: "{{ ansible_check_mode }}" + when: docker_service_manage | bool \ No newline at end of file diff --git a/ansible/roles/web_app/meta/main.yml b/ansible/roles/web_app/meta/main.yml new file mode 100644 index 000000000..9532f831d --- /dev/null +++ b/ansible/roles/web_app/meta/main.yml @@ -0,0 +1,8 @@ +galaxy_info: + author: maksktl + min_ansible_version: 2.1 + platforms: + - name: Ubuntu + versions: + - all + dependencies: [docker] \ No newline at end of file diff --git a/ansible/roles/web_app/tasks/0-wipe.yml b/ansible/roles/web_app/tasks/0-wipe.yml new file mode 100644 index 000000000..5313233fb --- /dev/null +++ b/ansible/roles/web_app/tasks/0-wipe.yml @@ -0,0 +1,14 @@ +- name: Wipe logic + block: + - name: Stop services + community.docker.docker_compose: + project_src: "{{ docker_app_base_dir }}" + state: absent + remove_volumes: true + ignore_errors: true + + - name: Remove directory + ansible.builtin.file: + state: absent + path: "{{ docker_app_base_dir }}" + tags: ["web_app"] \ No newline at end of file diff --git a/ansible/roles/web_app/tasks/docker-compose.yml b/ansible/roles/web_app/tasks/docker-compose.yml new file mode 100644 index 000000000..e405134ca --- /dev/null +++ b/ansible/roles/web_app/tasks/docker-compose.yml @@ -0,0 +1,30 @@ +--- +- name: Check current docker-compose version. + command: "{{ docker_compose_path }} --version" + register: docker_compose_vsn + check_mode: false + changed_when: false + failed_when: false + +- set_fact: + docker_compose_current_version: "{{ docker_compose_vsn.stdout | regex_search('(\\d+(\\.\\d+)+)') }}" + when: docker_compose_vsn.stdout is defined + and (docker_compose_vsn.stdout | length > 0) + +- name: Delete existing docker-compose version if it's different. + file: + path: "{{ docker_compose_path }}" + state: absent + when: > + docker_compose_current_version is defined + and (docker_compose_version | regex_replace('v', '')) not in docker_compose_current_version + +- name: Install Docker Compose (if configured). + get_url: + url: "{{ docker_compose_url }}" + dest: "{{ docker_compose_path }}" + mode: 0755 + when: > + (docker_compose_current_version is not defined) + or (docker_compose_current_version|length == 0) + or (docker_compose_current_version is version((docker_compose_version | regex_replace('v', '')), '<')) diff --git a/ansible/roles/web_app/tasks/docker-users.yml b/ansible/roles/web_app/tasks/docker-users.yml new file mode 100644 index 000000000..6e387e666 --- /dev/null +++ b/ansible/roles/web_app/tasks/docker-users.yml @@ -0,0 +1,10 @@ +--- +- name: Ensure docker users are added to the docker group. + user: + name: "{{ item }}" + groups: docker + append: true + with_items: "{{ docker_users }}" + +- name: Reset ssh connection to apply user changes. + meta: reset_connection diff --git a/ansible/roles/web_app/tasks/main.yml b/ansible/roles/web_app/tasks/main.yml new file mode 100644 index 000000000..3f7de3cfc --- /dev/null +++ b/ansible/roles/web_app/tasks/main.yml @@ -0,0 +1,27 @@ +- name: Make the wipe + ansible.builtin.import_tasks: 0-wipe.yml + when: web_app_full_wipe + tags: ["web_app", "web_app_wipe"] + +- name: Deploy python_app + block: + - name: Create directory + ansible.builtin.file: + path: "{{ docker_app_base_dir }}" + state: directory + mode: "0755" + + - name: Crete docker-compose.yml + ansible.builtin.template: + src: docker-compose.yml.j2 + dest: "{{ docker_app_base_dir }}/docker-compose.yml" + owner: root + group: root + mode: "0600" + + - name: Run docker-compose + ansible.builtin.docker_compose: + project_src: "{{ docker_app_base_dir }}" + state: present + pull: true + tags: ["web_app"] \ No newline at end of file diff --git a/ansible/roles/web_app/templates/docker-compose.yml.j2 b/ansible/roles/web_app/templates/docker-compose.yml.j2 new file mode 100644 index 000000000..770992277 --- /dev/null +++ b/ansible/roles/web_app/templates/docker-compose.yml.j2 @@ -0,0 +1,7 @@ +version: "3.0" +services: + {{ docker_container_name }}: + image: {{ docker_image }} + ports: + - "{{ ports.external }}:{{ ports.internal }}" + restart: always \ No newline at end of file diff --git a/app_js/.dockerignore b/app_js/.dockerignore new file mode 100644 index 000000000..174afc217 --- /dev/null +++ b/app_js/.dockerignore @@ -0,0 +1,5 @@ +.idea/* +README.md +*.md +node_modules/* +Dockerfile \ No newline at end of file diff --git a/app_js/Dockerfile b/app_js/Dockerfile new file mode 100644 index 000000000..70ccf5834 --- /dev/null +++ b/app_js/Dockerfile @@ -0,0 +1,9 @@ +FROM node:19-alpine3.15 AS builder +RUN addgroup -S rungroup && adduser -S runuser -G rungroup +WORKDIR /usr/src/app +COPY package*.json ./ +RUN chown -R runuser:rungroup . + +USER runuser +COPY . . +CMD ["node", "server.js"] \ No newline at end of file diff --git a/app_js/JS.md b/app_js/JS.md new file mode 100644 index 000000000..b7654575f --- /dev/null +++ b/app_js/JS.md @@ -0,0 +1,72 @@ +# Joke Display Web Application + +This simple web application fetches jokes from the [JokeAPI](https://v2.jokeapi.dev/) +and displays them in the center of the screen. You can press the "Another Joke" +button to get a new joke. If a "joke" property is available in the response, +it will be displayed. If the "joke" property is null, it will display the "setup" +and "delivery" properties as a complete joke. + +## Installation + +To run this application locally, follow these steps: + +1. Make sure you have [Node.js](https://nodejs.org/) installed on your computer. + +2. Navigate to the project directory: + + ```bash + cd app_js + ``` + +3. Start a simple HTTP server using Node.js: + + ```bash + node server.js + ``` + +4. Open your web browser and visit [http://localhost:3000](http://localhost:3000) to use the application. + +### Build and run with Docker +1. Clone the repository. Go to `app_js` folder +2. Build an image + + ``` + docker build -t maksktl/app_js:latest . + ``` + + or pull an image from docker hub + + ``` + docker pull maksktl/app_js:latest + ``` +3. Create and run a container from the built image + ``` + docker run -d -p 3000:3000 maksktl/app_js + ``` +4. Access the website `localhost:3000` + +## Usage + +- When you open the application in your web browser, you will initially see "Loading..." in the center of the screen. + +- Press the "Another Joke" button to fetch and display a new joke from the JokeAPI. + +- If the "joke" property is available in the response, it will be displayed. + +- If the "joke" property is null, it will display the "setup" and "delivery" properties as a complete joke. + +- If there is an error in fetching the joke, it will display an error message. + +## Technologies Used + +- JavaScript +- HTML +- CSS +- XMLHttpRequest +- Node.js (for serving the application) +- Docker +- Docker linter: hadolint +## Author + +- Name: Maxim Matantsev +- Email: m.matantsev@innopolis.university diff --git a/app_js/index.html b/app_js/index.html new file mode 100644 index 000000000..f6e8a970f --- /dev/null +++ b/app_js/index.html @@ -0,0 +1,84 @@ + + + + HTTP GET Request Example + + + +
Loading...
+
+ +
+ + + + diff --git a/app_js/server.js b/app_js/server.js new file mode 100644 index 000000000..67bf818ed --- /dev/null +++ b/app_js/server.js @@ -0,0 +1,28 @@ +const http = require('http'); +const fs = require('fs'); +const path = require('path'); + +const server = http.createServer((req, res) => { + + if (req.url === '/') { + const filePath = path.join(__dirname, 'index.html'); + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + res.writeHead(500, { 'Content-Type': 'text/plain' }); + res.end('Internal Server Error'); + } else { + res.writeHead(200, { 'Content-Type': 'text/html' }); + res.end(data); + } + }); + } else { + res.writeHead(404, { 'Content-Type': 'text/plain' }); + res.end('Not Found'); + } +}); + +const port = process.env.PORT || 3000; + +server.listen(port, () => { + console.log(`Server is running on port ${port}`); +}); diff --git a/app_python/.DS_Store b/app_python/.DS_Store new file mode 100644 index 000000000..eb4a89859 Binary files /dev/null and b/app_python/.DS_Store differ diff --git a/app_python/.dockerignore b/app_python/.dockerignore new file mode 100644 index 000000000..0bc924592 --- /dev/null +++ b/app_python/.dockerignore @@ -0,0 +1,4 @@ +demo.gif +Dockerfile +*.md +.flake8 \ No newline at end of file diff --git a/app_python/.flake8 b/app_python/.flake8 new file mode 100644 index 000000000..04921f6c0 --- /dev/null +++ b/app_python/.flake8 @@ -0,0 +1,3 @@ +[flake8] +exclude = venv, .git, pycache +max-line-length = 88 diff --git a/app_python/.pre-commit-config.yaml b/app_python/.pre-commit-config.yaml new file mode 100644 index 000000000..4e55c75e0 --- /dev/null +++ b/app_python/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black diff --git a/app_python/DOCKER.md b/app_python/DOCKER.md new file mode 100644 index 000000000..caf4b24f3 --- /dev/null +++ b/app_python/DOCKER.md @@ -0,0 +1,37 @@ +Report +========= + +## Best practices + +1. Avoid unnecessary privileges. Most containers run by the root user, while most of the + time it is not needed. Good practise to avoid it, and create a special user for those purposes. + * Make executables owned by root and not writable. This will block the executing user + from modifying existing binaries or scripts, which could enable different attacks. + +2. Reduce attack surface. + * Use trusted and maintained images to reduce number of vulnerabilities and problems. + * Expose only those ports that application needs. + +3. Prevent confidential data leaks. + * Use `.dockerignore` file to exclude not relevant files from build context. + +4. Keep layer sanity. The order in the Dockerfile instructions is very important. + RUN, COPY, ADD, and other instructions will create a new container layer, grouping multiple commands + together will reduce the number of layers. + +5. Don’t install unnecessary packages to reduce complexity, dependencies, file sizes, and build times. + +6. Sort multi-line arguments alphanumerically for the ease to maintain and update. + +7. Place Docker layers in such order to maximize build cache. + +8. Use linting to detect bad practices in the Dockerfile. + +9. Use labels to maintain and organise images. + +10. Multi-stage builds to make build efficiency and light in weight + + +# Linter for Dockerfile + +Hadolint linter was used in this application for Dockerfile. \ No newline at end of file diff --git a/app_python/Dockerfile b/app_python/Dockerfile new file mode 100644 index 000000000..3886ff037 --- /dev/null +++ b/app_python/Dockerfile @@ -0,0 +1,35 @@ +# Start with a slim and official Python base image. +FROM python:3.11-slim + +# Flask default port +EXPOSE 5000 + +# Set environment variables. +# Disabling bytecode for a cleaner container. +ENV PYTHONDONTWRITEBYTECODE 1 +# Ensuring unbuffered mode for realtime logs. +ENV PYTHONUNBUFFERED 1 + +# Set the working directory inside the container. +WORKDIR /app + +# Copy the requirements file into the container. +COPY requirements.txt . + +# Upgrade pip and install dependencies, then clean up cache to minimize layers and reduce size. +RUN pip install --upgrade pip \ + && pip install --no-cache-dir -r requirements.txt \ + && rm -rf /root/.cache + +# Create a non-root user and switch to it. +RUN useradd --create-home appuser && chown -R appuser:appuser /app +USER appuser + +# Copy the rest of the application code into the container. +COPY . . + +# Healthcheck instruction to check the /health endpoint. +HEALTHCHECK CMD curl --fail http://localhost:5000/health || exit 1 + +# Command to run the application. +CMD [ "python", "app.py" ] diff --git a/app_python/PYTHON.md b/app_python/PYTHON.md new file mode 100644 index 000000000..e7e1671ec --- /dev/null +++ b/app_python/PYTHON.md @@ -0,0 +1,88 @@ +## Best Practices Applied in the Development of `app_python` + +In the development of `app_python`, several best practices were applied to ensure code +quality, maintainability, and scalability. Here are some of the key practices that were +followed: + +### 1. Code Structure + +- **Modularization**: The application's code was organized into modules and packages to + promote code reusability and maintainability. + +- **Separation of Concerns**: The code followed the principle of separation of concerns, + with clear distinctions between routing, business logic, and presentation layers. + +### 2. Virtual Environment + +- **Virtual Environment**: A Python virtual environment (`venv`) was used to isolate + project dependencies, preventing conflicts with system-wide packages. + +### 3. Dependency Management + +- **Requirements File**: A `requirements.txt` file was used to specify project + dependencies, making it easy to recreate the environment in other locations. + +### 4. Linters and pre-commit hooks + +- Python Linters: Black and Flake8 were used to enforce code formatting and style + guidelines for Python code. They are runs automatically by pre-commit hooks + +- Markdown Linters: Prettier and markdownlint-cli were used to format and lint Markdown + files, ensuring consistent documentation quality. + +### 5. Documentation + +- **README**: A comprehensive README.md file was created to provide project overview, + setup instructions, and usage guidelines for developers and users. + + +### 6. Tests + +- Manual test: Update the page and compare a time in Moscow with time provided by application + +- Error Handling: Usage of try-except block in the application can help to handle errors before the runtime. + +## Choice of Framework: Flask + +### Pros + +1. **Lightweight**: Flask is a lightweight micro-framework that doesn't impose many + constraints on how you structure your application. This flexibility allows developers + to choose their tools and libraries. + +2. **Extensible**: Flask provides the foundation for building web applications and + allows developers to choose and integrate specific libraries and extensions as + needed. This extensibility makes it suitable for various use cases. + +3. **Widely Adopted**: Flask is a popular framework with a large and active community. + This means there are plenty of resources, extensions, and tutorials available for + developers. + +4. **Easy to Learn**: Flask's simplicity and minimalistic design make it relatively easy + for developers, especially beginners, to learn and get started with web development + in Python. + +5. **RESTful API Support**: Flask is well-suited for building RESTful APIs, making it a + great choice for building web services. + +### Cons + +1. **Minimal Features**: While Flask's minimalistic design is a pro for some, it can be + a con for those looking for a more feature-rich framework. Developers may need to + integrate additional libraries for features like authentication, ORM, and form + handling. + +2. **Configuration**: Flask leaves much of the configuration up to the developer, which + can lead to inconsistencies and a steeper learning curve for beginners. + +3. **Scalability**: While Flask can handle small to medium-sized applications well, it + may require additional effort to scale up for larger, more complex projects. + +4. **Opinionated Choices**: Flask's lack of strong opinions can be both an advantage and + a disadvantage. Developers need to make many choices regarding project structure and + tooling, which can lead to variability in codebases. + +In summary, Flask was chosen for `app_python` due to its lightweight and flexible +nature, making it a suitable choice for building a simple web application. However, +developers should carefully consider their project requirements and goals when selecting +a framework, as Flask's minimalistic approach may not be the best fit for all projects. diff --git a/app_python/README.md b/app_python/README.md new file mode 100644 index 000000000..484afe82d --- /dev/null +++ b/app_python/README.md @@ -0,0 +1,86 @@ +# app_python + +## Overview + +This is a simple Python web application built with Flask that displays the current time +in Moscow. It serves as a basic example of a web application and can be used as a +starting point for more complex projects. + +## Build + +To build and run this project locally, follow these steps: + +1. Unpack the archive with the project + +2. Navigate to the project directory: + + ```bash + cd app_python + ``` + +3. Set up a virtual environment: + + ```bash + python -m venv venv + ``` + +4. Activate the virtual environment: + + On Windows: + + ```bash + venv\Scripts\activate + ``` + + On macOS and Linux: + + ```bash + source venv/bin/activate + ``` + +5. Install dependencies: + + ```bash + pip install -r requirements.txt + ``` + +6. Run the application: + + ```bash + python app.py + ``` + +7. Open your web browser and go to [http://127.0.0.1:5000/](http://127.0.0.1:5000/) to + view the current time in Moscow. + +### With Docker +1. Clone the repository. Go to `app_python` folder +2. Build an image + + ``` + docker build -t maksktl/app_python:latest . + ``` + + or pull an image from docker hub + + ``` + docker pull maksktl/app_python:latest + ``` +3. Create and run a container from the built image + ``` + docker run -d -p 8000:5000 maksktl/app_python + ``` +4. Access the website `localhost:8000` + +## Usage + +The application is straightforward to use. Once you have it running locally or deployed, +open a web browser and navigate to the provided URL to see the current time in Moscow. + +## Contact + +If you have any questions or need assistance, feel free to contact the project +maintainer: + +- Name: Maxim Matantsev +- Email: m.matantsev@innopolis.university diff --git a/app_python/TEST.MD b/app_python/TEST.MD new file mode 100644 index 000000000..6016193a4 --- /dev/null +++ b/app_python/TEST.MD @@ -0,0 +1,36 @@ +# Unit Tests for Flask Application + +The Flask application's functionality is tested using a set of unit tests. Here's a breakdown of these tests and the best practices followed: + +## Best Practices: + +1. **Setup and Teardown**: Use `setUp` method to initialize testing environment and resources before each test. This ensures each test runs in a controlled and consistent environment. +2. **Test Independence**: Each test function is independent and verifies a specific functionality or behavior. Tests do not rely on the success of others. +3. **Descriptive Test Names**: Test function names are descriptive enough to understand the functionality being tested. +4. **Assert Functions**: Use appropriate `assert` methods to compare the expected outcome to the actual result. + +## Tests: + +### 1. `test_moscow_time_format` + +- **Purpose**: This test verifies that the `get_moscow_time` function returns Moscow time in the correct format. +- **Implementation**: + - The function's return value is checked to ensure it matches the expected date-time format. + - A successful conversion to a datetime object confirms that the format is correct. + +### 2. `test_moscow_time_endpoint` + +- **Purpose**: To test the main endpoint of the application which displays Moscow time. +- **Implementation**: + - A GET request is made to the root endpoint. + - The test ensures that the server returns a 200 OK status. + - The response's content is checked for the presence of "Current Moscow Time". + +### 3. `test_healthcheck_endpoint` + +- **Purpose**: To test the health check endpoint of the application. +- **Implementation**: + - A GET request is made to the `/health` endpoint. + - The test ensures that the server returns a 200 OK status. + - The response's content is checked to ensure the application is healthy. + \ No newline at end of file diff --git a/app_python/app.py b/app_python/app.py new file mode 100644 index 000000000..f36b4fe7d --- /dev/null +++ b/app_python/app.py @@ -0,0 +1,55 @@ +import logging +from logging.handlers import RotatingFileHandler + +import pytz +from flask import Flask, render_template, jsonify + +from config import LOG_LEVEL, LOG_FILENAME, \ + LOG_MAX_BYTES, LOG_BACKUP_COUNT, LOG_FORMAT +from logic import get_moscow_time + +logger = logging.getLogger() +logger.setLevel(LOG_LEVEL) + +file_handler = RotatingFileHandler( + LOG_FILENAME, + maxBytes=LOG_MAX_BYTES, + backupCount=LOG_BACKUP_COUNT) +file_handler.setLevel(LOG_LEVEL) + +console_handler = logging.StreamHandler() +console_handler.setLevel(LOG_LEVEL) + +formatter = logging.Formatter(LOG_FORMAT) + +file_handler.setFormatter(formatter) +console_handler.setFormatter(formatter) + +logger.addHandler(file_handler) +logger.addHandler(console_handler) + +flask_app = Flask(__name__) + + +@flask_app.route('/') +def moscow_time(): + try: + current_time = get_moscow_time() + flask_app.logger.info('Moscow time fetched successfully.') + return render_template("time.html", current_time=current_time) + except pytz.UnknownTimeZoneError: + flask_app.logger.error("Unknown TimeZone specified.") + return "Error: Unknown TimeZone", 500 + except Exception as e: + flask_app.logger.error(f"Unexpected error: {e}") + return f"Unexpected error: {e}", 500 + + +@flask_app.route('/health') +def health_check(): + """Health check endpoint""" + return jsonify(status="healthy"), 200 + + +if __name__ == "__main__": + flask_app.run(host='0.0.0.0', debug=False) diff --git a/app_python/config.py b/app_python/config.py new file mode 100644 index 000000000..8bc30b4c3 --- /dev/null +++ b/app_python/config.py @@ -0,0 +1,8 @@ +# Constants +import logging + +LOG_FILENAME = 'app.log' +LOG_FORMAT = '[%(asctime)s] %(levelname)s in %(module)s: %(message)s' +LOG_LEVEL = logging.DEBUG +LOG_MAX_BYTES = 100000 +LOG_BACKUP_COUNT = 10 diff --git a/app_python/logic.py b/app_python/logic.py new file mode 100644 index 000000000..f641558fd --- /dev/null +++ b/app_python/logic.py @@ -0,0 +1,8 @@ +from datetime import datetime + +import pytz + + +def get_moscow_time(): + moscow_tz = pytz.timezone('Europe/Moscow') + return datetime.now(moscow_tz).strftime('%Y-%m-%d %H:%M:%S') diff --git a/app_python/requirements.txt b/app_python/requirements.txt new file mode 100644 index 000000000..c27328a9c --- /dev/null +++ b/app_python/requirements.txt @@ -0,0 +1,15 @@ +blinker==1.6.2 +click==8.1.7 +colorama==0.4.6 +Flask==2.3.3 +Flask-Testing==0.8.1 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 +packaging==23.1 +pluggy==1.3.0 +pytest==7.4.2 +pytest-mock==3.11.1 +pytz==2023.3 +Werkzeug==2.3.7 diff --git a/app_python/templates/time.html b/app_python/templates/time.html new file mode 100644 index 000000000..5ea408903 --- /dev/null +++ b/app_python/templates/time.html @@ -0,0 +1,13 @@ + + + + + + + Moscow Time + + +

Current Moscow Time:

+

{{ current_time }}

+ + diff --git a/app_python/test_app.py b/app_python/test_app.py new file mode 100644 index 000000000..d0b79d718 --- /dev/null +++ b/app_python/test_app.py @@ -0,0 +1,43 @@ +import datetime +import unittest + +from app import flask_app +from logic import get_moscow_time + + +class FlaskAppTestCase(unittest.TestCase): + + def setUp(self): + self.app = flask_app.test_client() + self.app.testing = True + + def test_moscow_time_format(self): + """Test the get_moscow_time function for returning + Moscow time in the correct format.""" + time_format = "%Y-%m-%d %H:%M:%S" + moscow_time = get_moscow_time() + + try: + # Try to convert the returned time into a datetime object. + # If it fails, it's not in the expected format. + datetime.datetime.strptime(moscow_time, time_format) + except ValueError: + assert False, \ + "The returned Moscow time is not in the expected format." + + def test_moscow_time_endpoint(self): + """Test the main endpoint for Moscow time.""" + response = self.app.get('/') + self.assertEqual(response.status_code, 200) + self.assertIn(b'Current Moscow Time', response.data) + + def test_healthcheck_endpoint(self): + """Test the healthcheck endpoint.""" + response = self.app.get('/health') + self.assertEqual(response.status_code, 200) + self.assertIn(b'status', response.data) + self.assertIn(b'healthy', response.data) + + +if __name__ == "__main__": + unittest.main() diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl new file mode 100644 index 000000000..4657f48fa --- /dev/null +++ b/terraform/.terraform.lock.hcl @@ -0,0 +1,24 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/kreuzwerker/docker" { + version = "3.0.2" + constraints = "~> 3.0.1" + hashes = [ + "h1:os8pBi4rbtFJJtzNWlcGhOVsz5V9UPJvo+L0wNQFYE8=", + "zh:15b0a2b2b563d8d40f62f83057d91acb02cd0096f207488d8b4298a59203d64f", + "zh:23d919de139f7cd5ebfd2ff1b94e6d9913f0977fcfc2ca02e1573be53e269f95", + "zh:38081b3fe317c7e9555b2aaad325ad3fa516a886d2dfa8605ae6a809c1072138", + "zh:4a9c5065b178082f79ad8160243369c185214d874ff5048556d48d3edd03c4da", + "zh:5438ef6afe057945f28bce43d76c4401254073de01a774760169ac1058830ac2", + "zh:60b7fadc287166e5c9873dfe53a7976d98244979e0ab66428ea0dea1ebf33e06", + "zh:61c5ec1cb94e4c4a4fb1e4a24576d5f39a955f09afb17dab982de62b70a9bdd1", + "zh:a38fe9016ace5f911ab00c88e64b156ebbbbfb72a51a44da3c13d442cd214710", + "zh:c2c4d2b1fd9ebb291c57f524b3bf9d0994ff3e815c0cd9c9bcb87166dc687005", + "zh:d567bb8ce483ab2cf0602e07eae57027a1a53994aba470fa76095912a505533d", + "zh:e83bf05ab6a19dd8c43547ce9a8a511f8c331a124d11ac64687c764ab9d5a792", + "zh:e90c934b5cd65516fbcc454c89a150bfa726e7cf1fe749790c7480bbeb19d387", + "zh:f05f167d2eaf913045d8e7b88c13757e3cf595dd5cd333057fdafc7c4b7fed62", + "zh:fcc9c1cea5ce85e8bcb593862e699a881bd36dffd29e2e367f82d15368659c3d", + ] +} diff --git a/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/CHANGELOG.md b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/CHANGELOG.md new file mode 100644 index 000000000..37dbb7136 --- /dev/null +++ b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/CHANGELOG.md @@ -0,0 +1,655 @@ + + +## [v3.0.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v3.0.1...v3.0.2) (2023-03-17) + +### Docs + +* correct spelling of "networks_advanced" ([#517](https://github.com/kreuzwerker/terraform-provider-docker/issues/517)) + +### Fix + +* Implement proxy support. ([#529](https://github.com/kreuzwerker/terraform-provider-docker/issues/529)) + + + +## [v3.0.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v3.0.0...v3.0.1) (2023-01-13) + +### Chore + +* Prepare release v3.0.1 + +### Fix + +* Access health of container correctly. ([#506](https://github.com/kreuzwerker/terraform-provider-docker/issues/506)) + + + +## [v3.0.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.25.0...v3.0.0) (2023-01-13) + +### Chore + +* Prepare release v3.0.0 + +### Docs + +* Update documentation. +* Add migration guide and update README ([#502](https://github.com/kreuzwerker/terraform-provider-docker/issues/502)) + +### Feat + +* Prepare v3 release ([#503](https://github.com/kreuzwerker/terraform-provider-docker/issues/503)) + + + +## [v2.25.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.24.0...v2.25.0) (2023-01-05) + +### Chore + +* Prepare release v2.25.0 + +### Docs + +* Add documentation of remote hosts. ([#498](https://github.com/kreuzwerker/terraform-provider-docker/issues/498)) + +### Feat + +* Migrate build block to `docker_image` ([#501](https://github.com/kreuzwerker/terraform-provider-docker/issues/501)) +* Add platform attribute to docker_image resource ([#500](https://github.com/kreuzwerker/terraform-provider-docker/issues/500)) +* Add sysctl implementation to container of docker_service. ([#499](https://github.com/kreuzwerker/terraform-provider-docker/issues/499)) + + + +## [v2.24.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.23.1...v2.24.0) (2022-12-23) + +### Chore + +* Prepare release v2.24.0 + +### Docs + +* Fix generated website. +* Update command typo ([#487](https://github.com/kreuzwerker/terraform-provider-docker/issues/487)) + +### Feat + +* cgroupns support ([#497](https://github.com/kreuzwerker/terraform-provider-docker/issues/497)) +* Add triggers attribute to docker_registry_image ([#496](https://github.com/kreuzwerker/terraform-provider-docker/issues/496)) +* Support registries with disabled auth ([#494](https://github.com/kreuzwerker/terraform-provider-docker/issues/494)) +* add IPAM options block for docker networks ([#491](https://github.com/kreuzwerker/terraform-provider-docker/issues/491)) + +### Fix + +* Pin data source specific tag test to older tag. + +### Tests + +* Add test for parsing auth headers. + + + +## [v2.23.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.23.0...v2.23.1) (2022-11-23) + +### Chore + +* Prepare release v2.23.1 + +### Fix + +* Update shasum of busybox:1.35.0 tag in test. +* Handle Auth Header Scopes ([#482](https://github.com/kreuzwerker/terraform-provider-docker/issues/482)) +* Set OS_ARCH from GOHOSTOS and GOHOSTARCH ([#477](https://github.com/kreuzwerker/terraform-provider-docker/issues/477)) + + + +## [v2.23.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.22.0...v2.23.0) (2022-11-02) + +### Chore + +* Prepare release v2.23.0 + +### Feat + +* wait container healthy state ([#467](https://github.com/kreuzwerker/terraform-provider-docker/issues/467)) +* add docker logs data source ([#471](https://github.com/kreuzwerker/terraform-provider-docker/issues/471)) + +### Fix + +* Update shasum of busybox:1.35.0 tag in test. +* Update shasum of busybox:1.35.0 tag +* Correct provider name to match the public registry ([#462](https://github.com/kreuzwerker/terraform-provider-docker/issues/462)) + + + +## [v2.22.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.21.0...v2.22.0) (2022-09-20) + +### Chore + +* Prepare release v2.22.0 + +### Feat + +* Configurable timeout for docker_container resource stateChangeConf ([#454](https://github.com/kreuzwerker/terraform-provider-docker/issues/454)) + +### Fix + +* oauth authorization support for azurecr ([#451](https://github.com/kreuzwerker/terraform-provider-docker/issues/451)) + + + +## [v2.21.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.3...v2.21.0) (2022-09-05) + +### Chore + +* Prepare release v2.21.0 + +### Docs + +* Fix docker config example. + +### Feat + +* Add image_id attribute to docker_image resource. ([#450](https://github.com/kreuzwerker/terraform-provider-docker/issues/450)) +* Update used goversion to 1.18. ([#449](https://github.com/kreuzwerker/terraform-provider-docker/issues/449)) + +### Fix + +* Replace deprecated .latest attribute with new image_id. ([#453](https://github.com/kreuzwerker/terraform-provider-docker/issues/453)) +* Remove reading part of docker_tag resource. ([#448](https://github.com/kreuzwerker/terraform-provider-docker/issues/448)) +* Fix repo_digest value for DockerImageDatasource test. + + + +## [v2.20.3](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.2...v2.20.3) (2022-08-31) + +### Chore + +* Prepare release v2.20.3 + +### Fix + +* Docker Registry Image data source use HEAD request to query image digest ([#433](https://github.com/kreuzwerker/terraform-provider-docker/issues/433)) +* Adding Support for Windows Paths in Bash ([#438](https://github.com/kreuzwerker/terraform-provider-docker/issues/438)) + + + +## [v2.20.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.1...v2.20.2) (2022-08-10) + +### Chore + +* Prepare release v2.20.2 + +### Fix + +* Check the operating system for determining the default Docker socket ([#427](https://github.com/kreuzwerker/terraform-provider-docker/issues/427)) + +### Reverts + +* fix(deps): update module github.com/golangci/golangci-lint to v1.48.0 ([#423](https://github.com/kreuzwerker/terraform-provider-docker/issues/423)) + + + +## [v2.20.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.20.0...v2.20.1) (2022-08-10) + +### Chore + +* Prepare release v2.20.1 +* Reduce time to setup AccTests ([#430](https://github.com/kreuzwerker/terraform-provider-docker/issues/430)) + +### Docs + +* Improve docker network usage documentation [skip-ci] + +### Feat + +* Implement triggers attribute for docker_image. ([#425](https://github.com/kreuzwerker/terraform-provider-docker/issues/425)) + +### Fix + +* Add ForceTrue to docker_image name attribute. ([#421](https://github.com/kreuzwerker/terraform-provider-docker/issues/421)) + + + +## [v2.20.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.19.0...v2.20.0) (2022-07-28) + +### Chore + +* Prepare release v2.20.0 +* Fix release targets in Makefile. + +### Feat + +* Implementation of `docker_tag` resource. ([#418](https://github.com/kreuzwerker/terraform-provider-docker/issues/418)) +* Implement support for insecure registries ([#414](https://github.com/kreuzwerker/terraform-provider-docker/issues/414)) + + + +## [v2.19.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.18.1...v2.19.0) (2022-07-15) + +### Chore + +* Prepare release v2.19.0 + +### Feat + +* Add gpu flag to docker_container resource ([#405](https://github.com/kreuzwerker/terraform-provider-docker/issues/405)) + +### Fix + +* Enable authentication to multiple registries again. ([#400](https://github.com/kreuzwerker/terraform-provider-docker/issues/400)) +* ECR authentication ([#409](https://github.com/kreuzwerker/terraform-provider-docker/issues/409)) + + + +## [v2.18.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.18.0...v2.18.1) (2022-07-14) + +### Chore + +* Prepare release v2.18.1 +* Automate changelog generation [skip ci] + +### Fix + +* Improve searchLocalImages error handling. ([#407](https://github.com/kreuzwerker/terraform-provider-docker/issues/407)) +* Throw errors when any part of docker config file handling goes wrong. ([#406](https://github.com/kreuzwerker/terraform-provider-docker/issues/406)) +* Enables having a Dockerfile outside the context ([#402](https://github.com/kreuzwerker/terraform-provider-docker/issues/402)) + + + +## [v2.18.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.17.0...v2.18.0) (2022-07-11) + +### Chore + +* prepare release v2.18.0 + +### Feat + +* add runtime, stop_signal and stop_timeout properties to the docker_container resource ([#364](https://github.com/kreuzwerker/terraform-provider-docker/issues/364)) + +### Fix + +* Correctly handle build files and context for docker_registry_image ([#398](https://github.com/kreuzwerker/terraform-provider-docker/issues/398)) +* Switch to proper go tools mechanism to fix website-* workflows. ([#399](https://github.com/kreuzwerker/terraform-provider-docker/issues/399)) +* compare relative paths when excluding, fixes kreuzwerker[#280](https://github.com/kreuzwerker/terraform-provider-docker/issues/280) ([#397](https://github.com/kreuzwerker/terraform-provider-docker/issues/397)) + + + +## [v2.17.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.16.0...v2.17.0) (2022-06-23) + +### Chore + +* prepare release v2.17.0 +* Exclude examples directory from renovate. +* remove the workflow to close stale issues and pull requests ([#371](https://github.com/kreuzwerker/terraform-provider-docker/issues/371)) + +### Fix + +* update go package files directly on master to fix build. +* correct authentication for ghcr.io registry([#349](https://github.com/kreuzwerker/terraform-provider-docker/issues/349)) + + + +## [v2.16.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.15.0...v2.16.0) (2022-01-24) + +### Chore + +* prepare release v2.16.0 + +### Docs + +* fix service options ([#337](https://github.com/kreuzwerker/terraform-provider-docker/issues/337)) +* update registry_image.md ([#321](https://github.com/kreuzwerker/terraform-provider-docker/issues/321)) +* fix r/registry_image truncated docs ([#304](https://github.com/kreuzwerker/terraform-provider-docker/issues/304)) + +### Feat + +* add parameter for SSH options ([#335](https://github.com/kreuzwerker/terraform-provider-docker/issues/335)) + +### Fix + +* pass container rm flag ([#322](https://github.com/kreuzwerker/terraform-provider-docker/issues/322)) +* add nil check of DriverConfig ([#315](https://github.com/kreuzwerker/terraform-provider-docker/issues/315)) +* fmt of go files for go 1.17 + + + +## [v2.15.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.14.0...v2.15.0) (2021-08-11) + +### Chore + +* prepare release v2.15.0 +* re go gets terraform-plugin-docs + +### Docs + +* corrects authentication misspell. Closes [#264](https://github.com/kreuzwerker/terraform-provider-docker/issues/264) + +### Feat + +* add container storage opts ([#258](https://github.com/kreuzwerker/terraform-provider-docker/issues/258)) + +### Fix + +* add current timestamp for file upload to container ([#259](https://github.com/kreuzwerker/terraform-provider-docker/issues/259)) + + + +## [v2.14.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.13.0...v2.14.0) (2021-07-09) + +### Chore + +* prepare release v2.14.0 + +### Docs + +* update to absolute path for registry image context ([#246](https://github.com/kreuzwerker/terraform-provider-docker/issues/246)) +* update readme with logos and subsections ([#235](https://github.com/kreuzwerker/terraform-provider-docker/issues/235)) + +### Feat + +* support terraform v1 ([#242](https://github.com/kreuzwerker/terraform-provider-docker/issues/242)) + +### Fix + +* Update the URL of the docker hub registry ([#230](https://github.com/kreuzwerker/terraform-provider-docker/issues/230)) + + + +## [v2.13.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.2...v2.13.0) (2021-06-22) + +### Chore + +* prepare release v2.13.0 + +### Docs + +* fix a few typos ([#216](https://github.com/kreuzwerker/terraform-provider-docker/issues/216)) +* fix typos in docker_image example usage ([#213](https://github.com/kreuzwerker/terraform-provider-docker/issues/213)) + + + +## [v2.12.2](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.1...v2.12.2) (2021-05-26) + +### Chore + +* prepare release v2.12.2 + + + +## [v2.12.1](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.12.0...v2.12.1) (2021-05-26) + +### Chore + +* update changelog for v2.12.1 + +### Fix + +* add service host flattener with space split ([#205](https://github.com/kreuzwerker/terraform-provider-docker/issues/205)) +* service state upgradeV2 for empty auth + + + +## [v2.12.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.11.0...v2.12.0) (2021-05-23) + +### Chore + +* update changelog for v2.12.0 +* ignore dist folder +* configure actions/stale ([#157](https://github.com/kreuzwerker/terraform-provider-docker/issues/157)) +* add the guide about Terraform Configuration in Bug Report ([#139](https://github.com/kreuzwerker/terraform-provider-docker/issues/139)) +* bump docker dependency to v20.10.5 ([#119](https://github.com/kreuzwerker/terraform-provider-docker/issues/119)) + +### Ci + +* run acceptance tests with multiple Terraform versions ([#129](https://github.com/kreuzwerker/terraform-provider-docker/issues/129)) + +### Docs + +* update for v2.12.0 +* add releasing steps +* format `Guide of Bug report` ([#159](https://github.com/kreuzwerker/terraform-provider-docker/issues/159)) +* add an example to build an image with docker_image ([#158](https://github.com/kreuzwerker/terraform-provider-docker/issues/158)) +* add a guide about writing issues to CONTRIBUTING.md ([#149](https://github.com/kreuzwerker/terraform-provider-docker/issues/149)) +* fix Github repository URL in README ([#136](https://github.com/kreuzwerker/terraform-provider-docker/issues/136)) + +### Feat + +* support darwin arm builds and golang 1.16 ([#140](https://github.com/kreuzwerker/terraform-provider-docker/issues/140)) +* migrate to terraform-sdk v2 ([#102](https://github.com/kreuzwerker/terraform-provider-docker/issues/102)) + +### Fix + +* rewriting tar header fields ([#198](https://github.com/kreuzwerker/terraform-provider-docker/issues/198)) +* test spaces for windows ([#190](https://github.com/kreuzwerker/terraform-provider-docker/issues/190)) +* replace for loops with StateChangeConf ([#182](https://github.com/kreuzwerker/terraform-provider-docker/issues/182)) +* skip sign on compile action +* assign map to rawState when it is nil to prevent panic ([#180](https://github.com/kreuzwerker/terraform-provider-docker/issues/180)) +* search local images with Docker image ID ([#151](https://github.com/kreuzwerker/terraform-provider-docker/issues/151)) +* set "ForceNew: true" to labelSchema ([#152](https://github.com/kreuzwerker/terraform-provider-docker/issues/152)) + + + +## [v2.11.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.10.0...v2.11.0) (2021-01-22) + +### Chore + +* update changelog for v2.11.0 +* updates changelog for v2.10.0 + +### Docs + +* fix legacy configuration style ([#126](https://github.com/kreuzwerker/terraform-provider-docker/issues/126)) + +### Feat + +* add properties -it (tty and stdin_opn) to docker container + + + +## [v2.10.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.9.0...v2.10.0) (2021-01-08) + +### Chore + +* updates changelog for 2.10.0 +* ignores testing folders +* adds separate bug and ft req templates + +### Ci + +* bumps to docker version 20.10.1 +* pins workflows to ubuntu:20.04 image + +### Docs + +* add labels to arguments of docker_service ([#105](https://github.com/kreuzwerker/terraform-provider-docker/issues/105)) +* cleans readme +* adds coc and contributing + +### Feat + +* supports Docker plugin ([#35](https://github.com/kreuzwerker/terraform-provider-docker/issues/35)) +* support max replicas of Docker Service Task Spec ([#112](https://github.com/kreuzwerker/terraform-provider-docker/issues/112)) +* add force_remove option to r/image ([#104](https://github.com/kreuzwerker/terraform-provider-docker/issues/104)) +* add local semantic commit validation ([#99](https://github.com/kreuzwerker/terraform-provider-docker/issues/99)) +* add ability to lint/check of links in documentation locally ([#98](https://github.com/kreuzwerker/terraform-provider-docker/issues/98)) + +### Fix + +* set "latest" to tag when tag isn't specified ([#117](https://github.com/kreuzwerker/terraform-provider-docker/issues/117)) +* image label for workflows +* remove all azure cps + +### Pull Requests + +* Merge pull request [#38](https://github.com/kreuzwerker/terraform-provider-docker/issues/38) from kreuzwerker/ci-ubuntu2004-workflow +* Merge pull request [#36](https://github.com/kreuzwerker/terraform-provider-docker/issues/36) from kreuzwerker/chore-gh-issue-tpl + + + +## [v2.9.0](https://github.com/kreuzwerker/terraform-provider-docker/compare/v2.8.0...v2.9.0) (2020-12-25) + +### Chore + +* updates changelog for 2.9.0 +* update changelog 2.8.0 release date +* introduces golangci-lint ([#32](https://github.com/kreuzwerker/terraform-provider-docker/issues/32)) +* fix changelog links + +### Ci + +* add gofmt's '-s' option +* remove unneeded make tasks +* fix test of website + +### Doc + +* devices is a block, not a boolean + +### Feat + +* adds support for OCI manifests ([#316](https://github.com/kreuzwerker/terraform-provider-docker/issues/316)) +* adds security_opts to container config. ([#308](https://github.com/kreuzwerker/terraform-provider-docker/issues/308)) +* adds support for init process injection for containers. ([#300](https://github.com/kreuzwerker/terraform-provider-docker/issues/300)) + +### Fix + +* changing mounts requires ForceNew ([#314](https://github.com/kreuzwerker/terraform-provider-docker/issues/314)) +* allow healthcheck to be computed as container can specify ([#312](https://github.com/kreuzwerker/terraform-provider-docker/issues/312)) +* treat null user as a no-op ([#318](https://github.com/kreuzwerker/terraform-provider-docker/issues/318)) +* workdir null behavior ([#320](https://github.com/kreuzwerker/terraform-provider-docker/issues/320)) + +### Style + +* format with gofumpt + +### Pull Requests + +* Merge pull request [#33](https://github.com/kreuzwerker/terraform-provider-docker/issues/33) from brandonros/patch-1 +* Merge pull request [#11](https://github.com/kreuzwerker/terraform-provider-docker/issues/11) from suzuki-shunsuke/format-with-gofumpt +* Merge pull request [#26](https://github.com/kreuzwerker/terraform-provider-docker/issues/26) from kreuzwerker/ci/fix-website-ci +* Merge pull request [#8](https://github.com/kreuzwerker/terraform-provider-docker/issues/8) from dubo-dubon-duponey/patch1 + + + +## v2.8.0 (2020-11-11) + +### Chore + +* updates changelog for 2.8.0 +* removes travis.yml +* deactivates travis +* removes vendor dir ([#298](https://github.com/kreuzwerker/terraform-provider-docker/issues/298)) +* bump go 115 ([#297](https://github.com/kreuzwerker/terraform-provider-docker/issues/297)) +* documentation updates ([#286](https://github.com/kreuzwerker/terraform-provider-docker/issues/286)) +* updates link syntax ([#287](https://github.com/kreuzwerker/terraform-provider-docker/issues/287)) +* fix typo ([#292](https://github.com/kreuzwerker/terraform-provider-docker/issues/292)) + +### Ci + +* reactivats all workflows +* fix website +* only run website workflow +* exports gopath manually +* fix absolute gopath for website +* make website check separate workflow +* fix workflow names +* adds website test to unit test +* adds acc test +* adds compile +* adds go version and goproxy env +* enables unit tests for master branch +* adds unit test workflow +* adds goreleaser and gh action +* bumps docker and ubuntu versions ([#241](https://github.com/kreuzwerker/terraform-provider-docker/issues/241)) +* removes debug option from acc tests +* skips test which is flaky only on travis + +### Deps + +* github.com/hashicorp/terraform[@sdk](https://github.com/sdk)-v0.11-with-go-modules Updated via: go get github.com/hashicorp/terraform[@sdk](https://github.com/sdk)-v0.11-with-go-modules and go mod tidy +* use go modules for dep mgmt run go mod tidy remove govendor from makefile and travis config set appropriate env vars for go modules + +### Docker + +* improve validation of runtime constraints + +### Docs + +* update container.html.markdown ([#278](https://github.com/kreuzwerker/terraform-provider-docker/issues/278)) +* update service.html.markdown ([#281](https://github.com/kreuzwerker/terraform-provider-docker/issues/281)) +* update restart_policy for service. Closes [#228](https://github.com/kreuzwerker/terraform-provider-docker/issues/228) +* adds new label structure. Closes [#214](https://github.com/kreuzwerker/terraform-provider-docker/issues/214) +* update anchors with -1 suffix ([#178](https://github.com/kreuzwerker/terraform-provider-docker/issues/178)) +* Fix misspelled words +* Fix exported attribute name in docker_registry_image +* Fix example for docker_registry_image ([#8308](https://github.com/kreuzwerker/terraform-provider-docker/issues/8308)) +* provider/docker - network settings attrs + +### Feat + +* conditionally adding port binding ([#293](https://github.com/kreuzwerker/terraform-provider-docker/issues/293)). +* adds docker Image build feature ([#283](https://github.com/kreuzwerker/terraform-provider-docker/issues/283)) +* adds complete support for Docker credential helpers ([#253](https://github.com/kreuzwerker/terraform-provider-docker/issues/253)) +* Expose IPv6 properties as attributes +* allow use of source file instead of content / content_base64 ([#240](https://github.com/kreuzwerker/terraform-provider-docker/issues/240)) +* supports to update docker_container ([#236](https://github.com/kreuzwerker/terraform-provider-docker/issues/236)) +* support to import some docker_container's attributes ([#234](https://github.com/kreuzwerker/terraform-provider-docker/issues/234)) +* adds config file content as plain string ([#232](https://github.com/kreuzwerker/terraform-provider-docker/issues/232)) +* make UID, GID, & mode for secrets and configs configurable ([#231](https://github.com/kreuzwerker/terraform-provider-docker/issues/231)) +* adds import for resources ([#196](https://github.com/kreuzwerker/terraform-provider-docker/issues/196)) +* add container ipc mode. ([#182](https://github.com/kreuzwerker/terraform-provider-docker/issues/182)) +* adds container working dir ([#181](https://github.com/kreuzwerker/terraform-provider-docker/issues/181)) + +### Fix + +* ignores 'remove_volumes' on container import +* duplicated buildImage function +* port objects with the same internal port but different protocol trigger recreation of container ([#274](https://github.com/kreuzwerker/terraform-provider-docker/issues/274)) +* panic to migrate schema of docker_container from v1 to v2 ([#271](https://github.com/kreuzwerker/terraform-provider-docker/issues/271)). Closes [#264](https://github.com/kreuzwerker/terraform-provider-docker/issues/264) +* pins docker registry for tests to v2.7.0 +* prevent force recreate of container about some attributes ([#269](https://github.com/kreuzwerker/terraform-provider-docker/issues/269)) +* service endpoint spec flattening +* corrects IPAM config read on the data provider ([#229](https://github.com/kreuzwerker/terraform-provider-docker/issues/229)) +* replica to 0 in current schema. Closes [#221](https://github.com/kreuzwerker/terraform-provider-docker/issues/221) +* label for network and volume after improt +* binary upload as base 64 content ([#194](https://github.com/kreuzwerker/terraform-provider-docker/issues/194)) +* service env truncation for multiple delimiters ([#193](https://github.com/kreuzwerker/terraform-provider-docker/issues/193)) +* destroy_grace_seconds are considered ([#179](https://github.com/kreuzwerker/terraform-provider-docker/issues/179)) + +### Make + +* Add website + website-test targets + +### Provider + +* Ensured Go 1.11 in TravisCI and README provider: Run go fix provider: Run go fmt provider: Encode go version 1.11.5 to .go-version file +* Require Go 1.11 in TravisCI and README provider: Run go fix provider: Run go fmt + +### Tests + +* Skip test if swap limit isn't available ([#136](https://github.com/kreuzwerker/terraform-provider-docker/issues/136)) +* Simplify Dockerfile(s) + +### Vendor + +* github.com/hashicorp/terraform/...[@v0](https://github.com/v0).10.0 +* Ignore github.com/hashicorp/terraform/backend + +### Website + +* Docs sweep for lists & maps +* note on docker +* docker docs + +### Pull Requests + +* Merge pull request [#134](https://github.com/kreuzwerker/terraform-provider-docker/issues/134) from terraform-providers/go-modules-2019-03-01 +* Merge pull request [#135](https://github.com/kreuzwerker/terraform-provider-docker/issues/135) from terraform-providers/t-simplify-dockerfile +* Merge pull request [#47](https://github.com/kreuzwerker/terraform-provider-docker/issues/47) from captn3m0/docker-link-warning +* Merge pull request [#60](https://github.com/kreuzwerker/terraform-provider-docker/issues/60) from terraform-providers/f-make-website +* Merge pull request [#23](https://github.com/kreuzwerker/terraform-provider-docker/issues/23) from JamesLaverack/patch-1 +* Merge pull request [#18](https://github.com/kreuzwerker/terraform-provider-docker/issues/18) from terraform-providers/vendor-tf-0.10 +* Merge pull request [#5046](https://github.com/kreuzwerker/terraform-provider-docker/issues/5046) from tpounds/use-built-in-schema-string-hash +* Merge pull request [#3761](https://github.com/kreuzwerker/terraform-provider-docker/issues/3761) from ryane/f-provider-docker-improvements +* Merge pull request [#3383](https://github.com/kreuzwerker/terraform-provider-docker/issues/3383) from apparentlymart/docker-container-command-docs +* Merge pull request [#1564](https://github.com/kreuzwerker/terraform-provider-docker/issues/1564) from nickryand/docker_links + diff --git a/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/LICENSE b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/README.md b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/README.md new file mode 100644 index 000000000..1f21b5155 --- /dev/null +++ b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/README.md @@ -0,0 +1,117 @@ + + Docker logo + + + Terraform logo + + + Kreuzwerker logo + + +# Terraform Provider for Docker + +[![Release](https://img.shields.io/github/v/release/kreuzwerker/terraform-provider-docker)](https://github.com/kreuzwerker/terraform-provider-docker/releases) +[![Installs](https://img.shields.io/badge/dynamic/json?logo=terraform&label=installs&query=$.data.attributes.downloads&url=https%3A%2F%2Fregistry.terraform.io%2Fv2%2Fproviders%2F713)](https://registry.terraform.io/providers/kreuzwerker/docker) +[![Registry](https://img.shields.io/badge/registry-doc%40latest-lightgrey?logo=terraform)](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs) +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kreuzwerker/terraform-provider-docker/blob/main/LICENSE) +[![Go Status](https://github.com/kreuzwerker/terraform-provider-docker/workflows/Acc%20Tests/badge.svg)](https://github.com/kreuzwerker/terraform-provider-docker/actions) +[![Lint Status](https://github.com/kreuzwerker/terraform-provider-docker/workflows/golangci-lint/badge.svg)](https://github.com/kreuzwerker/terraform-provider-docker/actions) +[![Go Report Card](https://goreportcard.com/badge/github.com/kreuzwerker/terraform-provider-docker)](https://goreportcard.com/report/github.com/kreuzwerker/terraform-provider-docker) + +## Documentation + +The documentation for the provider is available on the [Terraform Registry](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs). + +Do you want to migrate from `v2.x` to `v3.x`? Please read the [migration guide](docs/v2_v3_migration.md) + +## Example usage + +Take a look at the examples in the [documentation](https://registry.terraform.io/providers/kreuzwerker/docker/3.0.2/docs) of the registry +or use the following example: + + +```hcl +# Set the required provider and versions +terraform { + required_providers { + # We recommend pinning to the specific version of the Docker Provider you're using + # since new versions are released frequently + docker = { + source = "kreuzwerker/docker" + version = "3.0.2" + } + } +} + +# Configure the docker provider +provider "docker" { +} + +# Create a docker image resource +# -> docker pull nginx:latest +resource "docker_image" "nginx" { + name = "nginx:latest" + keep_locally = true +} + +# Create a docker container resource +# -> same as 'docker run --name nginx -p8080:80 -d nginx:latest' +resource "docker_container" "nginx" { + name = "nginx" + image = docker_image.nginx.image_id + + ports { + external = 8080 + internal = 80 + } +} + +# Or create a service resource +# -> same as 'docker service create -d -p 8081:80 --name nginx-service --replicas 2 nginx:latest' +resource "docker_service" "nginx_service" { + name = "nginx-service" + task_spec { + container_spec { + image = docker_image.nginx.repo_digest + } + } + + mode { + replicated { + replicas = 2 + } + } + + endpoint_spec { + ports { + published_port = 8081 + target_port = 80 + } + } +} +``` + +## Building The Provider + +[Go](https://golang.org/doc/install) 1.18.x (to build the provider plugin) + + +```sh +$ git clone git@github.com:kreuzwerker/terraform-provider-docker +$ make build +``` + +## Contributing + +The Terraform Docker Provider is the work of many of contributors. We appreciate your help! + +To contribute, please read the contribution guidelines: [Contributing to Terraform - Docker Provider](CONTRIBUTING.md) + +## License + +The Terraform Provider Docker is available to everyone under the terms of the Mozilla Public License Version 2.0. [Take a look the LICENSE file](LICENSE). + + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/kreuzwerker/terraform-provider-docker.svg)](https://starchart.cc/kreuzwerker/terraform-provider-docker) diff --git a/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/terraform-provider-docker_v3.0.2 b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/terraform-provider-docker_v3.0.2 new file mode 100644 index 000000000..cdf21aa52 Binary files /dev/null and b/terraform/.terraform/providers/registry.terraform.io/kreuzwerker/docker/3.0.2/darwin_amd64/terraform-provider-docker_v3.0.2 differ diff --git a/terraform/TF.md b/terraform/TF.md new file mode 100644 index 000000000..3f9d235a3 --- /dev/null +++ b/terraform/TF.md @@ -0,0 +1,138 @@ +### **Result of terraform state show:** + +``` +# docker_container.nginx: +resource "docker_container" "nginx" { + attach = false + command = [ + "nginx", + "-g", + "daemon off;", + ] + container_read_refresh_timeout_milliseconds = 15000 + cpu_shares = 0 + entrypoint = [ + "/docker-entrypoint.sh", + ] + env = [] + hostname = "c03b5c5b2132" + id = "c03b5c5b21322616113949bc566cfb38f1632ada3ba52d6e4dc0d495aad1950b" + image = "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647" + init = false + ipc_mode = "private" + log_driver = "json-file" + logs = false + max_retry_count = 0 + memory = 0 + memory_swap = 0 + must_run = true + name = "tutorial" + network_data = [ + { + gateway = "172.17.0.1" + global_ipv6_address = "" + global_ipv6_prefix_length = 0 + ip_address = "172.17.0.2" + ip_prefix_length = 16 + ipv6_gateway = "" + mac_address = "02:42:ac:11:00:02" + network_name = "bridge" + }, + ] + network_mode = "default" + privileged = false + publish_all_ports = false + read_only = false + remove_volumes = true + restart = "no" + rm = false + runtime = "runc" + security_opts = [] + shm_size = 64 + start = true + stdin_open = false + stop_signal = "SIGQUIT" + stop_timeout = 0 + tty = false + wait = false + wait_timeout = 60 + + ports { + external = 8000 + internal = 80 + ip = "0.0.0.0" + protocol = "tcp" + } +} + +# docker_image.nginx: +resource "docker_image" "nginx" { + id = "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647nginx" + image_id = "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647" + keep_locally = false + name = "nginx" + repo_digest = "nginx@sha256:86e53c4c16a6a276b204b0fd3a8143d86547c967dc8258b3d47c3a21bb68d3c6" +} +``` + +### **Result of terraform state list:** +``` +docker_container.nginx +docker_image.nginx +``` + +### **Applied changes:** +``` +ports { + external = 80 + internal = 8080 +``` + +### **Log with the applied changes:** +``` +Apply complete! Resources: 1 added, 0 changed, 1 destroyed. +``` + +### **Result of terraform output:** +``` +container_id = "45c5af98f1892cb48a6bbfb4cc2eff7df330e80042406248255b805599f84c91" +image_id = "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647nginx" +``` + +### **Terraform on VKCloud:** +``` +terraform { + required_providers { + vkcs = { + source = "vk-cs/vkcs" + version = "~> 0.1.12" + } + } +} + +provider "vkcs" { + # Your user account. + username = "max.mat@gmail.com" + + # The password of the account + password = "YOUR_PASSWORD" + + # The tenant token can be taken from the project Settings tab - > API keys. + # Project ID will be our token. + project_id = "2cd713920a2443fa9c08c5e4f0208c82" + + # Region name + region = "RegionOne" + + auth_url = "https://infra.mail.ru:35357/v3/" +} +``` + +### **Best Practices:** +1. Adhere to a conventional module hierarchy. Each module should begin with a main.tf file, which is where the default resources are saved. +2. Use underscores to separate words in the names of all configuration objects (**f.e. github_branch_default**). This procedure guarantees that resource types, data source types, and other preset values are all named consistently. +3. Put all the outputs into a file called outputs.tf. +4. Keep expression complexity to a minimum +5. Group resources logically by giving them descriptive names like loadbalancer.tf, instances.tf, or network.tf, along with their own files. +6. In variables.tf, declare every variable. +7. Give variables names that are descriptive and appropriate for their intended use. diff --git a/terraform/cloud-terraform/main.tf b/terraform/cloud-terraform/main.tf new file mode 100644 index 000000000..e69de29bb diff --git a/terraform/main.tf b/terraform/main.tf new file mode 100644 index 000000000..577d36f95 --- /dev/null +++ b/terraform/main.tf @@ -0,0 +1,25 @@ +terraform { + required_providers { + docker = { + source = "maksktl/docker" + version = "~> 3.0.1" + } + } +} + +provider "docker" {} + +resource "docker_image" "nginx" { + name = "nginx" + keep_locally = false +} + +resource "docker_container" "nginx" { + image = docker_image.nginx.image_id + name = "tutorial" + + ports { + internal = 80 + external = 8080 + } +} diff --git a/terraform/outputs.tf b/terraform/outputs.tf new file mode 100644 index 000000000..15447211a --- /dev/null +++ b/terraform/outputs.tf @@ -0,0 +1,10 @@ +output "container_id" { + description = "ID of the Docker container" + value = docker_container.nginx.id +} + +output "image_id" { + description = "ID of the Docker image" + value = docker_image.nginx.id +} + diff --git a/terraform/terraform.tfstate b/terraform/terraform.tfstate new file mode 100644 index 000000000..0977aedfe --- /dev/null +++ b/terraform/terraform.tfstate @@ -0,0 +1,153 @@ +{ + "version": 4, + "terraform_version": "1.6.3", + "serial": 13, + "lineage": "c3a4dada-f0a6-a189-4f30-88d975654ba5", + "outputs": { + "container_id": { + "value": "45c5af98f1892cb48a6bbfb4cc2eff7df330e80042406248255b805599f84c91", + "type": "string" + }, + "image_id": { + "value": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647nginx", + "type": "string" + } + }, + "resources": [ + { + "mode": "managed", + "type": "docker_container", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "attach": false, + "bridge": "", + "capabilities": [], + "cgroupns_mode": null, + "command": [ + "nginx", + "-g", + "daemon off;" + ], + "container_logs": null, + "container_read_refresh_timeout_milliseconds": 15000, + "cpu_set": "", + "cpu_shares": 0, + "destroy_grace_seconds": null, + "devices": [], + "dns": [], + "dns_opts": [], + "dns_search": [], + "domainname": "", + "entrypoint": [ + "/docker-entrypoint.sh" + ], + "env": [], + "exit_code": null, + "gpus": null, + "group_add": [], + "healthcheck": [], + "host": [], + "hostname": "45c5af98f189", + "id": "45c5af98f1892cb48a6bbfb4cc2eff7df330e80042406248255b805599f84c91", + "image": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647", + "init": false, + "ipc_mode": "private", + "labels": [], + "log_driver": "json-file", + "log_opts": {}, + "logs": false, + "max_retry_count": 0, + "memory": 0, + "memory_swap": 0, + "mounts": [], + "must_run": true, + "name": "tutorial", + "network_data": [ + { + "gateway": "172.17.0.1", + "global_ipv6_address": "", + "global_ipv6_prefix_length": 0, + "ip_address": "172.17.0.2", + "ip_prefix_length": 16, + "ipv6_gateway": "", + "mac_address": "02:42:ac:11:00:02", + "network_name": "bridge" + } + ], + "network_mode": "default", + "networks_advanced": [], + "pid_mode": "", + "ports": [ + { + "external": 8080, + "internal": 80, + "ip": "0.0.0.0", + "protocol": "tcp" + } + ], + "privileged": false, + "publish_all_ports": false, + "read_only": false, + "remove_volumes": true, + "restart": "no", + "rm": false, + "runtime": "runc", + "security_opts": [], + "shm_size": 64, + "start": true, + "stdin_open": false, + "stop_signal": "SIGQUIT", + "stop_timeout": 0, + "storage_opts": {}, + "sysctls": {}, + "tmpfs": {}, + "tty": false, + "ulimit": [], + "upload": [], + "user": "", + "userns_mode": "", + "volumes": [], + "wait": false, + "wait_timeout": 60, + "working_dir": "" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "docker_image.nginx" + ] + } + ] + }, + { + "mode": "managed", + "type": "docker_image", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "build": [], + "force_remove": null, + "id": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647nginx", + "image_id": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647", + "keep_locally": false, + "name": "nginx", + "platform": null, + "pull_triggers": null, + "repo_digest": "nginx@sha256:86e53c4c16a6a276b204b0fd3a8143d86547c967dc8258b3d47c3a21bb68d3c6", + "triggers": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + } + ], + "check_results": null +} diff --git a/terraform/terraform.tfstate.backup b/terraform/terraform.tfstate.backup new file mode 100644 index 000000000..350d464f1 --- /dev/null +++ b/terraform/terraform.tfstate.backup @@ -0,0 +1,144 @@ +{ + "version": 4, + "terraform_version": "1.6.3", + "serial": 12, + "lineage": "c3a4dada-f0a6-a189-4f30-88d975654ba5", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "docker_container", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 2, + "attributes": { + "attach": false, + "bridge": "", + "capabilities": [], + "cgroupns_mode": null, + "command": [ + "nginx", + "-g", + "daemon off;" + ], + "container_logs": null, + "container_read_refresh_timeout_milliseconds": 15000, + "cpu_set": "", + "cpu_shares": 0, + "destroy_grace_seconds": null, + "devices": [], + "dns": null, + "dns_opts": null, + "dns_search": null, + "domainname": "", + "entrypoint": [ + "/docker-entrypoint.sh" + ], + "env": [], + "exit_code": null, + "gpus": null, + "group_add": null, + "healthcheck": null, + "host": [], + "hostname": "45c5af98f189", + "id": "45c5af98f1892cb48a6bbfb4cc2eff7df330e80042406248255b805599f84c91", + "image": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647", + "init": false, + "ipc_mode": "private", + "labels": [], + "log_driver": "json-file", + "log_opts": null, + "logs": false, + "max_retry_count": 0, + "memory": 0, + "memory_swap": 0, + "mounts": [], + "must_run": true, + "name": "tutorial", + "network_data": [ + { + "gateway": "172.17.0.1", + "global_ipv6_address": "", + "global_ipv6_prefix_length": 0, + "ip_address": "172.17.0.2", + "ip_prefix_length": 16, + "ipv6_gateway": "", + "mac_address": "02:42:ac:11:00:02", + "network_name": "bridge" + } + ], + "network_mode": "default", + "networks_advanced": [], + "pid_mode": "", + "ports": [ + { + "external": 8080, + "internal": 80, + "ip": "0.0.0.0", + "protocol": "tcp" + } + ], + "privileged": false, + "publish_all_ports": false, + "read_only": false, + "remove_volumes": true, + "restart": "no", + "rm": false, + "runtime": "runc", + "security_opts": [], + "shm_size": 64, + "start": true, + "stdin_open": false, + "stop_signal": "SIGQUIT", + "stop_timeout": 0, + "storage_opts": null, + "sysctls": null, + "tmpfs": null, + "tty": false, + "ulimit": [], + "upload": [], + "user": "", + "userns_mode": "", + "volumes": [], + "wait": false, + "wait_timeout": 60, + "working_dir": "" + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==", + "dependencies": [ + "docker_image.nginx" + ] + } + ] + }, + { + "mode": "managed", + "type": "docker_image", + "name": "nginx", + "provider": "provider[\"registry.terraform.io/kreuzwerker/docker\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "build": [], + "force_remove": null, + "id": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647nginx", + "image_id": "sha256:c20060033e06f882b0fbe2db7d974d72e0887a3be5e554efdb0dcf8d53512647", + "keep_locally": false, + "name": "nginx", + "platform": null, + "pull_triggers": null, + "repo_digest": "nginx@sha256:86e53c4c16a6a276b204b0fd3a8143d86547c967dc8258b3d47c3a21bb68d3c6", + "triggers": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + } + ], + "check_results": null +} diff --git a/terraform/terraformGit/.terraform.lock.hcl b/terraform/terraformGit/.terraform.lock.hcl new file mode 100644 index 000000000..cbc254b0c --- /dev/null +++ b/terraform/terraformGit/.terraform.lock.hcl @@ -0,0 +1,10 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/integrations/github" { + version = "5.42.0" + constraints = "~> 5.0" + hashes = [ + "h1:CZUAXhUhMIuIyTPm9VDcvOZgM1Lsl9tuKm5wW9tBEsM=", + ] +} diff --git a/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/CHANGELOG.md b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/CHANGELOG.md new file mode 100644 index 000000000..98b391f11 --- /dev/null +++ b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/CHANGELOG.md @@ -0,0 +1,809 @@ +# NOTE: CHANGELOG.md is deprecated + +After the release of v4.24.0, please see the [GitHub release notes](https://github.com/integrations/terraform-provider-github/releases) for the provider in order to view the most up-to-date changes. + +# 4.24.0 (Apr 28, 2022) + +ENHANCEMENTS: +* Support for allow_forking on a repository/update to go-github v42 by @diogopms in https://github.com/integrations/terraform-provider-github/pull/1033 +* Upgrade go-github to v43.0.0 by @btkostner in https://github.com/integrations/terraform-provider-github/pull/1087 + +BUG FIXES: + +* Fix go module path by @turkenh in https://github.com/integrations/terraform-provider-github/pull/961 +* fix: remove incorrect required schema key on ref data source by @youcandanch in https://github.com/integrations/terraform-provider-github/pull/1109 +* Bump Go version for Actions release CI to 1.18 by @kfcampbell in https://github.com/integrations/terraform-provider-github/pull/1134 +* build(deps): bump actions/setup-go from 2 to 3 by @dependabot in https://github.com/integrations/terraform-provider-github/pull/1110 +* Fix linting issues by @kfcampbell in https://github.com/integrations/terraform-provider-github/pull/1107 + + +# 4.23.0 (Mar 25, 2022) + +ENHANCEMENTS: + +* Add support for disabling the use of the vulnerability management endpoint by @enieuw in https://github.com/integrations/terraform-provider-github/pull/1022 +* Added orgname in github_orgranization attributes by @Kavinraja-G in https://github.com/integrations/terraform-provider-github/pull/1052 +* Add a data source for refs. by @youcandanch in https://github.com/integrations/terraform-provider-github/pull/1084 +* build(deps): bump actions/checkout from 2 to 3 by @dependabot in https://github.com/integrations/terraform-provider-github/pull/1086 + +BUG FIXES: + +* fix: use pagination to fetch all team members by @carocad in https://github.com/integrations/terraform-provider-github/pull/1092 +* docs: fix typos in d/users.html.markdown by @pallxk in https://github.com/integrations/terraform-provider-github/pull/1049 + +# 4.22.0 (Mar 18, 2022) + +ENHANCEMENTS: + +* feat: add `tree` data source by @jasonwalsh in https://github.com/integrations/terraform-provider-github/pull/1027 +* feat: support for issues using github_issue resource by @ewilde in https://github.com/integrations/terraform-provider-github/pull/1047 +* feat: add configurable read_delay_ms by @morremeyer in https://github.com/integrations/terraform-provider-github/pull/1054 + +## 4.21.0 (Mar 11, 2022) + +ENHANCEMENTS: + +* Adding BypassPullRequestActorIDs to branch protection by @jtyr in https://github.com/integrations/terraform-provider-github/pull/1030 +* Adding suspended_at attribute to github_user data source by @mrobinson-anaplan in https://github.com/integrations/terraform-provider-github/pull/1070 +* Documentation: Add id to github_user data dource by @kangaechu in https://github.com/integrations/terraform-provider-github/pull/1061 + +BUG FIXES: + +* fix: use the appropriate ID when trying to import `github_team_members` objects by @bison-brandon in https://github.com/integrations/terraform-provider-github/pull/1074 +* Environment ID gets set incorrectly on update by @aceresia-bg in https://github.com/integrations/terraform-provider-github/pull/1058 +* Fix whitespace in documentation for branch_protection_v3 by @JCradock in https://github.com/integrations/terraform-provider-github/pull/1059 + +## 4.20.1 (Mar 3, 2022) + +BUG FIXES: + +* Remove team from state if deletion failed and it does not exist by @cytopia in https://github.com/integrations/terraform-provider-github/pull/1039 + * Note that this is a behavior change from previous GitHub Terraform provider releases: now, if a GitHub team deletion operation fails and the team does not exist, the team will be automatically removed from state. +* Make data_github_repository work with non-existing repositories by @tobiassjosten in https://github.com/integrations/terraform-provider-github/pull/1031 +* Standardize logs by @kfcampbell in https://github.com/integrations/terraform-provider-github/pull/1053 + +## 4.20.0 (Feb 3, 2022) + +ENHANCEMENTS: + +* Add new resource `github_team_members` to allow authoritative team management by @stawik-mesa in https://github.com/integrations/terraform-provider-github/pull/975 + +BUG FIXES: + +* test: checkout pull request via sha instead of ref by @jcudit in https://github.com/integrations/terraform-provider-github/pull/1043 +* Small CI cleanup by @kfcampbell in https://github.com/integrations/terraform-provider-github/pull/1048 + +**Full Changelog**: https://github.com/integrations/terraform-provider-github/compare/v4.19.2...v4.20.0 + + +## 4.19.2 (Jan 20, 2022) + +BUG FIXES: + +- Update `go-github` to v42.0.0 ([#1035](https://github.com/integrations/terraform-provider-github/pull/1035)) +- Adjust count requirement of `required_approving_review_count` option for `github_branch_protection` ([#971](https://github.com/integrations/terraform-provider-github/pull/971)) +- Add `nil` check for `require_conversation_resolution` field of `github_branch_protection` resource ([#1032](https://github.com/integrations/terraform-provider-github/pull/1032)) + +## 4.19.1 (Jan 5, 2022) + +BUG FIXES: + +- Update `go-github` to v41.0.0 ([#993](https://github.com/integrations/terraform-provider-github/pull/993)) +- Add `nil` check for `plan` field of `github_organization` data source ([#1016](https://github.com/integrations/terraform-provider-github/pull/1016)) + + +## 4.19.0 (Dec 13, 2021) + +ENHANCEMENTS: + +- Export `branches` attribute of `github_repository` resource ([[#959](https://github.com/integrations/terraform-provider-github/pull/959)]) +- Add `require_conversation_resolution` support for `github_branch_protection` resource ([[#904](https://github.com/integrations/terraform-provider-github/pull/904)]) + +BUG FIXES: + +- Adjust length requirement to `topics` option for `github_repository` ([[#996](https://github.com/integrations/terraform-provider-github/pull/996)]) +- Add `required_linear_history` support for `github_branch_protection` resource ([[#935](https://github.com/integrations/terraform-provider-github/pull/935)]) + + +## 4.18.2 (Nov 30, 2021) + +BUG FIXES: + +- Add length requirement to `name` option for `github_repository` ([[#965](https://github.com/integrations/terraform-provider-github/pull/965)]) +- Various documentation fixes πŸ™‡ + +## 4.18.1 (Nov 22, 2021) + +BUG FIXES: + +- Add length requirement to `topics` option for `github_repository` ([[#951](https://github.com/integrations/terraform-provider-github/pull/951)]) +- Add pagination to `selected_repositories` option for `github_actions_runner_group` ([[#970](https://github.com/integrations/terraform-provider-github/pull/970)]) +- Add handling for new `node_id` format introduced to the GitHub GraphQL API (`github_repository`) ([[#914](https://github.com/integrations/terraform-provider-github/pull/914)]) + +## 4.18.0 (Nov 8, 2021) + +ENHANCEMENTS: + +- **New Resource:** `github_actions_organization_permissions` ([[#920](https://github.com/integrations/terraform-provider-github/pull/920)]) + +BUG FIXES: + +- Add newline compatbility to GitHub App provider authentication ([[#931](https://github.com/integrations/terraform-provider-github/pull/931)]) +- Fix `strict` setting of `required_status_checks` for `github_branch_protection` resource ([[#880](https://github.com/integrations/terraform-provider-github/issues/880)]) + + +## 4.17.0 (Oct 17, 2021) + +ENHANCEMENTS: + +- **New Resource:** `github_repository_autolink_reference` ([[#924](https://github.com/integrations/terraform-provider-github/pull/924)]) +- **New Data Sources** `github_users` ([#900](https://github.com/integrations/terraform-provider-github/pull/900)) +- Add `allow_auto_merge` option for `github_repository` ([#923](https://github.com/integrations/terraform-provider-github/pull/923)) + +BUG FIXES: + +- Various documentation fixes πŸ™‡ + +## 4.16.0 (Oct 5, 2021) + +ENHANCEMENTS: + +* **New Data Source:** `github_repository_file` ([#896](https://github.com/integrations/terraform-provider-github/pull/896)) +- Add `write_delay_ms` provider option [#907](https://github.com/integrations/terraform-provider-github/pull/907)) + +BUG FIXES: + +- Update `go-github` to v39.0.0 ([#905](https://github.com/integrations/terraform-provider-github/pull/905)) + +## 4.15.1 (Sep 23, 2021) + +BUG FIXES: + +- Revert suppression of `etag` changes for `github_repository` resources ([[#910](https://github.com/integrations/terraform-provider-github/issues/910)]) + +## 4.15.0 (Sep 22, 2021) + +ENHANCEMENTS: + +- **New Resource:** `github_actions_organization_secret_repositories` ([[#882](https://github.com/integrations/terraform-provider-github/issues/882)]) +- **New Resource:** `github_actions_runner_group` ([[#821](https://github.com/integrations/terraform-provider-github/issues/821)]) +- Add `require_linear_history` to `github_branch_protection` resource ([[#887](https://github.com/integrations/terraform-provider-github/issues/887)]) +- Add `branches` attribute to `github_repository` resource ([[#892](https://github.com/integrations/terraform-provider-github/issues/892)]) + + +BUG FIXES: + +- Update documentation for `d/github_ip_ranges` ([#895](https://github.com/integrations/terraform-provider-github/issues/895)) +- Update `go-github` to v38 ([#901](https://github.com/integrations/terraform-provider-github/issues/901)) +- Suppress `etag` changes for `github_repository` resources ([[#909](https://github.com/integrations/terraform-provider-github/issues/909)]) + + +## 4.14.0 (Sep 2, 2021) + +BUG FIXES: + +- Adds support for recreating a `github_team_repository` when repository is renamed ([#870](https://github.com/integrations/terraform-provider-github/issues/870)) +- Adds logging of configured authentication on provider startup ([#867](https://github.com/integrations/terraform-provider-github/issues/867)) +- Update documentation for `github_ip_ranges` data source ([#857](https://github.com/integrations/terraform-provider-github/issues/857)) +- Add support for IPv6 addresses returned by `github_ip_ranges` data source ([#883](https://github.com/integrations/terraform-provider-github/issues/883)) +- Update `go-github` to v37.0.0 ([#893](https://github.com/integrations/terraform-provider-github/issues/893)) + +## 4.13.0 (Jul 26, 2021) + +BUG FIXES: + +- Fix setting `vulnerability_alerts` on private `github_repository` creation ([#768](https://github.com/integrations/terraform-provider-github/issues/768)) + +ENHANCEMENTS: + +- Add `restrict_dismissals` option to `github_branch_protection` resource ([#839](https://github.com/integrations/terraform-provider-github/issues/839)) + +## 4.12.2 (Jul 12, 2021) + +BUG FIXES: + +- Update `go-github` to v36.0.0 ([#841](https://github.com/integrations/terraform-provider-github/issues/841)) + +## 4.12.0 (Jun 18, 2021) + +ENHANCEMENTS: + +* **New Resource:** `github_actions_environment_secret` ([[#805](https://github.com/integrations/terraform-provider-github/issues/805)]) +* **New Resource:** `github_repository_environment` ([[#805](https://github.com/integrations/terraform-provider-github/issues/805)]) +* Add `members` field to `github_organization` data source ([[#811](https://github.com/integrations/terraform-provider-github/issues/811)]) +* Add `repositories` field to `github_team` data source ([[#791](https://github.com/integrations/terraform-provider-github/issues/791)]) +* Add `repositories` field to `github_organization_teams` data source ([[#791](https://github.com/integrations/terraform-provider-github/issues/791)]) + + +BUG FIXES: + +- Document incompatibility between `github_app_installation_repository` and GitHub App authentication ([#818](https://github.com/integrations/terraform-provider-github/issues/818)) +- Document migration from `hashicorp/terraform-provider-github ([#816](https://github.com/integrations/terraform-provider-github/issues/816)) +- Allow users and apps to also be applied to push restrictions for `github_branch_protection` ([#824](https://github.com/integrations/terraform-provider-github/issues/824)) + + +## 4.11.0 (Jun 7, 2021) + +BREAKING CHANGES: + +- Allow PEM data to be passed directly for GitHub App provider authentication ([#803](https://github.com/integrations/terraform-provider-github/issues/803)) + +ENHANCEMENTS: + +- Add `encrypted_value` field to `github_actions_secret` and `github_actions_organization_secret` resources ([#807](https://github.com/integrations/terraform-provider-github/issues/807)) + +BUG FIXES: + +- Fix error handling when branch does not exist for `github_branch` resource ([#806](https://github.com/integrations/terraform-provider-github/issues/806)) + +## 4.10.1 (May 25, 2021) + +BUG FIXES: + +* Improve documentation for provider authentication options ([#801](https://github.com/integrations/terraform-provider-github/issues/801)) + + +## 4.10.0 (May 21, 2021) + +ENHANCEMENTS: + +* Add GitHub App authentication option to provider ([#753](https://github.com/integrations/terraform-provider-github/issues/753)) +* Add Actions and Dependabot IP ranges to `github_ip_ranges` data source ([#784](https://github.com/integrations/terraform-provider-github/issues/784)) +* Add additional fields to `github_repository` data source ([#778](https://github.com/integrations/terraform-provider-github/issues/778)) + +## 4.9.4 (May 11, 2021) + +BUG FIXES: + +- Add EMU support by allowing `internal` visibility to be configured for `github_repository` ([#781](https://github.com/integrations/terraform-provider-github/issues/781)) +- Update `go-github` to 35.1.0 ([#772](https://github.com/integrations/terraform-provider-github/issues/772)) + +## 4.9.3 (May 7, 2021) + +BUG FIXES: + +- Mark `slug` as `computed` when `name` is changed for `github_team` ([#757](https://github.com/integrations/terraform-provider-github/issues/757)) + +## 4.9.2 (April 18, 2021) + +BUG FIXES: + +- correct visibility for repositories created via a template ([#761](https://github.com/integrations/terraform-provider-github/issues/761)) + + +## 4.9.1 (April 17, 2021) + +BUG FIXES: + +- Bump Go version to 1.16 for acceptance tests and darwin/arm64 releases +- Update acceptance tests to v2.2.0 +- Re-instate releases of darwin/arm64 + +## 4.9.0 (April 17, 2021) + +ENHANCEMENTS: + +* **New Data Sources** `github_repository_pull_request` / `github_repository_pull_requests` ([#739](https://github.com/integrations/terraform-provider-github/issues/739)) +* **New Resource** `github_repository_pull_request` ([#739](https://github.com/integrations/terraform-provider-github/issues/739)) +* Add `repositories` attribute for `github_organization` data source ([#750](https://github.com/integrations/terraform-provider-github/issues/750)) +* Add import functionality for `github_actions_organization_secret` ([#745](https://github.com/integrations/terraform-provider-github/issues/745)) + +BUG FIXES: + +- Detect and overwrite value drift for `github_actions_secret` and `github_actions_organization_secret` ([#740](https://github.com/integrations/terraform-provider-github/pull/740)) +- Do not destroy repositories when `name` attribute changes ([#699](https://github.com/integrations/terraform-provider-github/pull/699)) + +## 4.8.0 (April 9, 2021) + +BUG FIXES: + +- Deprecate `organization` / `GITHUB_ORGANIZATION` provider configuration options ([#735](https://github.com/integrations/terraform-provider-github/pull/735)) + +## 4.7.0 (April 9, 2021) + +REGRESSIONS: + +- new repositories created via a template have a public visibility ([#758](https://github.com/integrations/terraform-provider-github/issues/758)) + - workaround: a subsequent plan / apply will set the visibility to what is configured + - fix: see v4.9.2 + +ENHANCEMENTS: + +* **New Data Source** `github_organization_teams` ([#725](https://github.com/integrations/terraform-provider-github/issues/725)) + +BUG FIXES: + +- Set visibility on create instead of update for `github_repository` ([#746](https://github.com/integrations/terraform-provider-github/pull/746)) +- Various documentation updates + +## 4.6.0 (March 23, 2021) + +ENHANCEMENTS: + +* **New Resource** `github_app_installation_repository` ([#690](https://github.com/integrations/terraform-provider-github/issues/690)) + +BUG FIXES: + +- Fix panic for `github_repository_file` ([#732](https://github.com/integrations/terraform-provider-github/pull/732)) +- Improve error messaging for `github_branch` ([#734](https://github.com/integrations/terraform-provider-github/pull/734)) +- Improve error messaging for `github_branch_protection` ([#721](https://github.com/integrations/terraform-provider-github/pull/721)) +- Fix update operation for `github_default_branch` ([#719](https://github.com/integrations/terraform-provider-github/pull/719)) +- Add name validation for `github_actions_organization_secret` ([#714](https://github.com/integrations/terraform-provider-github/pull/714)) + + +## 4.5.2 (March 16, 2021) + +BUG FIXES: + +- Fix updating `default_branch` on `github_repository` ([#719](https://github.com/integrations/terraform-provider-github/pull/719)) + + +## 4.5.1 (March 3, 2021) + +BUG FIXES: + +- Fix `github_branch_protection` import by repository node ID and pattern ([#713](https://github.com/integrations/terraform-provider-github/pull/713)) +- Add pagination when retrieving team members for `data_source_github_team` ([#702](https://github.com/integrations/terraform-provider-github/pull/702)) + + +## 4.5.0 (February 17, 2021) + +ENHANCEMENTS: + +- Add ability for `github_team_repository` to accept slug as a valid `team_id` ([#693](https://github.com/integrations/terraform-provider-github/pull/693)) + +BUG FIXES: + +- Add more context to error messaging for `github_branch_protection` ([#691](https://github.com/integrations/terraform-provider-github/pull/691)) +- Satisfy linter recommendation for `github_branch_protection` ([#694](https://github.com/integrations/terraform-provider-github/pull/694)) + +## 4.4.0 (February 5, 2021) + +BUG FIXES: + +- Add `create_default_maintainer` option to `github_team` ([#527](https://github.com/integrations/terraform-provider-github/pull/527)), ([#104](https://github.com/integrations/terraform-provider-github/pull/104)), ([#130](https://github.com/integrations/terraform-provider-github/pull/130)) +- Add diff-suppression option to `repository_collaborator` ([#683](https://github.com/integrations/terraform-provider-github/pull/683)) + + +## 4.3.2 (February 2, 2021) + +BUG FIXES: + +* Improved detection of repository name for `github_branch_protection` ([#684](https://github.com/integrations/terraform-provider-github/issues/684)) +* Reverts error handling in provider configuration ([#685](https://github.com/integrations/terraform-provider-github/issues/685)) + +## 4.3.1 (January 22, 2021) + +REGRESSIONS: + +- provider configuration breaks for individual accounts ([#678](https://github.com/integrations/terraform-provider-github/issues/678)) + +BUG FIXES: + +* Send valid payload when editing a repository resource with `github_branch_default` ([#666](https://github.com/integrations/terraform-provider-github/issues/666)) +* Add handling to surface errors in provider configuration ([#668](https://github.com/integrations/terraform-provider-github/issues/668)) + +## 4.3.0 (January 14, 2021) + +ENHANCEMENTS: + +* **New Resource** `github_branch_protection_v3` ([#642](https://github.com/integrations/terraform-provider-github/issues/642)) +* Add `pages` feature to `github_repository` ([#490](https://github.com/integrations/terraform-provider-github/issues/490)) + + +## 4.2.0 (January 07, 2021) + +BREAKING CHANGES: + +- Project transfer from `terraform-providers` organization to `integrations` + - See [#652](https://github.com/integrations/terraform-provider-github/issues/652) for migration steps and [#656](https://github.com/integrations/terraform-provider-github/issues/656) for discussion + +ENHANCEMENTS: + +- Add `allowDeletions` and `allowsForcePushes` to `github_branch_protection` ([#623](https://github.com/integrations/terraform-provider-github/pull/623)) +- Add GitHub App actor support to `github_branch_protection` ([#615](https://github.com/integrations/terraform-provider-github/pull/615)) + +BUG FIXES: + +- Allow `required_status_checks` `strict` to be `false` for `github_branch_protection` ([#614](https://github.com/integrations/terraform-provider-github/pull/614)) +- Remove `ForceNew` on template-related options for `github_repository` ([#609](https://github.com/integrations/terraform-provider-github/pull/609)) +- Fix parsing of input during imports of `github_branch_protection` ([#610](https://github.com/integrations/terraform-provider-github/pull/610)) +- `github_repository_file` resource no longer iterates through all commits ([#644](https://github.com/integrations/terraform-provider-github/pull/644)) + +## 4.1.0 (December 01, 2020) + +ENHANCEMENTS: + +- Add `github_actions_organization_secret` resource ([#261](https://github.com/integrations/terraform-provider-github/pull/261)) +- Add `github_repository_milestone` resource ([#470](https://github.com/integrations/terraform-provider-github/pull/470)) +- Add `github_repository_milestone` data source ([#470](https://github.com/integrations/terraform-provider-github/pull/470)) +- Add `github_project_card` resource ([#460](https://github.com/integrations/terraform-provider-github/pull/460)) +- Add `github_branch_default` resource ([#194](https://github.com/integrations/terraform-provider-github/pull/194)) + + +## 4.0.1 (November 18, 2020) + +BUG FIXES: + +- `github_team` data source query no longer iterates through a list of teams ([#579](https://github.com/integrations/terraform-provider-github/pull/579)) +- `github_repository_file` resource no longer iterates through all commits ([#589](https://github.com/integrations/terraform-provider-github/pull/589)) +- fix parsing of `repo:pattern` format during `github_branch_protection` import ([#599](https://github.com/integrations/terraform-provider-github/pull/599)) + + +## 4.0.0 (November 10, 2020) + +REGRESSIONS: + +- fails parsing of `repo:pattern` format during `github_branch_protection` import ([#597](https://github.com/integrations/terraform-provider-github/issues/597)) + +BREAKING CHANGES: + +- `pattern` replaces `branch` in changes to `github_branch_protection` introduced in `v3.1.0` ([#566](https://github.com/integrations/terraform-provider-github/issues/566)) +- `dismissal_restrictions` documented for `github_branch_protection` ([#569](https://github.com/integrations/terraform-provider-github/pull/569)) +- project license changes from MPL2 to MIT ([#591](https://github.com/integrations/terraform-provider-github/pull/591)) + +BUG FIXES: + +- `repository_id` for `github_branch_protection` accepts repository name as well as node ID ([#593](https://github.com/integrations/terraform-provider-github/issues/593)) + +ENHANCEMENTS: + +- Add support to get currently authenticated user to `data_source_github_user` ([#261](https://github.com/integrations/terraform-provider-github/pull/261)) +- Add importing to `github_organization_webhook` ([#487](https://github.com/integrations/terraform-provider-github/pull/487)) + + +## 3.1.0 (October 12, 2020) + +REGRESSIONS: + +- undocumented, breaking configuration changes to `github_branch_protection` ([#566](https://github.com/integrations/terraform-provider-github/issues/566)) +- slowed performance of `github_branch_protection` ([#567](https://github.com/integrations/terraform-provider-github/issues/567)) +- change to default branch breaks refresh of existing `github_repository_file` resources ([#564](https://github.com/integrations/terraform-provider-github/issues/564)) + +BREAKING CHANGES: + +- Deprecate `anonymous` Flag For Provider Configuration ([#506](https://github.com/integrations/terraform-provider-github/issues/506)) + +BUG FIXES: + +- re-instante resources unavailable in the context of an organization ([#501](https://github.com/integrations/terraform-provider-github/issues/501)) +- allow overwrite-on-create behaviour for `github_repository_file` resource ([#459](https://github.com/integrations/terraform-provider-github/issues/459)) + + +ENHANCEMENTS: + +- update `go-github` to `v32.1.0` ([#475](https://github.com/integrations/terraform-provider-github/issues/475)) +- add `vulnerability_alerts` to `github_repository` ([#444](https://github.com/integrations/terraform-provider-github/issues/444)) +- add `archive_on_destroy` to `github_repository` ([#432](https://github.com/integrations/terraform-provider-github/issues/432)) +- uplift `branch_protection` to GraphQL ([#337](https://github.com/integrations/terraform-provider-github/issues/337)) + + +## 3.0.0 (September 08, 2020) + +BREAKING CHANGES: + +- `token` becomes optional +- `organization` no longer deprecated +- `individual` and `anonymous` removed +- `owner` inferred from `organization` +- `base_url` provider parameter no longer requires `/api/v3` suffix + +BUG FIXES: + +- `terraform validate` fails because of missing token ([#503](https://github.com/integrations/terraform-provider-github/issues/503)) +- organization support for various resources ([#501](https://github.com/integrations/terraform-provider-github/issues/501)) + +ENHANCEMENTS: + +* **New Data Source** `github_organization` ([#521](https://github.com/integrations/terraform-provider-github/issues/521)) + + +## 2.9.2 (July 14, 2020) + +- Adds deprecation of `anonymous` flag for provider configuration ahead of next major release ([#506](https://github.com/integrations/terraform-provider-github/issues/506)) +- Adds deprecation of `individual` flag for provider configuration ahead of next major release ([#512](https://github.com/integrations/terraform-provider-github/issues/512)) + +## 2.9.1 (July 01, 2020) + +BUG FIXES: + +- Reverts changes introduced in v2.9.0, deferring to the next major release + +## 2.9.0 (June 29, 2020) + +**NOTE**: This release introduced a provider-level breaking change around `anonymous` use. +See [here](https://github.com/integrations/terraform-provider-github/pull/464#discussion_r427961161) for details and [here](https://github.com/integrations/terraform-provider-github/issues/502#issuecomment-652379322) to discuss a fix. + +ENHANCEMENTS: +* Add Ability To Manage Resources For Non-Organization Accounts ([#464](https://github.com/integrations/terraform-provider-github/issues/464)) +* resource/github_repository: Add "internal" Visibility Option ([#454](https://github.com/integrations/terraform-provider-github/issues/454)) + +## 2.8.1 (June 09, 2020) + +BUG FIXES: + +* resource/github_repository_file: Reduce API requests when looping through commits ([[#466](https://github.com/integrations/terraform-provider-github/issues/466)]) +* resource/github_repository: Fix `auto_init` Destroying Repositories ([[#317](https://github.com/integrations/terraform-provider-github/issues/317)]) +* resource/github_repository_deploy_key: Fix acceptance test approach ([[#471](https://github.com/integrations/terraform-provider-github/issues/471)]) +* resource/github_actions_secret: Fix Case Where Secret Removed Outside Of Terraform ([[#482](https://github.com/integrations/terraform-provider-github/issues/482)]) +* Documentation Addition Of `examples/` Directory + +## 2.8.0 (May 15, 2020) + +BUG FIXES: + +* resource/github_branch_protection: Prevent enabling `dismissal_restrictions` in GitHub console if `dismissal_users` and `dismissal_teams` are not set ([#453](https://github.com/integrations/terraform-provider-github/issues/453)) +* resource/github_repository_collaborator: Allow modifying permissions from `maintain` and `triage` ([#457](https://github.com/integrations/terraform-provider-github/issues/457)) +* Documentation Fix for `github_actions_public_key` data-source ([#458](https://github.com/integrations/terraform-provider-github/issues/458)) +* Documentation Fix for `github_branch_protection` resource ([#410](https://github.com/integrations/terraform-provider-github/issues/410)) +* Documentation Layout Fix for `github_ip_ranges` and `github_membership` data sources ([#423](https://github.com/integrations/terraform-provider-github/issues/423)) +* Documentation Fix for `github_repository_file` import ([#443](https://github.com/integrations/terraform-provider-github/issues/443)) +* Update `go-github` to `v31.0.0` ([#424](https://github.com/integrations/terraform-provider-github/issues/424)) + +ENHANCEMENTS: +* **New Data Source** `github_organization_team_sync_groups` ([#400](https://github.com/integrations/terraform-provider-github/issues/400)) +* **New Resource** `github_team_sync_group_mapping` ([#400](https://github.com/integrations/terraform-provider-github/issues/400)) + +## 2.7.0 (May 01, 2020) + +BUG FIXES: + +* Add Missing Acceptance Test ([#427](https://github.com/integrations/terraform-provider-github/issues/427)) + +ENHANCEMENTS: + +* Add GraphQL Client ([#331](https://github.com/integrations/terraform-provider-github/issues/331)) +* **New Data Source** `github_branch` ([#364](https://github.com/integrations/terraform-provider-github/issues/364)) +* **New Resource** `github_branch` ([#364](https://github.com/integrations/terraform-provider-github/issues/364)) + + +## 2.6.1 (April 07, 2020) + +BUG FIXES: + +* Documentation Fix For Option To Manage `Delete Branch on Merge` ([#408](https://github.com/integrations/terraform-provider-github/issues/408)) +* Documentation Fix For `github_actions_secret` / `github_actions_public_key` ([#413](https://github.com/integrations/terraform-provider-github/issues/413)) + +## 2.6.0 (April 03, 2020) + +ENHANCEMENTS: + +* resource/github_repository: Introduce Option To Manage `Delete Branch on Merge` ([#399](https://github.com/integrations/terraform-provider-github/issues/399)) +* resource/github_repository: Configure Repository As Template ([#357](https://github.com/integrations/terraform-provider-github/issues/357)) +* **New Data Source** `github_membership` ([#396](https://github.com/integrations/terraform-provider-github/issues/396)) + +## 2.5.1 (April 02, 2020) + +BUG FIXES: + +* Fix Broken Link For `github_actions_secret` Documentation ([#405](https://github.com/integrations/terraform-provider-github/issues/405)) + +## 2.5.0 (March 30, 2020) + +REGRESSION: + +* `go-github` `v29.03` is incompatible with versions of GitHub Enterprise Server prior to `v2.21.5`. ([[#404](https://github.com/integrations/terraform-provider-github/issues/404)]) + +ENHANCEMENTS: + +* Add `apps` To `github_branch_protection` Restrictions +* **New Data Source** `github_actions_public_key` ([[#362](https://github.com/integrations/terraform-provider-github/issues/362)]) +* **New Data Source** `github_actions_secrets` ([[#362](https://github.com/integrations/terraform-provider-github/issues/362)]) +* **New Resource:** `github_actions_secret` ([[#362](https://github.com/integrations/terraform-provider-github/issues/362)]) + +BUG FIXES: + +* Prevent Panic From DismissalRestrictions ([[#385](https://github.com/integrations/terraform-provider-github/issues/385)]) +* Update `go-github` to `v29.0.3` ([[#369](https://github.com/integrations/terraform-provider-github/issues/369)]) +* Update `go` to `1.13` ([[#372](https://github.com/integrations/terraform-provider-github/issues/372)]) +* Documentation Fixes For Consistency And Typography + + +## 2.4.1 (March 05, 2020) + +BUG FIXES: + +* Updates `go-github` to `v29` to unblock planned feature development ([#342](https://github.com/integrations/terraform-provider-github/issues/342)) +* Fixes `insecure_ssl` parameter behaviour for `github_organization_webhook` and `github_repository_webhook` ([#365](https://github.com/integrations/terraform-provider-github/issues/365)) +* Fixes label behaviour to not create new labels when renaming a `github_issue_label` ([#288](https://github.com/integrations/terraform-provider-github/issues/288)) + +## 2.4.0 (February 26, 2020) + +ENHANCEMENTS: + +* **New Data Source** `github_release` ([#356](https://github.com/integrations/terraform-provider-github/pull/356)) + +* **New Resource:** `github_repository_file` ([#318](https://github.com/integrations/terraform-provider-github/pull/318)) + +## 2.3.2 (February 05, 2020) + +BUG FIXES: + +* Handle repository 404 for `github_repository_collaborator` resource ([#348](https://github.com/integrations/terraform-provider-github/issues/348)) + +## 2.3.1 (January 27, 2020) + +BUG FIXES: + +* Add support for `triage` and `maintain` permissions in some resources ([#303](https://github.com/integrations/terraform-provider-github/issues/303)) + +## 2.3.0 (January 22, 2020) + +BUG FIXES: + +* `resource/resource_github_team_membership`: Prevent spurious diffs caused by upstream API change made on 17th January ([#325](https://github.com/integrations/terraform-provider-github/issues/325)) + +ENHANCEMENTS: + +* `resource/repository`: Added functionality to generate a new repository from a Template Repository ([#309](https://github.com/integrations/terraform-provider-github/issues/309)) + +## 2.2.1 (September 04, 2019) + +ENHANCEMENTS: + +* dependencies: Updated module `hashicorp/terraform` to `v0.12.7` ([#273](https://github.com/integrations/terraform-provider-github/issues/273)) +* `resource/github_branch_protection`: Will now return an error when users are not correctly added ([#158](https://github.com/integrations/terraform-provider-github/issues/158)) +* `provider`: Added optional `anonymous` attribute, and made `token` optional ([#255](https://github.com/integrations/terraform-provider-github/issues/255)) + +BUG FIXES: +* `resource/github_repository`: Allow setting `default_branch` to `master` on creation ([#150](https://github.com/integrations/terraform-provider-github/issues/150)) +* `resource/github_team_repository`: Validation of `team_id` ([#253](https://github.com/integrations/terraform-provider-github/issues/253)) +* `resource/github_team_membership`: Validation of `team_id` ([#253](https://github.com/integrations/terraform-provider-github/issues/253)) +* `resource/github_organization_webhook`: Properly set webhook secret in state ([#251](https://github.com/integrations/terraform-provider-github/issues/251)) +* `resource/github_repository_webhook`: Properly set webhook secret in state ([#251](https://github.com/integrations/terraform-provider-github/issues/251)) + +## 2.2.0 (June 28, 2019) + +FEATURES: + +* **New Data Source** `github_collaborators` ([#239](https://github.com/integrations/terraform-provider-github/issues/239)) + +ENHANCEMENTS: + +* `provider`: Added optional `individual` attribute, and made `organization` optional ([#242](https://github.com/integrations/terraform-provider-github/issues/242)) +* `resource/github_branch_protection`: Added `require_signed_commits` property ([#214](https://github.com/integrations/terraform-provider-github/issues/214)) + +BUG FIXES: + +* `resource/github_membership`: `username` property is now case insensitive ([#241](https://github.com/integrations/terraform-provider-github/issues/241)) +* `resource/github_repository`: `has_projects` can now be imported ([#237](https://github.com/integrations/terraform-provider-github/issues/237)) +* `resource/github_repository_collaborator`: `username` property is now case insensitive [[#241](https://github.com/integrations/terraform-provider-github/issues/241)) +* `resource/github_team_membership`: `username` property is now case insensitive ([#241](https://github.com/integrations/terraform-provider-github/issues/241)) + + +## 2.1.0 (May 15, 2019) + +ENHANCEMENTS: + +* `resource/github_repository`: Added validation for lowercase topics ([#223](https://github.com/integrations/terraform-provider-github/issues/223)) +* `resource/github_organization_webhook`: Added back removed `name` attribute, `name` is now flagged as `Removed` ([#226](https://github.com/integrations/terraform-provider-github/issues/226)) +* `resource/github_repository_webhook`: Added back removed `name` attribute, `name` is now flagged as `Removed` ([#226](https://github.com/integrations/terraform-provider-github/issues/226)) + +## 2.0.0 (May 02, 2019) + +* This release adds support for Terraform 0.12 ([#181](https://github.com/integrations/terraform-provider-github/issues/181)) + +BREAKING CHANGES: + +* `resource/github_repository_webhook`: Removed `name` attribute ([#181](https://github.com/integrations/terraform-provider-github/issues/181)) +* `resource/github_organization_webhook`: Removed `name` attribute ([#181](https://github.com/integrations/terraform-provider-github/issues/181)) + +FEATURES: + +* **New Resource:** `github_organization_block` ([#181](https://github.com/integrations/terraform-provider-github/issues/181)) +* **New Resource:** `github_user_invitation_accepter` ([#161](https://github.com/integrations/terraform-provider-github/issues/161)) +* `resource/github_branch_protection`: Added `required_approving_review_count` property ([#181](https://github.com/integrations/terraform-provider-github/issues/181)) + +BUG FIXES: + +* `resource/github_repository`: Prefill `auto_init` during import ([#154](https://github.com/integrations/terraform-provider-github/issues/154)) + +## 1.3.0 (September 07, 2018) + +FEATURES: + +* **New Resource:** `github_project_column` ([#139](https://github.com/integrations/terraform-provider-github/issues/139)) + +ENHANCEMENTS: + +* _all resources_: Use `Etag` to save API quota (~ 33%) ([#143](https://github.com/integrations/terraform-provider-github/issues/143)) +* _all resources_: Implement & use RateLimitTransport to avoid hitting API rate limits ([#145](https://github.com/integrations/terraform-provider-github/issues/145)) + +BUG FIXES: + +* `resource/github_issue_label`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_membership`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_repository_deploy_key`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_team`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_team_membership`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_team_repository`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) +* `resource/github_user_gpg_key`: Return genuine errors instead of ignoring them when reading existing resource ([#142](https://github.com/integrations/terraform-provider-github/issues/142)) + +## 1.2.1 (August 17, 2018) + +BUG FIXES: + +* `resource/github_repository`: Avoid spurious diff for `topics` ([#138](https://github.com/integrations/terraform-provider-github/issues/138)) + +## 1.2.0 (August 17, 2018) + +FEATURES: + +* **New Data Source:** `github_repository` ([#109](https://github.com/integrations/terraform-provider-github/issues/109)) +* **New Data Source:** `github_repositories` ([#129](https://github.com/integrations/terraform-provider-github/issues/129)) +* **New Resource:** `github_organization_project` ([#111](https://github.com/integrations/terraform-provider-github/issues/111)) +* **New Resource:** `github_repository_project` ([#115](https://github.com/integrations/terraform-provider-github/issues/115)) +* **New Resource:** `github_user_gpg_key` ([#120](https://github.com/integrations/terraform-provider-github/issues/120)) +* **New Resource:** `github_user_ssh_key` ([#119](https://github.com/integrations/terraform-provider-github/issues/119)) + +ENHANCEMENTS: + +* `provider`: Add `insecure` mode ([#48](https://github.com/integrations/terraform-provider-github/issues/48)) +* `data-source/github_ip_ranges`: Add importer IPs ([#100](https://github.com/integrations/terraform-provider-github/issues/100)) +* `resource/github_issue_label`: Add support for `description` ([#118](https://github.com/integrations/terraform-provider-github/issues/118)) +* `resource/github_repository`: Add support for `topics` ([#97](https://github.com/integrations/terraform-provider-github/issues/97)) +* `resource/github_team`: Expose `slug` ([#136](https://github.com/integrations/terraform-provider-github/issues/136)) +* `resource/github_team_membership`: Make role updatable ([#137](https://github.com/integrations/terraform-provider-github/issues/137)) + +BUG FIXES: + +* `resource/github_*`: Prevent crashing on invalid ID format ([#108](https://github.com/integrations/terraform-provider-github/issues/108)) +* `resource/github_organization_webhook`: Avoid spurious diff of `secret` ([#134](https://github.com/integrations/terraform-provider-github/issues/134)) +* `resource/github_repository`: Make non-updatable fields `ForceNew` ([#135](https://github.com/integrations/terraform-provider-github/issues/135)) +* `resource/github_repository_deploy_key`: Avoid spurious diff of `key` ([#132](https://github.com/integrations/terraform-provider-github/issues/132)) +* `resource/github_repository_webhook`: Avoid spurious diff of `secret` ([#133](https://github.com/integrations/terraform-provider-github/issues/133)) + + +## 1.1.0 (May 11, 2018) + +FEATURES: + +* **New Data Source:** `github_ip_ranges` ([#82](https://github.com/integrations/terraform-provider-github/issues/82)) + +ENHANCEMENTS: + +* `resource/github_repository`: Add support for archiving ([#64](https://github.com/integrations/terraform-provider-github/issues/64)) +* `resource/github_repository`: Add `html_url` ([#93](https://github.com/integrations/terraform-provider-github/issues/93)) +* `resource/github_repository`: Add `has_projects` ([#92](https://github.com/integrations/terraform-provider-github/issues/92)) +* `resource/github_team`: Add `parent_team_id` ([#54](https://github.com/integrations/terraform-provider-github/issues/54)) + +## 1.0.0 (February 20, 2018) + +ENHANCEMENTS: + +* `resource/github_branch_protection`: Add support for `require_code_owners_review` ([#51](https://github.com/integrations/terraform-provider-github/issues/51)) + +## 0.1.2 (February 12, 2018) + +BUG FIXES: + +* `resource/github_membership`: Fix a crash when bad import input is given ([#72](https://github.com/integrations/terraform-provider-github/issues/72)) + +## 0.1.1 (July 18, 2017) + +BACKWARDS INCOMPATIBILITIES / NOTES: + +* `resource/github_branch_protection`: The `include_admin` attributes haven't been working for quite some time due to upstream API changes. These attributes are now deprecated in favor of the new top-level `enforce_admins` attribute. The `include_admin` attributes currently have no affect on the resource, and will yield a `DEPRECATED` notice to the user. + +IMPROVEMENTS: + +* `resource/github_repository`: Allow updating default_branch ([#23](https://github.com/integrations/terraform-provider-github/issues/23)) +* `resource/github_repository`: Add license_template and gitignore_template ([#24](https://github.com/integrations/terraform-provider-github/issues/24)) +* `resource/github_repository_webhook`: Add import ([#29](https://github.com/integrations/terraform-provider-github/issues/29)) +* `resource/github_branch_protection`: Support enforce_admins ([#26](https://github.com/integrations/terraform-provider-github/issues/26)) +* `resource/github_team`: Supports managing a team's LDAP DN in GitHub Enterprise ([#39](https://github.com/integrations/terraform-provider-github/issues/39)) + +BUG FIXES: + +* `resource/github_branch_protection`: Fix crash on nil values ([#26](https://github.com/integrations/terraform-provider-github/issues/26)) + +## 0.1.0 (June 20, 2017) + +FEATURES: + +* **New Resource:** `github_repository_deploy_key` [[#15215](https://github.com/integrations/terraform-provider-github/issues/15215)](https://github.com/hashicorp/terraform/pull/15215) + +IMPROVEMENTS: + +* `resource/github_repository`: Adding merge types ([#1](https://github.com/integrations/terraform-provider-github/issues/1)) +* `data-source/github_user` and `data-source/github_team`: Added attributes ([#2](https://github.com/integrations/terraform-provider-github/issues/2)) diff --git a/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/LICENSE b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/LICENSE new file mode 100644 index 000000000..b50625eb6 --- /dev/null +++ b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/README.md b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/README.md new file mode 100644 index 000000000..00b3a9745 --- /dev/null +++ b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/README.md @@ -0,0 +1,29 @@ +Terraform Provider GitHub +========================= + + + + + +This project is used to manipulate GitHub resources (repositories, teams, files, etc.) using Terraform. Its Terraform Registry page can be found [here](https://registry.terraform.io/providers/integrations/github/). + +## Requirements + +- [Terraform](https://www.terraform.io/downloads.html) 0.10.x +- [Go](https://golang.org/doc/install) 1.19.x (to build the provider plugin) + +## Usage + +Detailed documentation for the GitHub provider can be found [here](https://registry.terraform.io/providers/integrations/github). + +## Contributing + +Detailed documentation for contributing to the GitHub provider can be found [here](CONTRIBUTING.md). + +## Roadmap + +This project uses [Milestones](https://github.com/integrations/terraform-provider-github/milestones) to scope upcoming features and bug fixes. Issues that receive the most recent discussion or the most reactions will be more likely to be included in an upcoming release. + +## Support + +This is a community-supported project. GitHub's SDK team triages issues and PRs each Monday and Friday. Please engage with the community via Issues for support, and PRs are always welcome! diff --git a/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/terraform-provider-github_v5.42.0 b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/terraform-provider-github_v5.42.0 new file mode 100644 index 000000000..963315cbc Binary files /dev/null and b/terraform/terraformGit/.terraform/providers/registry.terraform.io/integrations/github/5.42.0/darwin_amd64/terraform-provider-github_v5.42.0 differ diff --git a/terraform/terraformGit/Main.tf b/terraform/terraformGit/Main.tf new file mode 100644 index 000000000..ca59f2e81 --- /dev/null +++ b/terraform/terraformGit/Main.tf @@ -0,0 +1,42 @@ +terraform { + required_providers { + github = { + source = "integrations/github" + version = "~> 5.0" + } + } +} + +provider "github" { + token = var.token # or `GITHUB_TOKEN` +} + +#Create and initialise a public GitHub Repository with MIT license and a Visual Studio .gitignore file (incl. issues and wiki) +resource "github_repository" "repo" { + name = "EugeneDevopsTerraform" + description = "My awesome codebase" + visibility = "public" + has_issues = true + has_wiki = true + auto_init = true + license_template = "mit" + gitignore_template = "VisualStudio" +} + +#Set default branch 'master' +resource "github_branch_default" "master" { + repository = github_repository.repo.name + branch = "main" +} + +#Create branch protection rule to protect the default branch. (Use "github_branch_protection_v3" resource for Organisation rules) +resource "github_branch_protection" "default" { + repository_id = github_repository.repo.id + pattern = github_branch_default.master.branch + require_conversation_resolution = true + enforce_admins = true + + required_pull_request_reviews { + required_approving_review_count = 1 + } +} \ No newline at end of file diff --git a/terraform/terraformGit/Variables.tf b/terraform/terraformGit/Variables.tf new file mode 100644 index 000000000..22ab6d44e --- /dev/null +++ b/terraform/terraformGit/Variables.tf @@ -0,0 +1,6 @@ + +variable "token" { + type = string + description = "Specifies the GitHub PAT token or `GITHUB_TOKEN`" + sensitive = true +} \ No newline at end of file diff --git a/terraform/terraformGit/config.auto.tfvars b/terraform/terraformGit/config.auto.tfvars new file mode 100644 index 000000000..6027cbec0 --- /dev/null +++ b/terraform/terraformGit/config.auto.tfvars @@ -0,0 +1 @@ +token = "" \ No newline at end of file diff --git a/terraform/terraformGit/deploy.tfplan b/terraform/terraformGit/deploy.tfplan new file mode 100644 index 000000000..3c92f7fba Binary files /dev/null and b/terraform/terraformGit/deploy.tfplan differ diff --git a/terraform/terraformGit/terraform.tfstate b/terraform/terraformGit/terraform.tfstate new file mode 100644 index 000000000..615ef88ec --- /dev/null +++ b/terraform/terraformGit/terraform.tfstate @@ -0,0 +1,83 @@ +{ + "version": 4, + "terraform_version": "1.6.3", + "serial": 5, + "lineage": "57b36a7b-1640-af08-0e46-c6e88669c62e", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "github_repository", + "name": "repo", + "provider": "provider[\"registry.terraform.io/integrations/github\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "allow_auto_merge": false, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_squash_merge": true, + "allow_update_branch": false, + "archive_on_destroy": null, + "archived": false, + "auto_init": true, + "default_branch": "main", + "delete_branch_on_merge": false, + "description": "My awesome codebase", + "etag": "W/\"d78d89e7f75488a5025f25aa432a9289b91bf3a358623b54618ffddfdf5637bd\"", + "full_name": "eukuz/EugeneDevopsTerraform", + "git_clone_url": "git://github.com/eukuz/EugeneDevopsTerraform.git", + "gitignore_template": "VisualStudio", + "has_discussions": false, + "has_downloads": false, + "has_issues": true, + "has_projects": false, + "has_wiki": true, + "homepage_url": "", + "html_url": "https://github.com/eukuz/EugeneDevopsTerraform", + "http_clone_url": "https://github.com/eukuz/EugeneDevopsTerraform.git", + "id": "EugeneDevopsTerraform", + "ignore_vulnerability_alerts_during_read": null, + "is_template": false, + "license_template": "mit", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "name": "EugeneDevopsTerraform", + "node_id": "R_kgDOKse-qQ", + "pages": [], + "primary_language": "", + "private": false, + "repo_id": 717733545, + "security_and_analysis": [ + { + "advanced_security": [], + "secret_scanning": [ + { + "status": "disabled" + } + ], + "secret_scanning_push_protection": [ + { + "status": "disabled" + } + ] + } + ], + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "ssh_clone_url": "git@github.com:eukuz/EugeneDevopsTerraform.git", + "svn_url": "https://github.com/eukuz/EugeneDevopsTerraform", + "template": [], + "topics": [], + "visibility": "public", + "vulnerability_alerts": false + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + } + ], + "check_results": null +} diff --git a/terraform/terraformGit/terraform.tfstate.backup b/terraform/terraformGit/terraform.tfstate.backup new file mode 100644 index 000000000..50a825c1e --- /dev/null +++ b/terraform/terraformGit/terraform.tfstate.backup @@ -0,0 +1,70 @@ +{ + "version": 4, + "terraform_version": "1.6.3", + "serial": 1, + "lineage": "57b36a7b-1640-af08-0e46-c6e88669c62e", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "github_repository", + "name": "repo", + "provider": "provider[\"registry.terraform.io/integrations/github\"]", + "instances": [ + { + "status": "tainted", + "schema_version": 1, + "attributes": { + "allow_auto_merge": false, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_squash_merge": true, + "allow_update_branch": null, + "archive_on_destroy": null, + "archived": false, + "auto_init": true, + "default_branch": null, + "delete_branch_on_merge": false, + "description": "My awesome codebase", + "etag": null, + "full_name": null, + "git_clone_url": null, + "gitignore_template": "VisualStudio", + "has_discussions": null, + "has_downloads": null, + "has_issues": true, + "has_projects": null, + "has_wiki": true, + "homepage_url": null, + "html_url": null, + "http_clone_url": null, + "id": "EugeneDevopsTerraform", + "ignore_vulnerability_alerts_during_read": null, + "is_template": null, + "license_template": "mit", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "name": "EugeneDevopsTerraform", + "node_id": null, + "pages": [], + "primary_language": null, + "private": null, + "repo_id": null, + "security_and_analysis": null, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "ssh_clone_url": null, + "svn_url": null, + "template": [], + "topics": [], + "visibility": "public", + "vulnerability_alerts": null + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + } + ], + "check_results": null +} diff --git a/terraform/variables.tf b/terraform/variables.tf new file mode 100644 index 000000000..87501798b --- /dev/null +++ b/terraform/variables.tf @@ -0,0 +1,5 @@ +variable "container_name" { + description = "Value of the name for the Docker container" + type = string + default = "newContainerName" +} diff --git a/vkTerraform/.terraform.lock.hcl b/vkTerraform/.terraform.lock.hcl new file mode 100644 index 000000000..d3edcb0de --- /dev/null +++ b/vkTerraform/.terraform.lock.hcl @@ -0,0 +1,10 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/vk-cs/vkcs" { + version = "0.1.16" + constraints = "~> 0.1.12" + hashes = [ + "h1:tkiFOgg4KsDbbG3+SIWBedoB9G7QySqk40aWbTs7n0U=", + ] +} diff --git a/vkTerraform/.terraform/providers/registry.terraform.io/vk-cs/vkcs/0.1.16/darwin_amd64/terraform-provider-vkcs_0.1.16 b/vkTerraform/.terraform/providers/registry.terraform.io/vk-cs/vkcs/0.1.16/darwin_amd64/terraform-provider-vkcs_0.1.16 new file mode 100644 index 000000000..3b11a2517 Binary files /dev/null and b/vkTerraform/.terraform/providers/registry.terraform.io/vk-cs/vkcs/0.1.16/darwin_amd64/terraform-provider-vkcs_0.1.16 differ diff --git a/vkTerraform/terraform.tfstate b/vkTerraform/terraform.tfstate new file mode 100644 index 000000000..1b7c359f1 --- /dev/null +++ b/vkTerraform/terraform.tfstate @@ -0,0 +1,9 @@ +{ + "version": 4, + "terraform_version": "1.6.3", + "serial": 1, + "lineage": "a287f2bc-518a-68a3-c99b-b3e4c5171722", + "outputs": {}, + "resources": [], + "check_results": null +} diff --git a/vkTerraform/vkcs_provider.tf b/vkTerraform/vkcs_provider.tf new file mode 100644 index 000000000..3d5c9a5ac --- /dev/null +++ b/vkTerraform/vkcs_provider.tf @@ -0,0 +1,25 @@ +terraform { + required_providers { + vkcs = { + source = "vk-cs/vkcs" + version = "~> 0.1.12" + } + } +} + +provider "vkcs" { + # Your user account. + username = "max.mat@gmail.com" + + # The password of the account + password = "YOUR_PASSWORD" + + # The tenant token can be taken from the project Settings tab - > API keys. + # Project ID will be our token. + project_id = "2cd713920a2443fa9c08c5e4f0208c82" + + # Region name + region = "RegionOne" + + auth_url = "https://infra.mail.ru:35357/v3/" +}