Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CLOUDDEV-414): fixed makefile and readme instructions #41

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

DamirZinatullin
Copy link
Collaborator

No description provided.

@DamirZinatullin DamirZinatullin force-pushed the fix/CLOUDDEV-414-fix-makefile-and-readme branch 4 times, most recently from 126ef59 to 64c4a38 Compare January 12, 2024 12:38
README.md Outdated

### Writing modules files

Create module files using the examples provided in the folder ./examples
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: in the ./examples folder

README.md Outdated
```
### Project initializing

#### Prepare module configure file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configuration file

README.md Outdated
It is necessary to add provider settings according to the instructions https://developer.hashicorp.com/terraform/language/providers/requirements:
Each Terraform module must declare which providers it requires, so that Terraform can install and use them.

To use the provider, prepare configuration file `provider.tf` in module directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the module directory

README.md Outdated
}
```
#### Initialize working directory
Run terraform init in module directory.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the module directory

README.md Outdated
Before initializing the project you should to set VAULT_ADDR and VAULT_TOKEN envs:
```bash
export VAULT_ADDR=<you can ask address from Cloud team (matermost tag: @devcloud)>
export VAULT_TOKEN=<you can generate this token in ${VAULT_ADDR} page>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in -> at the

README.md Outdated
export VAULT_TOKEN=<you can generate this token in ${VAULT_ADDR} page>
```
#### Initialize
Initialize the project this command:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using this command

README.md Outdated
```sh
$ make init
```
This command creates ./bin and install jq, godotenv, golangci-lint utils. Then the command downloads env file from vault to ./edgecenter/test/.env and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не обязательно писать, что делает команда, т.к. это может поменяться в коде

в данном случае баш код команды self-descriptive

README.md Outdated

### Using built Terraform provider

If you want use built provider from previous step, or use dubug mode, you should add dev_overrides opts to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use the built provider from the previous step, you should add the dev_overrides option to the ~/.terraformrc file:

@alex2304
Copy link
Collaborator

Заметил еще пару вещей, отписал в ПР

Так же, в секции using delve есть команда make build_debug, а потом дублируется ее содержимое.

В принципе, я бы проверил всю секцию Debug, потому что если там есть не работающие вещи, их стоит либо поправить, либо лучше тогда вообще убрать

@alex2304
Copy link
Collaborator

Аппрувнул ПР, чтобы не затягивать код-ревью

Не забудь перед мержем:

  • поправить изменения
  • проверить секцию Debug (если не актуально, лучше удалить вообще)
  • засквошить коммиты и зарезолвить текущий конфликт

@alex2304 alex2304 self-requested a review January 16, 2024 15:46
README.md Outdated
```
For testing not cloud (storage, cdn, dns) data sources and resources:
```bash
make test_not_cloud:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишняя ":" в конце

Makefile Outdated
@@ -24,9 +24,33 @@ TAG = $(shell git describe --tags)
VERSION = $(shell git describe --tags $(LAST_TAG_COMMIT) | sed "s/^$(TAG_PREFIX)//")
PLUGIN_PATH = ~/.terraform.d/plugins/local.edgecenter.ru/repo/edgecenter/$(VERSION)/$(OS)_$(ARCH)


create_bin:
mkdir -p bin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выше есть $BIN_DIR

Makefile Outdated

install_jq:
if test "$(OS)" = "linux"; then \
curl -L -o $(BIN_DIR)/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64; \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В идеале использовать $ARCH: у меня например мак на M1

.gitignore Outdated
@@ -12,6 +12,7 @@ terraform.tfstate
### bin
bin/
.local.env
edgecenter/test/.env
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**/*.env? Чтобы все .env файлы сразу вместо этих двух

и не в секции ### bin

@DamirZinatullin DamirZinatullin force-pushed the fix/CLOUDDEV-414-fix-makefile-and-readme branch from fa90df5 to 357efe5 Compare January 17, 2024 06:13
@DamirZinatullin DamirZinatullin force-pushed the fix/CLOUDDEV-414-fix-makefile-and-readme branch from 357efe5 to 4abb1ee Compare January 17, 2024 06:20
@DamirZinatullin DamirZinatullin merged commit 4abb1ee into master Jan 17, 2024
1 check passed
@DamirZinatullin DamirZinatullin deleted the fix/CLOUDDEV-414-fix-makefile-and-readme branch January 17, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants